ShowWindow怎么窗口显示不出来啊

ole_master 2016-02-29 12:45:05
在窗口的GWL_STYLE加上WS_VISIBLE就可以显示出来,两者区别在哪
...全文
268 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
dustpg 2016-02-29
  • 打赏
  • 举报
回复
多查文档: https://msdn.microsoft.com/en-us/library/windows/desktop/ms633548(v=vs.85).aspx Remarks To perform certain special effects when showing or hiding a window, use AnimateWindow. The first time an application calls ShowWindow, it should use the WinMain function's nCmdShow parameter as its nCmdShow parameter. Subsequent calls to ShowWindow must use one of the values in the given list, instead of the one specified by the WinMain function's nCmdShow parameter. As noted in the discussion of the nCmdShow parameter, the nCmdShow value is ignored in the first call to ShowWindow if the program that launched the application specifies startup information in the structure. In this case, ShowWindow uses the information specified in the STARTUPINFO structure to show the window. On subsequent calls, the application must call ShowWindow with nCmdShow set to SW_SHOWDEFAULT to use the startup information provided by the program that launched the application. This behavior is designed for the following situations: Applications create their main window by calling CreateWindow with the WS_VISIBLE flag set. Applications create their main window by calling CreateWindow with the WS_VISIBLE flag cleared, and later call ShowWindow with the SW_SHOW flag set to make it visible.

15,979

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧