【VC++】如何最大化对话框
一打开一个对话框程序,对话框就最大化,并且要求没有标题栏,没有右上角的关闭,最大化,最小化等按钮,总之就是全屏显示的对话框如何实现?请给出代码,或者链接也行。谢谢答案选中...
一打开一个对话框程序,对话框就最大化,并且要求没有标题栏,没有右上角的关闭,最大化,最小化等按钮,总之就是全屏显示的对话框
如何实现?请给出代码,或者链接也行。谢谢
答案选中加30 展开
如何实现?请给出代码,或者链接也行。谢谢
答案选中加30 展开
7个回答
展开全部
1. API方式:
可以通过 ShowWindow 函数改变窗口的显示状态。语法为:
BOOL ShowWindow( HWND hWnd,
int nCmdShow
);
hWnd 表示窗口句柄
nCmdShow 表示想要显示的状态。SW_MAXIMIZE表示最大化,SW_HIDE表示隐藏等等。
2. MFC方式:
如果是MFC程序,可以使用 CWnd类的 ShowWindow( int nCmdShow ) 方法,状态参数与API一致。
状态参数还可以取以下数值(详情也可参考MSDN):
SW_HIDE Hides this window and passes activation to another
window.
SW_MINIMIZE Minimizes the window and activates the top-level window
in the system's list.
SW_RESTORE Activates and displays the window. If the window is
minimized or maximized, Windows restores it to its original size and
position.
SW_SHOW Activates the window and displays it in its current size and
position.
SW_SHOWMAXIMIZED Activates the window and displays it as a maximized
window.
SW_SHOWMINIMIZED Activates the window and displays it as an
icon.
SW_SHOWMINNOACTIVE Displays the window as an icon. The window that
is currently active remains active.
SW_SHOWNA Displays the window in its current state. The window that
is currently active remains active.
SW_SHOWNOACTIVATE Displays the window in its most recent size and
position. The window that is currently active remains active.
SW_SHOWNORMAL Activates and displays the window. If the window is
minimized or maximized, Windows restores it to its original size and
position.
可以通过 ShowWindow 函数改变窗口的显示状态。语法为:
BOOL ShowWindow( HWND hWnd,
int nCmdShow
);
hWnd 表示窗口句柄
nCmdShow 表示想要显示的状态。SW_MAXIMIZE表示最大化,SW_HIDE表示隐藏等等。
2. MFC方式:
如果是MFC程序,可以使用 CWnd类的 ShowWindow( int nCmdShow ) 方法,状态参数与API一致。
状态参数还可以取以下数值(详情也可参考MSDN):
SW_HIDE Hides this window and passes activation to another
window.
SW_MINIMIZE Minimizes the window and activates the top-level window
in the system's list.
SW_RESTORE Activates and displays the window. If the window is
minimized or maximized, Windows restores it to its original size and
position.
SW_SHOW Activates the window and displays it in its current size and
position.
SW_SHOWMAXIMIZED Activates the window and displays it as a maximized
window.
SW_SHOWMINIMIZED Activates the window and displays it as an
icon.
SW_SHOWMINNOACTIVE Displays the window as an icon. The window that
is currently active remains active.
SW_SHOWNA Displays the window in its current state. The window that
is currently active remains active.
SW_SHOWNOACTIVATE Displays the window in its most recent size and
position. The window that is currently active remains active.
SW_SHOWNORMAL Activates and displays the window. If the window is
minimized or maximized, Windows restores it to its original size and
position.
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
把你的邮箱给我
我发给你
我发给你
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询