C#调用windowsAPI的showwindow,参数中的常量在哪定义啊?

调用方法我基本明白了实现的时候ShowWindow(句柄,SW_HIDE);那个SW_HIDE报错了这怎么办啊?高手指点一下...多谢了.请问一楼你的这些宏的具体值,是从... 调用方法我基本明白了
实现的时候
ShowWindow(句柄, SW_HIDE);
那个SW_HIDE 报错了 这怎么办啊?高手指点一下...多谢了.
请问一楼你的这些宏的具体值,是从哪查到的啊?
我要是用setWindowLong的话,它里面的我去哪里查呢?
展开
 我来答
lcg1986
2010-01-07 · TA获得超过3374个赞
知道大有可为答主
回答量:1858
采纳率:90%
帮助的人:1605万
展开全部
/*
* ShowWindow() Commands
*/
#define SW_HIDE 0
#define SW_SHOWNORMAL 1
#define SW_NORMAL 1
#define SW_SHOWMINIMIZED 2
#define SW_SHOWMAXIMIZED 3
#define SW_MAXIMIZE 3
#define SW_SHOWNOACTIVATE 4
#define SW_SHOW 5
#define SW_MINIMIZE 6
#define SW_SHOWMINNOACTIVE 7
#define SW_SHOWNA 8
#define SW_RESTORE 9
#define SW_SHOWDEFAULT 10
#define SW_FORCEMINIMIZE 11
#define SW_MAX 11

你传int就可以了.这个SW_HIDE是宏

补充:VC6.0里面,输入SW_HIDE,然后右键->Go To Definition Of SW_HIDE

或者安装MSDN

ShowWindow
This function sets the specified window’s show state.

BOOL ShowWindow(
HWND hWnd,
int nCmdShow );
Parameters
hWnd
Handle to the window.
nCmdShow
Specifies how the window is to be shown. The first time ShowWindow is called, the value should be the value obtained by the WinMain function in its nCmdShow parameter. In subsequent calls, this parameter can be one of the following values:
Value Description
SW_FORCEMINIMIZE Windows NT 5.0 and later: Minimizes a window, even if the thread that owns the window is hung. This flag should only be used when minimizing windows from a different thread.
SW_HIDE Hides the window and activates another window.
SW_SHOW Activates the window and displays it in its current size and position.
SW_SHOWNA Displays the window in its current state. The active window remains active.
SW_SHOWNORMAL Activates and displays a window. If the window is minimized or maximized, the system restores it to its original size and position. An application should specify this flag when displaying the window for the first time.

Return Values
Nonzero indicates that the window was previously visible. Zero indicates that the window was previously hidden.
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式