關于一句代碼十分不理解
WNDCLASS wc;
wc.hInstance = hInstance //當前實體句柄賦值給一個類??
然后還有
CreateWindow的時候還要傳一個句柄???和這個句柄一樣????
最后的問題就是
DC這個結構到底存了些什么?
uj5u.com熱心網友回復:
WNDCLASS wc;wc.hInstance = hInstance //當前實體句柄賦值給一個類?? ========= 結構體成員變數賦值 有什么好大驚小怪的
然后還有
CreateWindow的時候還要傳一個句柄???和這個句柄一樣????
HWND CreateWindow(
LPCTSTR lpClassName, // registered class name
LPCTSTR lpWindowName, // window name
DWORD dwStyle, // window style
int x, // horizontal position of window
int y, // vertical position of window
int nWidth, // window width
int nHeight, // window height
HWND hWndParent, // handle to parent or owner window ======= 指定要創建的視窗的父視窗
HMENU hMenu, // menu handle or child identifier
HINSTANCE hInstance, // handle to application instance
LPVOID lpParam // window-creation data
);
最后的問題就是
DC這個結構到底存了些什么? 看圖


uj5u.com熱心網友回復:
句柄有點像指標的指標。uj5u.com熱心網友回復:
我有一種將上面圖中遮擋住內容揭開看看到底是啥的沖動。
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/150799.html
標籤:基礎類
