News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

A problem app you can look at

Started by NoCforMe, July 08, 2022, 08:53:12 PM

Previous topic - Next topic

NoCforMe

I have a program that has a weird problem I can't figure out. So hey, what a deal: you get to look at it and maybe figure out what the hell is going on with it. How could you not love that?

I'm posting the executable only, not code (yet). It's a file finder that finds files either by name or by contents. Works pretty well, if I don't say so myself (I'm especially happy with the text searcher, which uses a FSA (finite state automaton, aka state machine)).

But it has an annoying problem: for long searches, I put in a "Waiting" dialog box that pops up, with an active progress-bar control, so you can see that something is actually happening. This works OK--the first couple of times (and sometimes not even that). After that, the dialog pops up and then immediately disappears.

I threw in some debugging code and tapped the message stream. When it fails, the dialog procedure gets these messages right before dying:


Message: WM_NCACTIVATE
Message: WM_ACTIVATE
Message: WM_WINDOWPOSCHANGING
???[unknown]???: 144
Message: WM_WINDOWPOSCHANGING
Message: WM_WINDOWPOSCHANGED
Message: WM_DESTROY
Message: WM_NCDESTROY


I have no idea what 144 (hex 90) is; it ain't in windows.inc.

When I first found this problem, I was creating the dialog each time a search began and then getting rid of it with EndDialog(). I changed to only creating it once, then hiding it (with ShowWindow() ) until it was needed again, whereupon I un-hide it. But that didn't solve the problem.

One reason I'm posting this here is that I'm not sure the problem isn't with my computah. I'm running Windows 7 here, and my system is basically a total piece of shit, with lots of problems. In fact, the reason I wrote this in the first place is that the search function in my Explorer is totally broken. I've had lots of blue screens (none lately, strangely), it's slower than shit, and there are lots of other glitches. So it's hard to separate my coding mistakes from the condition of my OS.

About the program: the search term acts as if it's wildcarded ("test" will find files with that string anywhere in the name). Text search can be case-sensitive or -insensitive (filename searches are case-insensitive).

I'd really like to know of others see the same problem with that dialog as I do. Apart from that it's pretty good, I think. Fast enough. Consumes a lot of memory, though. (I think that's mainly the listview eating up tons of memory for its string storage.)
Assembly language programming should be fun. That's why I do it.

Greenhorn

At least for the window message there is a hint: #define WM_UAHDESTROYWINDOW 0x90

http://blog.airesoft.co.uk/2009/11/wm_messages/

https://social.msdn.microsoft.com/Forums/en-US/b96413da-0c9f-4de7-8a1f-64e5538c6f86/property-sheet-extension-tabs-vanishesdestroys-under-x64-windows-10
Kole Feut un Nordenwind gift en krusen Büdel un en lütten Pint.

NoCforMe

Another aspect of this really weird behavior: If I do a search for all DLL files starting at the root, the waiting dialog disappears right away. But if I do a search for JPG files, it works OK. WTF, it's name-sensitive? Now, I thought, hmm, maybe it's because there are so damn many DLLs (51,623 on my system!). (There are only 12,885 JPGs by comparison.)

So one of those links was also about a disappearing control with that same message ID ...

BTW, sorry if anyone ran the original version I attached, which created log files which could get pretty big. The current version (in 1st message above) doesn't do that.

Thanks for the link which has the complete list of WM_xxxx messages. I'm going to put them in my magic decoder.
Assembly language programming should be fun. That's why I do it.

NoCforMe

Quote from: Greenhorn on July 08, 2022, 09:43:59 PM
At least for the window message there is a hint: #define WM_UAHDESTROYWINDOW 0x90

http://blog.airesoft.co.uk/2009/11/wm_messages/

Thanks for that, Greenhorn. Very useful resource there.

I went ahead and wrote a small tool to convert those strange C-type EQUs to our native language, which I'm posting here. I changed all the "WM_xxxx" names to "_WM_xxxx" so they won't conflict with those already defined in our windows.inc file. (Hmm, maybe someone could update that file with this complete list? Hint hint.) I also prefixed all the "undefined" messages with _WM_ for consistency.

Here is a taste of my results (couldn't post the complete files because they're too big: the board allows a maximum message size of 20,000 chars.):

The _WMxxxx EQUs:

_WM_NULL EQU 0H
_WM_CREATE EQU 01H
_WM_DESTROY EQU 02H
_WM_MOVE EQU 03H
_WM_SIZEWAIT EQU 04H
_WM_SIZE EQU 05H
_WM_ACTIVATE EQU 06H
_WM_SETFOCUS EQU 07H
_WM_KILLFOCUS EQU 08H
_WM_SETVISIBLE EQU 09H
_WM_ENABLE EQU 0aH
_WM_SETREDRAW EQU 0bH
_WM_SETTEXT EQU 0cH
_WM_GETTEXT EQU 0dH
_WM_GETTEXTLENGTH EQU 0eH
_WM_PAINT EQU 0fH
_WM_CLOSE EQU 10H
_WM_QUERYENDSESSION EQU 11H
_WM_QUIT EQU 12H
_WM_QUERYOPEN EQU 13H
_WM_ERASEBKGND EQU 14H
_WM_SYSCOLORCHANGE EQU 15H
_WM_ENDSESSION EQU 16H
_WM_SYSTEMERROR EQU 17H
_WM_SHOWWINDOW EQU 18H
_WM_CTLCOLOR EQU 19H
_WM_WININICHANGE EQU 1aH
_WM_DEVMODECHANGE EQU 1bH
_WM_ACTIVATEAPP EQU 1cH
_WM_FONTCHANGE EQU 1dH
_WM_TIMECHANGE EQU 1eH
_WM_CANCELMODE EQU 1fH
_WM_SETCURSOR EQU 20H
_WM_MOUSEACTIVATE EQU 21H
_WM_CHILDACTIVATE EQU 22H
_WM_QUEUESYNC EQU 23H
_WM_GETMINMAXINFO EQU 24H
_WM_LOGOFF EQU 25H
_WM_PAINTICON EQU 26H
_WM_ICONERASEBKGND EQU 27H
_WM_NEXTDLGCTL EQU 28H
_WM_ALTTABACTIVE EQU 29H
_WM_SPOOLERSTATUS EQU 2aH
_WM_DRAWITEM EQU 2bH
_WM_MEASUREITEM EQU 2cH
_WM_DELETEITEM EQU 2dH
_WM_VKEYTOITEM EQU 2eH
_WM_CHARTOITEM EQU 2fH
_WM_SETFONT EQU 30H
_WM_GETFONT EQU 31H
_WM_SETHOTKEY EQU 32H
_WM_GETHOTKEY EQU 33H
_WM_SHELLNOTIFY EQU 34H
_WM_ISACTIVEICON EQU 35H
_WM_QUERYPARKICON EQU 36H
_WM_QUERYDRAGICON EQU 37H
_WM_WINHELP EQU 38H
_WM_COMPAREITEM EQU 39H
_WM_FULLSCREEN EQU 3aH
_WM_CLIENTSHUTDOWN EQU 3bH
_WM_DDEMLEVENT EQU 3cH
_WM_GETOBJECT EQU 3dH
_WM_undefined_1 EQU 3eH
_WM_undefined_2 EQU 3fH
_WM_TESTING EQU 40H
_WM_COMPACTING EQU 41H
_WM_OTHERWINDOWCREATED EQU 42H
_WM_OTHERWINDOWDESTROYED EQU 43H


My "map" file (you can see how this would be used):

$cd2txt STRUCT
  cd DD ?
  txt DD ?
$cd2txt ENDS


$cd2txt <_WM_NULL, WM_NULLstr>
$cd2txt <_WM_CREATE, WM_CREATEstr>
$cd2txt <_WM_DESTROY, WM_DESTROYstr>
$cd2txt <_WM_MOVE, WM_MOVEstr>
$cd2txt <_WM_SIZEWAIT, WM_SIZEWAITstr>
$cd2txt <_WM_SIZE, WM_SIZEstr>
$cd2txt <_WM_ACTIVATE, WM_ACTIVATEstr>
$cd2txt <_WM_SETFOCUS, WM_SETFOCUSstr>
$cd2txt <_WM_KILLFOCUS, WM_KILLFOCUSstr>
$cd2txt <_WM_SETVISIBLE, WM_SETVISIBLEstr>
$cd2txt <_WM_ENABLE, WM_ENABLEstr>
$cd2txt <_WM_SETREDRAW, WM_SETREDRAWstr>
$cd2txt <_WM_SETTEXT, WM_SETTEXTstr>
$cd2txt <_WM_GETTEXT, WM_GETTEXTstr>
$cd2txt <_WM_GETTEXTLENGTH, WM_GETTEXTLENGTHstr>
$cd2txt <_WM_PAINT, WM_PAINTstr>
$cd2txt <_WM_CLOSE, WM_CLOSEstr>
$cd2txt <_WM_QUERYENDSESSION, WM_QUERYENDSESSIONstr>
$cd2txt <_WM_QUIT, WM_QUITstr>
$cd2txt <_WM_QUERYOPEN, WM_QUERYOPENstr>
$cd2txt <_WM_ERASEBKGND, WM_ERASEBKGNDstr>
$cd2txt <_WM_SYSCOLORCHANGE, WM_SYSCOLORCHANGEstr>
$cd2txt <_WM_ENDSESSION, WM_ENDSESSIONstr>
$cd2txt <_WM_SYSTEMERROR, WM_SYSTEMERRORstr>
$cd2txt <_WM_SHOWWINDOW, WM_SHOWWINDOWstr>
$cd2txt <_WM_CTLCOLOR, WM_CTLCOLORstr>
$cd2txt <_WM_WININICHANGE, WM_WININICHANGEstr>
$cd2txt <_WM_DEVMODECHANGE, WM_DEVMODECHANGEstr>
$cd2txt <_WM_ACTIVATEAPP, WM_ACTIVATEAPPstr>
$cd2txt <_WM_FONTCHANGE, WM_FONTCHANGEstr>
$cd2txt <_WM_TIMECHANGE, WM_TIMECHANGEstr>
$cd2txt <_WM_CANCELMODE, WM_CANCELMODEstr>
$cd2txt <_WM_SETCURSOR, WM_SETCURSORstr>
$cd2txt <_WM_MOUSEACTIVATE, WM_MOUSEACTIVATEstr>
$cd2txt <_WM_CHILDACTIVATE, WM_CHILDACTIVATEstr>
$cd2txt <_WM_QUEUESYNC, WM_QUEUESYNCstr>
$cd2txt <_WM_GETMINMAXINFO, WM_GETMINMAXINFOstr>
$cd2txt <_WM_LOGOFF, WM_LOGOFFstr>
$cd2txt <_WM_PAINTICON, WM_PAINTICONstr>
$cd2txt <_WM_ICONERASEBKGND, WM_ICONERASEBKGNDstr>
$cd2txt <_WM_NEXTDLGCTL, WM_NEXTDLGCTLstr>
$cd2txt <_WM_ALTTABACTIVE, WM_ALTTABACTIVEstr>
$cd2txt <_WM_SPOOLERSTATUS, WM_SPOOLERSTATUSstr>
$cd2txt <_WM_DRAWITEM, WM_DRAWITEMstr>
$cd2txt <_WM_MEASUREITEM, WM_MEASUREITEMstr>
$cd2txt <_WM_DELETEITEM, WM_DELETEITEMstr>
$cd2txt <_WM_VKEYTOITEM, WM_VKEYTOITEMstr>
$cd2txt <_WM_CHARTOITEM, WM_CHARTOITEMstr>
$cd2txt <_WM_SETFONT, WM_SETFONTstr>
$cd2txt <_WM_GETFONT, WM_GETFONTstr>
$cd2txt <_WM_SETHOTKEY, WM_SETHOTKEYstr>
$cd2txt <_WM_GETHOTKEY, WM_GETHOTKEYstr>
$cd2txt <_WM_SHELLNOTIFY, WM_SHELLNOTIFYstr>
$cd2txt <_WM_ISACTIVEICON, WM_ISACTIVEICONstr>
$cd2txt <_WM_QUERYPARKICON, WM_QUERYPARKICONstr>
$cd2txt <_WM_QUERYDRAGICON, WM_QUERYDRAGICONstr>
$cd2txt <_WM_WINHELP, WM_WINHELPstr>
$cd2txt <_WM_COMPAREITEM, WM_COMPAREITEMstr>
$cd2txt <_WM_FULLSCREEN, WM_FULLSCREENstr>
$cd2txt <_WM_CLIENTSHUTDOWN, WM_CLIENTSHUTDOWNstr>
$cd2txt <_WM_DDEMLEVENT, WM_DDEMLEVENTstr>
$cd2txt <_WM_GETOBJECT, WM_GETOBJECTstr>
$cd2txt <_WM_undefined_1, WM_undefined_1str>
$cd2txt <_WM_undefined_2, WM_undefined_2str>
$cd2txt <_WM_TESTING, WM_TESTINGstr>
$cd2txt <_WM_COMPACTING, WM_COMPACTINGstr>
$cd2txt <_WM_OTHERWINDOWCREATED, WM_OTHERWINDOWCREATEDstr>
$cd2txt <_WM_OTHERWINDOWDESTROYED, WM_OTHERWINDOWDESTROYEDstr>
$cd2txt <_WM_COMMNOTIFY, WM_COMMNOTIFYstr>
$cd2txt <_WM_undefined_3, WM_undefined_3str>
$cd2txt <_WM_WINDOWPOSCHANGING, WM_WINDOWPOSCHANGINGstr>
$cd2txt <_WM_WINDOWPOSCHANGED, WM_WINDOWPOSCHANGEDstr>
$cd2txt <_WM_POWER, WM_POWERstr>
$cd2txt <_WM_COPYGLOBALDATA, WM_COPYGLOBALDATAstr>
$cd2txt <_WM_COPYDATA, WM_COPYDATAstr>
$cd2txt <_WM_CANCELJOURNAL, WM_CANCELJOURNALstr>
$cd2txt <_WM_undefined_4, WM_undefined_4str>
$cd2txt <_WM_KEYF1, WM_KEYF1str>
$cd2txt <_WM_NOTIFY, WM_NOTIFYstr>
$cd2txt <_WM_ACCESS_WINDOW, WM_ACCESS_WINDOWstr>
$cd2txt <_WM_INPUTLANGCHANGEREQUEST, WM_INPUTLANGCHANGEREQUESTstr>
$cd2txt <_WM_INPUTLANGCHANGE, WM_INPUTLANGCHANGEstr>
$cd2txt <_WM_TCARD, WM_TCARDstr>
$cd2txt <_WM_HELP, WM_HELPstr>
$cd2txt <_WM_USERCHANGED, WM_USERCHANGEDstr>
$cd2txt <_WM_NOTIFYFORMAT, WM_NOTIFYFORMATstr>
$cd2txt <_WM_undefined_5, WM_undefined_5str>
$cd2txt <_WM_undefined_6, WM_undefined_6str>
$cd2txt <_WM_undefined_7, WM_undefined_7str>
$cd2txt <_WM_undefined_8, WM_undefined_8str>
$cd2txt <_WM_undefined_9, WM_undefined_9str>
$cd2txt <_WM_undefined_10, WM_undefined_10str>
$cd2txt <_WM_undefined_11, WM_undefined_11str>
$cd2txt <_WM_undefined_12, WM_undefined_12str>
$cd2txt <_WM_undefined_13, WM_undefined_13str>


and finally the heap o'strings for the mapper:

WM_NULLstr DB "WM_NULL", 0
WM_CREATEstr DB "WM_CREATE", 0
WM_DESTROYstr DB "WM_DESTROY", 0
WM_MOVEstr DB "WM_MOVE", 0
WM_SIZEWAITstr DB "WM_SIZEWAIT", 0
WM_SIZEstr DB "WM_SIZE", 0
WM_ACTIVATEstr DB "WM_ACTIVATE", 0
WM_SETFOCUSstr DB "WM_SETFOCUS", 0
WM_KILLFOCUSstr DB "WM_KILLFOCUS", 0
WM_SETVISIBLEstr DB "WM_SETVISIBLE", 0
WM_ENABLEstr DB "WM_ENABLE", 0
WM_SETREDRAWstr DB "WM_SETREDRAW", 0
WM_SETTEXTstr DB "WM_SETTEXT", 0
WM_GETTEXTstr DB "WM_GETTEXT", 0
WM_GETTEXTLENGTHstr DB "WM_GETTEXTLENGTH", 0
WM_PAINTstr DB "WM_PAINT", 0
WM_CLOSEstr DB "WM_CLOSE", 0
WM_QUERYENDSESSIONstr DB "WM_QUERYENDSESSION", 0
WM_QUITstr DB "WM_QUIT", 0
WM_QUERYOPENstr DB "WM_QUERYOPEN", 0
WM_ERASEBKGNDstr DB "WM_ERASEBKGND", 0
WM_SYSCOLORCHANGEstr DB "WM_SYSCOLORCHANGE", 0
WM_ENDSESSIONstr DB "WM_ENDSESSION", 0
WM_SYSTEMERRORstr DB "WM_SYSTEMERROR", 0
WM_SHOWWINDOWstr DB "WM_SHOWWINDOW", 0
WM_CTLCOLORstr DB "WM_CTLCOLOR", 0
WM_WININICHANGEstr DB "WM_WININICHANGE", 0
WM_DEVMODECHANGEstr DB "WM_DEVMODECHANGE", 0
WM_ACTIVATEAPPstr DB "WM_ACTIVATEAPP", 0
WM_FONTCHANGEstr DB "WM_FONTCHANGE", 0
WM_TIMECHANGEstr DB "WM_TIMECHANGE", 0
WM_CANCELMODEstr DB "WM_CANCELMODE", 0
WM_SETCURSORstr DB "WM_SETCURSOR", 0
WM_MOUSEACTIVATEstr DB "WM_MOUSEACTIVATE", 0
WM_CHILDACTIVATEstr DB "WM_CHILDACTIVATE", 0
WM_QUEUESYNCstr DB "WM_QUEUESYNC", 0
WM_GETMINMAXINFOstr DB "WM_GETMINMAXINFO", 0
WM_LOGOFFstr DB "WM_LOGOFF", 0
WM_PAINTICONstr DB "WM_PAINTICON", 0
WM_ICONERASEBKGNDstr DB "WM_ICONERASEBKGND", 0
WM_NEXTDLGCTLstr DB "WM_NEXTDLGCTL", 0
WM_ALTTABACTIVEstr DB "WM_ALTTABACTIVE", 0
WM_SPOOLERSTATUSstr DB "WM_SPOOLERSTATUS", 0
WM_DRAWITEMstr DB "WM_DRAWITEM", 0
WM_MEASUREITEMstr DB "WM_MEASUREITEM", 0
WM_DELETEITEMstr DB "WM_DELETEITEM", 0
WM_VKEYTOITEMstr DB "WM_VKEYTOITEM", 0
WM_CHARTOITEMstr DB "WM_CHARTOITEM", 0
WM_SETFONTstr DB "WM_SETFONT", 0
WM_GETFONTstr DB "WM_GETFONT", 0
WM_SETHOTKEYstr DB "WM_SETHOTKEY", 0
WM_GETHOTKEYstr DB "WM_GETHOTKEY", 0
WM_SHELLNOTIFYstr DB "WM_SHELLNOTIFY", 0
WM_ISACTIVEICONstr DB "WM_ISACTIVEICON", 0
WM_QUERYPARKICONstr DB "WM_QUERYPARKICON", 0
WM_QUERYDRAGICONstr DB "WM_QUERYDRAGICON", 0
WM_WINHELPstr DB "WM_WINHELP", 0
WM_COMPAREITEMstr DB "WM_COMPAREITEM", 0
WM_FULLSCREENstr DB "WM_FULLSCREEN", 0
WM_CLIENTSHUTDOWNstr DB "WM_CLIENTSHUTDOWN", 0
WM_DDEMLEVENTstr DB "WM_DDEMLEVENT", 0


Complete files attached below.
Assembly language programming should be fun. That's why I do it.

hutch--

Share this piece of genius with us, what do you expect to achieve by remapping very well known equates to a form that is not backed by Microsoft documentation ?

In MASM and almost all other languages, a WM_COMMAND still looks like any other WM_COMMAND, same goes for any of the large number of system defined messages. If you find any messages that are not defined, add them to the collection.

    WM_WHATEVER equ <0HEXh>

If you need to define private messages, there is an API to do that so you can use the HWND_BROADCAST message handle for inter app communication.

this -> #define WM_UAHDESTROYWINDOW 0x9
    becomes
    WM_UAHDESTROYWINDOW equ <09h>

with no reason for the remapping.

NoCforMe

The mapping (not a remapping) is strictly for private debugging purposes. Changing the identity of the messages (from WM_xxxx to _WM_xxxx) simply allows me to put them into a lookup table for my own use. I'm not reinventing any wheels here, believe me.

But I was suggesting that somebody (some unnamed individual) might put the missing WM_xxxx messages into the MASM32 windows.inc file. They could simply strip off my leading underscores. That would be useful for everybody. I don't think that's my job here.
Assembly language programming should be fun. That's why I do it.

jj2007

Proud owners of a MasmBasic installation may have a look at

\Masm32\MasmBasic\Res\Wm_Keys.dat
\Masm32\MasmBasic\Res\WM_Names.txt

The keys file contains DWORDs with the WM_* value. Combine them with the text file to get
00040000 WM_USER
00000000 WM_NULL
01000000 WM_CREATE

etc.

The purpose of these files is to monitor WM_* messages (see attached example) with the deb macro, as in
WndProc proc uses esi edi ebx hWnd, uMsg, wParam:WPARAM, lParam:LPARAM
  inc msgCount
  deb 4, "msg", chg:msgCount

msg     1       WM_NULL
msg     2       WM_GETMINMAXINFO
msg     3       WM_NCCREATE
msg     4       WM_NCCALCSIZE
msg     5       WM_CREATE
msg     6       WM_WINDOWPOSCHANGING
msg     7       WM_NCCALCSIZE
msg     8       WM_WINDOWPOSCHANGED
msg     9       WM_MOVE
msg     10      WM_SIZE
msg     11      WM_PARENTNOTIFY
msg     12      WM_WINDOWPOSCHANGING
msg     13      WM_ACTIVATEAPP
msg     14      WM_NCACTIVATE
msg     15      WM_ACTIVATE
msg     16      WM_IME_SETCONTEXT
msg     17      WM_IME_NOTIFY
msg     18      WM_SETFOCUS
msg     19      WM_KILLFOCUS
msg     20      WM_IME_SETCONTEXT
msg     21      WM_COMMAND: 0000004Dh   ID 9172
msg     22      WM_NOTIFYFORMAT
msg     23      WM_QUERYUISTATE
msg     24      WM_NOTIFYFORMAT
msg     25      WM_SHOWWINDOW
msg     26      WM_WINDOWPOSCHANGING
msg     27      WM_NCPAINT
msg     28      WM_GETTEXT
msg     29      WM_ERASEBKGND
msg     30      WM_WINDOWPOSCHANGED
msg     31      WM_SIZE
msg     35      WM_MOVE
msg     36      WM_PAINT
msg     37      WM_CTLCOLOREDIT
msg     41      WM_CTLCOLOREDIT
...


So, in short, NoCforMe: you have reinvented the wheel, but you have done a nice job, compliments :thumbsup:

Your collection is probably more complete than mine. There is another collection here, with over 700 messages, and there is the option to extract everything from a set of Visual Crap header files.

NoCforMe

Quote from: jj2007 on July 09, 2022, 07:04:52 PM
So, in short, NoCforMe: you have reinvented the wheel, but you have done a nice job, compliments :thumbsup:

Your collection is probably more complete than mine. There is another collection here, with over 700 messages, and there is the option to extract everything from a set of Visual Crap header files.

Wow. So now we have competing lists of WM_xxxx messages. My list came from that link that Greenhorn posted below (http://blog.airesoft.co.uk/2009/11/wm_messages/), which ends at 0x3ff. The one you just posted goes all the way to 0xcccd!

One question is how do we know how much of this stuff is authentic? It looks like internal info, perhaps smuggled out of Redmond.

Assuming it's the real deal, let me make my suggestion explicit: It sure would be nice if someone could incorporate many, most if not all of these values into our beloved windows.inc file here. Yes, I know it's a lot of work, but it sure would be helpful to a lot of us.

And just to clear things up, the reason I created my own list of values using _WM_xxxx names is that I couldn't use the real names (WM_xxxx) without conflicting with those already defined in windows.inc, and I wasn't about to go through the two lists and add the ones that were missing (because life is too short).

And just to show how trivial it is to convert my idiosyncratic names to the "real" ones, here's part of the file I posted above that I reformatted in Notepad:


WM_NULL EQU 0H
WM_CREATE EQU 01H
WM_DESTROY EQU 02H
WM_MOVE EQU 03H
WM_SIZEWAIT EQU 04H
WM_SIZE EQU 05H
WM_ACTIVATE EQU 06H
WM_SETFOCUS EQU 07H
WM_KILLFOCUS EQU 08H
WM_SETVISIBLE EQU 09H
WM_ENABLE EQU 0aH
WM_SETREDRAW EQU 0bH
WM_SETTEXT EQU 0cH
WM_GETTEXT EQU 0dH
WM_GETTEXTLENGTH EQU 0eH
WM_PAINT EQU 0fH
WM_CLOSE EQU 10H
WM_QUERYENDSESSION EQU 11H
WM_QUIT EQU 12H
WM_QUERYOPEN EQU 13H
WM_ERASEBKGND EQU 14H
WM_SYSCOLORCHANGE EQU 15H
WM_ENDSESSION EQU 16H
WM_SYSTEMERROR EQU 17H
WM_SHOWWINDOW EQU 18H
WM_CTLCOLOR EQU 19H
WM_WININICHANGE EQU 1aH
WM_DEVMODECHANGE EQU 1bH
WM_ACTIVATEAPP EQU 1cH
WM_FONTCHANGE EQU 1dH
WM_TIMECHANGE EQU 1eH
WM_CANCELMODE EQU 1fH
WM_SETCURSOR EQU 20H
WM_MOUSEACTIVATE EQU 21H
WM_CHILDACTIVATE EQU 22H
WM_QUEUESYNC EQU 23H
WM_GETMINMAXINFO EQU 24H
WM_LOGOFF EQU 25H
WM_PAINTICON EQU 26H
WM_ICONERASEBKGND EQU 27H
WM_NEXTDLGCTL EQU 28H
WM_ALTTABACTIVE EQU 29H
WM_SPOOLERSTATUS EQU 2aH
WM_DRAWITEM EQU 2bH
WM_MEASUREITEM EQU 2cH
WM_DELETEITEM EQU 2dH
WM_VKEYTOITEM EQU 2eH
WM_CHARTOITEM EQU 2fH
WM_SETFONT EQU 30H


Assembly language programming should be fun. That's why I do it.

hutch--

You are actually using an equate list, not a look up table. A FAST lookup table is done with an array and an array of pointers to the first array members and done this way you can use the documented names and get some real speed out of the lookup, especially if you split the names alphabetically.

NoCforMe

Well, it is a lookup table, just not a fast one. Sheesh. (Not that list, but the one I posted earlier with my $cd2txt structure, which was explicitly created to look up WM_xxxx messages and deliver the matching text string.)
Assembly language programming should be fun. That's why I do it.