码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2017-08-18 12:32:26      阅读:185      评论:0      收藏:0      [点我收藏+]

标签:应用程序   ams   console   als   获取   mod   应用   for   sel   

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);

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

标签:应用程序   ams   console   als   获取   mod   应用   for   sel   

原文地址:http://www.cnblogs.com/happykoukou/p/7388879.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!