Advertisement Jump to content
Sign in to follow this  
silverphyre673

Get PROPER hinstance

This topic is 4996 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I need to get the hInstance used in a DialogBox function call within the CALLBACK procedure for the dialog box. How can I do this? [Edited by - silverphyre673 on May 14, 2005 7:27:02 PM]

Share this post


Link to post
Share on other sites
Advertisement
Call GetModuleHandle(NULL) in the callback routine; this returns a handle to the instance of the calling process i.e.

HINSTANCE hMyInstance = (HINSTANCE)GetModuleHandle(NULL);

Adam

Share this post


Link to post
Share on other sites
Actually, new problem: I need to call a dialog box from within a dialog box, and the above turned out to not be what I needed. What should I do instead? Thanks.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!