HINSTANCE是应用程序实例句柄,
HWND是窗口对象句柄,
HANDLE是任意对象的句柄,
CWnd是MFC中的窗口类。
MSDN里面对于HINSTANCE的解释是"handle to an instance" 就是说是一个instance的句柄。而对instance的解释是"An object for which memory is allocated or which is persistent." 占有内存的一个对象。
对于HWND的解释是“Handle to a window.”而对window的解释是"In a graphical Windows-based application, a window is a rectangular area of the screen where the application displays output and receives input from the user. Therefore, one of the first tasks of a graphical Windows-based application is to create a window. " 就是说是屏幕上的一块区域。
CWnd是MFC的一个类了,它有窗体,几乎所有有图形显示的类都是从它派生的,它自己是从CCmdTarget类派生的,所以它可以接受消息。CCmdTarget类的爸爸可就是CObject了。
HANDLE HINSTANCE HWND等句柄的区别
最新推荐文章于 2022-01-30 11:11:57 发布