1void CMiniFrame2Dlg::OnBnClickedMiniframeBtn()
 2{
 3    // TODO: Add your control notification handler code here
 4    CMiniFrameWnd *MFW = new CMiniFrameWnd;
 5    CString StrClassName = AfxRegisterWndClass(
 6                                         CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS,
 7                                         LoadCursor(NULL, IDC_ARROW),
 8                                         (HBRUSH)GetStockObject(COLOR_BTNFACE+1),
 9                LoadIcon(NULL, IDI_APPLICATION));
10
11    MFW->CreateEx(0,
12                      StrClassName,
13              TEXT("Small Application"),
14              WS_POPUP | WS_CAPTION | WS_SYSMENU | 
15                      MFS_BLOCKSYSMENU, 
16              CRect(100100350420));
17
18    MFW->ShowWindow(SW_SHOW);
19}

20
posted on 2007-06-20 16:03  tivoli_chen  阅读(212)  评论(0编辑  收藏  举报