应用程序的实例句柄保存在CWinApp的m_hInstance中,可以这么调用AfxGetInstancdHandle获得句柄:
Example:
HANDLE hInstance = AfxGetInstanceHandle();