还有: HWND CreateWindowEx( DWORD dwExStyle, // extended window style 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 ); 用CreateWindowEx的hInstance要怎么得到呢?
或者自己写一个 CreateEx 函数来覆盖默认的,然后在里面调用 CreateWindowEx 函数
cwnd就是对CreateWindowEx的封装。有必要去调用createWindowEx吗?
HWND CreateWindowEx(
DWORD dwExStyle, // extended window style
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
);
用CreateWindowEx的hInstance要怎么得到呢?
如果要创建一个非对话框窗口,可以自己注册一个类,然后用CreateWindowEx创建。