<C++>创建窗口

时间:2014-05-26 11:02:57   收藏:0   阅读:229

Step 1:WNDCLASS

bubuko.com,布布扣
typedef struct _WNDCLASS
{
            UINT style;
            WNDPROC lpfnWndProc;
            int cbClsExtra;
            int cbWndExtra;
            HANDLE hInstance;
            HICON hIcon;
            HCURSOR hCursor;
            HBRUSH hbrBackground;
            LPCTSTR lpszMenuName;
            LPCTSTR lpszClassName;      
}WNDCLASS;
bubuko.com,布布扣

Step 2: RegisterClass

bubuko.com,布布扣
ATOM RegisterClass(CONST WNDCLASS *lpWndClass);
bubuko.com,布布扣

Step 3: CreateWindow

bubuko.com,布布扣
HWND CreateWindow(
           LPCTSTR lpClassName,
           LPCTSTR lpWindowName,
           DWORD dwStyle,
           int x,
           int y,
           int nWidth,
           int nHeight,
           HWND hWndParent,
           HMENU hMenu,
           HANDLE hInstance,
           LPVOID lpParam
);
bubuko.com,布布扣

Step 4: ShowWindow & UpdateWindow

bubuko.com,布布扣
BOOL ShowWindow(
         HWND hWnd,
         int nCmdShow
);

BOOL UpdateWindow(
         HWND hWnd,
);
bubuko.com,布布扣

 

 

 

<C++>创建窗口,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!