www.pudn.com > SDK 工具条,分割条,TREE 等控件演示代码.rar > childframe.cpp
#include "WinMain.h"
#include "listview11.h"
#include "listviewqq.h"
#include "childframe.h"
#include "toolbartt.h"
HWND hwndListViews111;
extern struct dingdan * dingdans;
extern HINSTANCE hInst;
HWND hChild;
registerchildframe(HWND hWnd)
{
WNDCLASSEX chiclass;
chiclass.cbSize = sizeof(chiclass);
chiclass.style =
CS_HREDRAW|CS_VREDRAW|
CS_OWNDC;
chiclass.lpfnWndProc = ChildWndProc;
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 ChildWndProc(HWND hChild,UINT iMsg,WPARAM wParam,LPARAM lParam)
{
switch(iMsg)
{
case WM_LBUTTONDOWN:
return 0;
case WM_CREATE:
{
hwndListViews111 = CreateListView11(hInst, hChild);
}
return 0;
case WM_SIZE:
ResizeListView11(hwndListView11, hChild);
case WM_NOTIFY:
return 0;
case WM_DESTROY:
free(dingdans);
return 0;
}
return DefWindowProc(hChild,iMsg,wParam,lParam);
}