获取当前应用程序实例(instance:HINSTANCE)(转)

if using MFC AfxGetInstanceHandle(). For console programs, call GetConsoleWindow() to get the HWND then GetWindowLong() to get the HINSTANCE.

For the Win32 API, you could also use GetModuleHandle():

 

//get instance of current program (self)
HINSTANCE hInst= GetModuleHandle (0);

posted @ 2017-08-18 11:55  ~小小鸟~  阅读(885)  评论(0)    收藏  举报