|
|
They only way I know of implementing context help in this regard is to use the standard MFC context help button that by default would be in your toolbar if you enabled it in your MFC app. If its not there, you fcan add a toolbar button with the ID of ID_CONTEXT_HELP.
This will get the basic context help working for your form. If you individual item help for controls. Its a bitmore involved than this. I originally worked through this problem with Bill Heffner on the CodeGuru question board middle of last year and we got to a solution. The URL for the thread is:
http://63.236.73.79/cgi-bin/bbs/wt/showpost.pl?Board=vc&Number=298883&page=1&view=collapsed&mode=threaded&sb=5&category=
Sorry to reference you to a CodeGuru thread, but I don;t really have the time at the moment to work through the whole problem again. If you get stuck, I should be able to help further, but try looking at the thread first and trying whats in it.
HTH
Roger Allen
Sonork 100.10016
|
|
|
|
|
Thanks Roger, I'll give it a whirl.
Giles
|
|
|
|
|
I am working on an addin for VS and I am having trouble debugging it. Since the addin runs from within VS, I am choosing MSDEV.EXE as my executeable for the debugging session, but of course it doesn't have any debug info. It won't stop on my breakpoints or anything. Has anyone done this or have any ideas? Thanks.
|
|
|
|
|
I haven't tried this with an addin, but it works for a service. Add a call to DebugBreak() to your code where you want the breakpoint, then build it. Start MSDEV, and locate the process in Task Manager. Right-click it, select Debug and attach the debugger. Now, when you execute the code with the DebugBreak, you'll get an error message. You should be able to open the Stack Window, find your code and place breakpoints whereever you like.
Hope this helps.
------------------------
Derek Waters
derek@lj-oz.com
|
|
|
|
|
Hi,
I have tried to get the GetThemeColor() function to work.
I have the latest Platform SDK, and I'm running Win XP Prof, but I _can't_ get it to work.
All I want is the different colors for different controls under the current color theme.
Anyone have had any success with GetThemeColor()?
Or maybe a sample that works...
My main problem is that it looks like the values for the "iPropId" parameter not is defined anywhere.
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
If all you want is for the current theme use GetSysColor(...)
Brad
|
|
|
|
|
I know about GetSysColor(), and have used it a lot. But, there's a lot of colors in WinXP that you can't get, the values of, using GetSysColor...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
I need a way to search through the registry and delete all occurances of a string from the registry. Any help would be greatly appreciated.
Thanks,
Derek Smigelski
|
|
|
|
|
This is not hard, there are several API calls that allow you to enumerate registry keys/values, which could be done recursively.
I'd be debugging on a spare machine though, sounds like a program that could easily bring your machine a beggin' to it's knees.....
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
Not sure search the entire registry recursively and remove a string whenever it is found. What is the best way to do this?
Derek
|
|
|
|
|
If you search for registry sample in MSDN you'll find an example, but you can use RegEnumKey to enumerate the keys, and the RegEnumValue to step through the strings under a key.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
I need to write a spy utility to spy on objects in Internet Explorer. Can you offer any help/guidance.
Thank you,
SAK
|
|
|
|
|
Hi!
Can some one tell me how to get the CPU utilization for a process under Windows 2000? I am trying to get this information through my code, so examples of instrumenting the performance monitor might not help.
thanks!
avneesh
|
|
|
|
|
I want to write componemt to connect to "Microsoft ADO Data control"
How can I make connection to it and get Recorsets?
Thanks
|
|
|
|
|
here or Here you can find samples...
Regrards
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Is it possible to make a gorillaserver.com name instead of the IP on a Win98 system?
I have a CLient/Server app and I don't want to type in a IP every time, a name instead of numbers is much more funnier!!!
IS IT POSSIBLE
------------------------------
©0d3 ©®4©k3® - That's me!
------------------------------
|
|
|
|
|
IS IT POSSIBLE
It is. The function to use is gethostbyname , which returns the IP address corresponding to a symbolic name. Of course, the success of this function depends on the resolution mechanism available (DNS most of the times).
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
But how will I do that with that function??
You said something
Joaquín M López Muñoz wrote:
Of course, the success of this function depends on the resolution mechanism available (DNS most of the times).
What do you mean... can you tell me in big steps how to go through this!?
YES YOU CAN!!
------------------------------
©0d3 ©®4©k3® - That's me!
------------------------------
|
|
|
|
|
OK... So if you're writting a client/server app, then you surely must be using Winsock under some form or another, aren't you? If you are not, then you have to initialize Winsock, as gethostbyname is a function within this library. See the Winsock Programmer's FAQ for details.
Now that you have WInsock properly initialized, all you have to do is call gethostbyname with the name of the server you want to resolve and extract the IP address from the return data. Something like this: (Warning: this has not even been compiled, typos expected)
CString strAddr;
struct hostent *phe = gethostbyname(lpszServerName);
if(!phe||!phe->h_addr_list[0]){
}
else{
struct in_addr addr;
memcpy(&addr,phe->h_addr_list[0],sizeof(addr));
strAddr=inet_ntoa(addr);
}
Hope this helps.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I am new to MFC and I have couple questions about how it handles its hWnds. I have a formview that is the only view in my app. A store a pointer to it in the FrameWnd class. Whenever I try to call controls on the form from other parts of the application it crashes. Why is this and what is the best way to access a form controls from other parts of the app?
|
|
|
|
|
post your code! for where you store the pointer, and the bits where you try and access it and it crashes.
Its impossible for people to help you if you don't post your code. and remember to enclose it in html style <PRE> ... </PRE> tags!
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
Sorry.
I have a form that was created in the form editor. It has an edit control IDC_EDIT_LOG.
then I have
class MyClass
{
void func();
};
func is
void MyClass::func()
{
CEdit *edit = (CEdit *)GetDlgItem(IDC_EDIT_LOG);
edit->SetWindowText(_T("Some Text"));
}
this code asserts and produces an access violation.
Any help would be much appreciated.
Steve
|
|
|
|
|
If that asserts, look at the assert. If you hit "debug", then a comment in the MFC source code near the assert will normally give you more clues.
However, the most likely problem is that your CEdit *edit; is not a pointer to a created edit control. This could be for a couple of reasons....
1. is class MyClass a class representing your form (CDialog or CFormView), assigned to your dialog resource in classwizard??? If it's not, then GetDlgItem will be returned something wrong.
2. Are you sure that the edit control is created before myfunc gets called? what calls myfunc? if you're calling it in some of the form startup procedures, it would not be a good idea to use it before OnInitialUpdate().
If those pointers don't help, post your entire (proper) class definition.
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
What is MyClass derived from?
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|