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

相关文章:

  • 2021-11-20
  • 2021-08-05
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-03
猜你喜欢
  • 2022-02-24
  • 2022-12-23
  • 2021-08-25
  • 2021-07-08
  • 2022-12-23
相关资源
相似解决方案