API创建创建子窗口

#define   IDC_STATIC 106

API创建创建子窗,通过 CreateWindow 函数实现,ID号要在;

case WM_CREATE:


bSetTimer = FALSE;
hwndChild1   =  CreateWindow ( "STATIC","",WS_VISIBLE|WS_CHILD,LOWORD(lParam)-300,0,//创建子窗口

LOWORD(lParam),HIWORD(lParam),hWnd,(HMENU)IDC_STATIC,hInst,NULL);

                            }


case   WM_SIZE: 
MoveWindow(hwndChild1,LOWORD(lParam)-300,0,300,HIWORD(lParam),TRUE); //移动子窗口
return   0; 

你可能感兴趣的:(API创建创建子窗口)