Hi,
I am using wxWindows 2.4.2 and Microsoft Visual C++ 6.0 for my application.
Another library I load wants the "HINSTANCE hInstance" to start up with windows (in linux it works fine) that is passed to WinMain on startup, but I start my app using wxApp. (I don't want to start with WinMain directly because the App should also work on linux)
Is there any way to access the hInstance from within wxWindows?
Accessing the HINSTANCE
-
- In need of some credit
- Posts: 2
- Joined: Wed Jul 06, 2005 8:19 pm
From http://wiki.wxwidgets.org/wiki.pl?WxMSW_Issues
If you need to get to a Window Handle ( i.e. a HWND ) you can call wxWindow::GetHandle().
Getting the handle to the Application Instance is a little more involved... You need to include a header, and then you can call an undocumented function that is only on windows like this:
1. ifdef __WXMSW__
2. include "wx/msw/private.h"
3. endif
...
HINSTANCE hInstance = wxGetInstance();
Follow the development of my screenplay authoring program at http://wxscreenplaywriter.blogspot.com/
-
- In need of some credit
- Posts: 2
- Joined: Wed Jul 06, 2005 8:19 pm
Don't know, I use google before I try anything else.
Follow the development of my screenplay authoring program at http://wxscreenplaywriter.blogspot.com/