Windows 界面:设置不可见的窗口属性

1,创建单文档工程

2,用 ClassWizard 添加消息响应函数 PreCreateWindow(),添加以下内容:

BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
 if( !CFrameWnd::PreCreateWindow(cs) )
  return FALSE;
 // TODO: Modify the Window class or styles here by modifying
 //  the CREATESTRUCT cs

 cs.style = WS_POPUP;     //使主窗口不可见
 cs.dwExStyle |= WS_EX_TOOLWINDOW;  //不显示任务按钮

 return TRUE;

你可能感兴趣的:(Windows,界面,windows,styles,class,文档,任务)