www.pudn.com > SDK 工具条,分割条,TREE 等控件演示代码.rar > childframe11.cpp
#include "WinMain.h"
#include "childframe11.h"
extern HINSTANCE hInst;
HWND hChild;
registerchildframe11(HWND hWnd)
{
WNDCLASSEX chiclass;
chiclass.cbSize = sizeof(chiclass);
chiclass.style =
//CS_HREDRAW|CS_VREDRAW|
CS_OWNDC;
chiclass.lpfnWndProc = ChildWndProc11;
chiclass.cbClsExtra =0;
chiclass.cbWndExtra =0;
chiclass.hInstance = hInst;
chiclass.hIcon = NULL;
chiclass.hCursor = LoadCursor(NULL,IDC_CROSS);
chiclass.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
chiclass.lpszMenuName = NULL;
chiclass.lpszClassName = "ChildWindow";
chiclass.hIconSm = NULL;
RegisterClassEx(&chiclass);
hChild = CreateWindow("ChildWindow",
"今天定单查看->>",
//WS_POPUP|
WS_CHILD|
// WS_THICKFRAME|
WS_VISIBLE,
//|WS_OVERLAPPEDWINDOW,
40,40,
400,100,
hWnd,
NULL,
hInst,
NULL
);
}
LRESULT CALLBACK ChildWndProc11(HWND hChild,UINT iMsg,WPARAM wParam,LPARAM lParam)
{
switch(iMsg)
{
case WM_LBUTTONDOWN:
return 0;
case WM_CREATE:
{
}
return 0;
case WM_SIZE:
case WM_NOTIFY:
return 0;
case WM_DESTROY:
return 0;
}
return DefWindowProc(hChild,iMsg,wParam,lParam);
}