|
-
April 18th, 2004, 06:25 PM
#1
How to get a HINSTANCE of the current programm ?
Hi,
even if it sounds like a joke, I mean it serious.
Ok, for sure I know that this HINSTANCE is passed via arguments to WinMain.
But what I want to do is, to write some C++-classes that need a HINSTANCE to to program they are used in, and for some reasons, I don't want to pass itfrom WinMain.
So is there a possibility to get a HINSTANCE of the current module from anywhere inside the code ?
thanks for your help
highhead
-
April 18th, 2004, 06:41 PM
#2
-
April 18th, 2004, 07:13 PM
#3
Thought about that initially
Thanks again
and you are sure a HMODULE is equal to a HINSTANCE ?
regards
highhead
-
April 19th, 2004, 12:50 AM
#4
"As it turns out, HMODULEs and HINSTANCEs are exactly the same thing. If the documentation for a function indicates that an HMODULE is required, you can pass an HINSTANCE, and vice versa. There are two data types because in 16-bit Windows HMODULEs and HINSTANCEs identified different things." - Jeffrey Richter, Programming Applications for Microsoft Windows
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|