Click to See Complete Forum and Search --> : API-Guide and toolshed
bit6411
Jun 10th, 2001, 08:35 PM
Is there a way to see the constants for a specific function in API-Guide and toolshed?
Matthew Gates
Jun 10th, 2001, 09:15 PM
Load the API-ToolShed, click File, Open ATS File, find and click on a file called kpdapi.ats, every constant known should be located in there.
bit6411
Jun 10th, 2001, 09:38 PM
I know. But what I want to know is which constants refer to what functions
Megatron
Jun 11th, 2001, 02:40 PM
Usually, the prefix of the message will help you, e.g:
WM = General Window messages
EM = Edit window messages
BM = Button Messages
LB = ListBox messages
ES = Edit control styes
LVM = ListView messages
PBM = progress bar messages
LBS = listbox style
BX = button style
SPI = system parameters info
JoshT
Jun 12th, 2001, 06:07 AM
You can usually find the constants in the VC++ headers.
bit6411
Jun 12th, 2001, 09:39 AM
VC++ headers?
Megatron
Jun 12th, 2001, 02:54 PM
Windows.h or windowsx.h
Look in the "include" directroy of VC++
JoshT
Jun 13th, 2001, 05:59 AM
When you look up the API calls in MSDN, they'll they you what .h file to include (for C++). Or if you know the name of the constant but not the value, use can use Windows "search for files containing text" with the name on the include dir to find the right one.
Megatron
Jun 13th, 2001, 02:55 PM
Usually, the API's will be found in windows.h, but there are the odd exceptions e.g: mci, SAPI, DirectX
JoshT
Jun 14th, 2001, 06:17 AM
Yeah, but windows.h doesn't actually define any constants. It just includes a bunch of other .h files.
Megatron
Jun 14th, 2001, 02:34 PM
It defines some constants of it's own, as well as includes other ones.
JoshT
Jun 15th, 2001, 06:05 AM
Hmm, the version on my computer doesn't really have anything useful in it (for VB)...
MerrionComputin
Jun 15th, 2001, 06:20 AM
Originally posted by bit6411
I know. But what I want to know is which constants refer to what functions
I have put a great deal of work into providing this kind of functionality in VB5 - you can download the latest iteration from Merrion Computing Dowloads (http://www.merrioncomputing.com/Download/index.htm) called EventVB.dll.
The idea is that related constants are grouped together as an enumerated type which is exported from that dll. Thus, the windows messages are enumerated thus:
Public Enum WindowMessages
WM_ACTIVATE = &H6 '(LOWORD) wp = WA_, (HIWORD) > 0 if minimized, lp =hwnd
WM_ACTIVATEAPP = &H1C
WM_ASKCBFORMATNAME = &H30C
WM_CANCELJOURNAL = &H4B
WM_CANCELMODE = &H1F
WM_CAPTURECHANGED = &H1F 'wParam = 0, lParam = New capture hWnd
WM_CHANGECBCHAIN = &H30D
WM_CHAR = &H102
WM_CHARTOITEM = &H2F
WM_CHILDACTIVATE = &H22
WM_CHOOSEFONT_GETLOGFONT = (&H400 + 1)
WM_CHOOSEFONT_SETFLAGS = (&H400 + 102)
WM_CHOOSEFONT_SETLOGFONT = (&H400 + 101)
WM_CLEAR = &H303
WM_CLOSE = &H10
WM_COMMAND = &H111
WM_COMPACTING = &H41
WM_COMPAREITEM = &H39
WM_CONVERTREQUESTEX = &H108
WM_COPY = &H301
WM_COPYDATA = &H4A
WM_CREATE = &H1
WM_CTLCOLORBTN = &H135
WM_CTLCOLORDLG = &H136
WM_CTLCOLOREDIT = &H133
WM_CTLCOLORLISTBOX = &H134
WM_CTLCOLORMSGBOX = &H132
WM_CTLCOLORSCROLLBAR = &H137
WM_CTLCOLORSTATIC = &H138
WM_CUT = &H300
WM_DDE_ACK = (&H3E0 + 4)
WM_DDE_ADVISE = (&H3E0 + 2)
WM_DDE_DATA = (&H3E0 + 5)
WM_DDE_EXECUTE = (&H3E0 + 8)
WM_DDE_FIRST = &H3E0
WM_DDE_INITIATE = &H3E0
WM_DDE_LAST = (&H3E0 + 8)
WM_DDE_POKE = (&H3E0 + 7)
WM_DDE_REQUEST = (&H3E0 + 6)
WM_DDE_TERMINATE = (&H3E0 + 1)
WM_DDE_UNADVISE = (&H3E0 + 3)
WM_DEADCHAR = &H103
WM_DELETEITEM = &H2D
WM_DESTROY = &H2
WM_DESTROYCLIPBOARD = &H307
WM_DEVMODECHANGE = &H1B
WM_DRAWCLIPBOARD = &H308
WM_DRAWITEM = &H2B
WM_DROPFILES = &H233
WM_ENABLE = &HA
WM_ENDSESSION = &H16
WM_ENTERIDLE = &H121
WM_ENTERMENULOOP = &H211
WM_ERASEBKGND = &H14 'wParam = 0, lParam = hDC of window. Return 0 if intercepted...
WM_EXITMENULOOP = &H212
WM_FONTCHANGE = &H1D
WM_GETDLGCODE = &H87
WM_GETFONT = &H31
WM_GETHOTKEY = &H33
WM_GETMINMAXINFO = &H24
WM_GETTEXT = &HD
WM_GETTEXTLENGTH = &HE
WM_HOTKEY = &H312
WM_HSCROLL = &H114
WM_HSCROLLCLIPBOARD = &H30E
WM_ICONERASEBKGND = &H27
WM_IME_CHAR = &H286
WM_IME_COMPOSITION = &H10F
WM_IME_COMPOSITIONFULL = &H284
WM_IME_CONTROL = &H283
WM_IME_ENDCOMPOSITION = &H10E
WM_IME_KEYDOWN = &H290
WM_IME_KEYLAST = &H10F
WM_IME_KEYUP = &H291
WM_IME_NOTIFY = &H282
WM_IME_SELECT = &H285
WM_IME_SETCONTEXT = &H281
WM_IME_STARTCOMPOSITION = &H10D
WM_INITDIALOG = &H110
WM_INITMENU = &H116
WM_INITMENUPOPUP = &H117
WM_KEYDOWN = &H100
WM_KEYUP = &H101
WM_KILLFOCUS = &H8 'wParam = hWnd of window about to lose focus.
WM_LBUTTONDBLCLK = &H203
WM_LBUTTONDOWN = &H201
WM_LBUTTONUP = &H202
WM_MBUTTONDBLCLK = &H209
WM_MBUTTONDOWN = &H207
WM_MBUTTONUP = &H208
WM_MDIACTIVATE = &H222
WM_MDICASCADE = &H227
WM_MDICREATE = &H220
WM_MDIDESTROY = &H221
WM_MDIGETACTIVE = &H229
WM_MDIICONARRANGE = &H228
WM_MDIMAXIMIZE = &H225
WM_MDINEXT = &H224
WM_MDIREFRESHMENU = &H234
WM_MDIRESTORE = &H223
WM_MDISETMENU = &H230
WM_MDITILE = &H226
WM_MEASUREITEM = &H2C
WM_MENUCHAR = &H120
WM_MENUSELECT = &H11F
WM_MOUSEACTIVATE = &H21
WM_MOUSEMOVE = &H200
WM_MOVE = &H3
WM_NCACTIVATE = &H86
WM_NCCALCSIZE = &H83
WM_NCCREATE = &H81
WM_NCDESTROY = &H82
WM_NCHITTEST = &H84
WM_NCLBUTTONDBLCLK = &HA3
WM_NCLBUTTONDOWN = &HA1
WM_NCLBUTTONUP = &HA2
WM_NCMBUTTONDBLCLK = &HA9
WM_NCMBUTTONDOWN = &HA7
WM_NCMBUTTONUP = &HA8
WM_NCMOUSEMOVE = &HA0
WM_NCPAINT = &H85
WM_NCRBUTTONDBLCLK = &HA6
WM_NCRBUTTONDOWN = &HA4
WM_NCRBUTTONUP = &HA5
WM_NEXTDLGCTL = &H28
WM_NULL = &H0
WM_PAINT = &HF
WM_PAINTCLIPBOARD = &H309
WM_PAINTICON = &H26
WM_PALETTECHANGED = &H311
WM_PALETTEISCHANGING = &H310
WM_PARENTNOTIFY = &H210
WM_PASTE = &H302
WM_PENWINFIRST = &H380
WM_PENWINLAST = &H38F
WM_POWER = &H48
WM_PSD_ENVSTAMPRECT = (&H400 + 5)
WM_PSD_FULLPAGERECT = (&H400 + 1)
WM_PSD_GREEKTEXTRECT = (&H400 + 4)
WM_PSD_MARGINRECT = (&H400 + 3)
WM_PSD_MINMARGINRECT = (&H400 + 2)
WM_PSD_PAGESETUPDLG = (&H400)
WM_PSD_YAFULLPAGERECT = (&H400 + 6)
WM_QUERYDRAGICON = &H37
WM_QUERYENDSESSION = &H11
WM_QUERYNEWPALETTE = &H30F
WM_QUERYOPEN = &H13
WM_QUEUESYNC = &H23
WM_QUIT = &H12
WM_RBUTTONDBLCLK = &H206
WM_RBUTTONDOWN = &H204
WM_RBUTTONUP = &H205
WM_RENDERALLFORMATS = &H306
WM_RENDERFORMAT = &H305
WM_SETCURSOR = &H20
WM_SETFOCUS = &H7
WM_SETFONT = &H30
WM_SETHOTKEY = &H32
WM_SETREDRAW = &HB
WM_SETTEXT = &HC
WM_SETTINGCHANGE = &H1A
WM_SHOWWINDOW = &H18
WM_SIZE = &H5
WM_SIZECLIPBOARD = &H30B
WM_SPOOLERSTATUS = &H2A
WM_SYSCHAR = &H106
WM_SYSCOLORCHANGE = &H15
WM_SYSCOMMAND = &H112
WM_SYSDEADCHAR = &H107
WM_SYSKEYDOWN = &H104
WM_SYSKEYUP = &H105
WM_TIMECHANGE = &H1E
WM_TIMER = &H113
WM_UNDO = &H304
WM_USER = &H400
WM_VKEYTOITEM = &H2E
WM_VSCROLL = &H115
WM_VSCROLLCLIPBOARD = &H30A
WM_WINDOWPOSCHANGED = &H47
WM_WINDOWPOSCHANGING = &H46
WM_WININICHANGE = &H1A
End Enum
HTH,
D.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.