API函数中的常量问题

zzl212 2003-01-02 01:26:38
假如声明了这么一个API函数:Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long

在源代码中我调用了它
SetWindowPos display.hwnd, HWND_TOPMOST, 2, 2, 0, 0, SWP_NOSIZE
发现VB不认识HWND_TOPMOST和SWP_NOSIZE,都是EMPTY值。
这两个常量怎么让VB认识啊?

...全文
3 点赞 收藏 3
写回复
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
suntt 2003-01-02
你要进行声明

API Text Viewer
回复
脆皮大雪糕 2003-01-02
Public Const HWND_BOTTOM = 1
Public Const HWND_BROADCAST = &HFFFF&
Public Const HWND_DESKTOP = 0
Public Const HWND_NOTOPMOST = -2
Public Const HWND_TOP = 0
Public Const HWND_TOPMOST = -1
Public Const SWP_DRAWFRAME = SWP_FRAMECHANGED
Public Const SWP_FRAMECHANGED = &H20 ' The frame changed: send WM_NCCALCSIZE
Public Const SWP_HIDEWINDOW = &H80
Public Const SWP_NOACTIVATE = &H10
Public Const SWP_NOCOPYBITS = &H100
Public Const SWP_NOMOVE = &H2
Public Const SWP_NOOWNERZORDER = &H200 ' Don't do owner Z ordering
Public Const SWP_NOREDRAW = &H8
Public Const SWP_NOREPOSITION = SWP_NOOWNERZORDER
Public Const SWP_NOSIZE = &H1
Public Const SWP_NOZORDER = &H4
Public Const SWP_SHOWWINDOW = &H40
回复
lxcc 2003-01-02
api viewer
选择常量
回复
发动态
发帖子
VB基础类
创建于2007-09-28

7451

社区成员

VB 基础类
申请成为版主
社区公告
暂无公告