GetWindowContextHelpId
- From: "nitskykon" <nitskykon@xxxxxxxxx>
- Date: 28 Mar 2006 12:50:36 -0800
I have a project with 2 forms, Form1 and Form2. Form1 has a command
button that when clicked with show Form2 modally. Form2 has the
HelpContextID set as 123456.
When the Form2 is being shown and the user presses F1 key Form1
receives the key press event via keyboard hook. At this point I can get
the Form2's windows handle via GetActiveWindow.
(Note that the actual case is more complex and I dont have the access
to window handle directly and I have to use GetActiveWindow or other
such APIs. I am explaining this as Form1 and Form2 to keep things
simple)
When I use GetWindowContextHelpD and pass in Form2's window handle the
return value is -1 and not 123456 as expected. The documentation for
GetWindowContextHelpID says the return value can be 0 if the window has
no help context identifier else the identifier itself.
In my case it is neither 0 nor the actual help context id.
Am I missing something here? Also is there a way to access the
Form/control's object via window handle?
.
- Prev by Date: Re: assign a string with inverted commas
- Next by Date: Re: ScrollBar
- Previous by thread: Windows Media Player
- Next by thread: How to compare data from two notepads??
- Index(es):