The MASM Forum Archive 2004 to 2012

Project Support Forums => IDE Development and Support => Easy Code => Topic started by: Maelstrom on July 01, 2005, 04:11:52 PM

Title: Correct syntax error/ bug
Post by: Maelstrom on July 01, 2005, 04:11:52 PM
Just thought I would let someone know about a capitalization bug I ran across (syntax autofix).


wc    WNDCLASSEX    <SizeOf WNDCLASSEX,    \; cbSize
                    0,                     \; style
                    Offset WNDPROC,        \; lpfnWndProc


The editor will force WndProc to be capitalized which causes the EXE to crash...
Main callback declared as below:


WndProc Proc Private Uses Ebx Edi Esi hWnd:HWND, uMsg:ULONG, wParam:WPARAM, lParam:LPARAM
        .If uMsg == WM_CREATE
            Return 0
        .ElseIf uMsg == WM_DESTROY
            Invoke PostQuitMessage, 0
            Return 0
        .EndIf
        Invoke DefWindowProc, hWnd, uMsg, wParam, lParam
        Ret
WndProc EndP


I think I could disable this from the option settings but I like this feature :snooty:.  Makes the code more consistant.  I already have a work around so its no big deal... placing Mov wc.lpfnWndProc, Offset WndProc in the code section corrects the mistake and it does correctly make the change.

:U
Title: Re: Correct syntax error/ bug
Post by: Ramon Sala on July 02, 2005, 08:41:10 AM
Hi Maelstrom,

Well, as you say the feature can be disabled but, if you like it (I do), you can press the <F12> key after writing a line and before changing to another. That way the line remains unchanged and the problem is solved.

Ramon