Changeset 819 for trunk/src


Ignore:
Timestamp:
Sep 4, 1999, 7:56:41 PM (26 years ago)
Author:
dengert
Message:

begin DAXifying windows

Location:
trunk/src/user32/new
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/new/makefile

    r760 r819  
    1 # $Id: makefile,v 1.40 1999-08-31 17:14:51 sandervl Exp $
     1# $Id: makefile,v 1.41 1999-09-04 17:56:40 dengert Exp $
    22
    33#
     
    102102pmwindow.obj:   pmwindow.cpp win32class.h win32wbase.h win32dlg.h pmwindow.h win32wndchild.h $(PDWIN32_INCLUDE)\wprocess.h oslibgdi.h oslibwin.h
    103103win32class.obj: win32class.cpp win32class.h win32wbase.h win32dlg.h gen_object.h heapshared.h oslibwin.h win32wndchild.h
    104 win32wbase.obj:   win32wbase.cpp win32class.h win32wbase.h win32dlg.h gen_object.h heapshared.h oslibwin.h win32wndchild.h  $(PDWIN32_INCLUDE)\winres.h oslibres.h win32wndhandle.h oslibdos.h
     104win32wbase.obj:   win32wbase.cpp win32class.h win32wbase.h win32dlg.h gen_object.h heapshared.h oslibwin.h win32wndchild.h  $(PDWIN32_INCLUDE)\winres.h oslibres.h win32wndhandle.h oslibdos.h open32wbase.h
    105105win32wnd.obj:   win32wnd.cpp win32class.h win32wbase.h win32wnd.h win32dlg.h gen_object.h heapshared.h oslibwin.h win32wndchild.h  $(PDWIN32_INCLUDE)\winres.h oslibres.h win32wndhandle.h oslibdos.h oslibmenu.h
    106106win32dlg.obj:   win32dlg.cpp win32class.h win32wbase.h win32dlg.h gen_object.h heapshared.h oslibwin.h win32wndchild.h
  • trunk/src/user32/new/pmwindow.cpp

    r741 r819  
    1 /* $Id: pmwindow.cpp,v 1.26 1999-08-30 11:59:53 sandervl Exp $ */
     1/* $Id: pmwindow.cpp,v 1.27 1999-09-04 17:56:40 dengert Exp $ */
    22/*
    33 * Win32 Window Managment Code for OS/2
     
    131131    case WM_CLOSE:
    132132        dprintf(("OS2: WM_CLOSE %x", hwnd));
     133        win32wnd->RemoveFakeOpen32();
    133134        if(win32wnd->MsgClose()) {
    134135                goto RunDefWndProc;
  • trunk/src/user32/new/user32.def

    r729 r819  
    1 ; $Id: user32.def,v 1.6 1999-08-28 19:32:46 sandervl Exp $
     1; $Id: user32.def,v 1.7 1999-09-04 17:56:40 dengert Exp $
    22
    33;Created by BLAST for IBM's compiler
     
    99   _GLOBALDATA CLASS 'DATA'       SHARED LOADONCALL READWRITE
    1010
     11IMPORTS
     12    WinQueryDAXData            = PMMERGE.5447
     13    WinSetDAXData              = PMMERGE.5448
     14
    1115EXPORTS
    1216    ActivateKeyboardLayout     = _ActivateKeyboardLayout@8    @1
    13     AdjustWindowRect           = _AdjustWindowRect@12         @2
    14     AdjustWindowRectEx         = _AdjustWindowRectEx@16       @3
    15     AnyPopup                   = _AnyPopup@0                  @4
    16     AppendMenuA                = _AppendMenuA@16              @5
    17     AppendMenuW                = _AppendMenuW@16              @6
     17    AdjustWindowRect           = _AdjustWindowRect@12         @2
     18    AdjustWindowRectEx         = _AdjustWindowRectEx@16       @3
     19    AnyPopup                   = _AnyPopup@0                  @4
     20    AppendMenuA                = _AppendMenuA@16              @5
     21    AppendMenuW                = _AppendMenuW@16              @6
    1822    ArrangeIconicWindows       = _ArrangeIconicWindows@4      @7
    19     AttachThreadInput          = _AttachThreadInput@12        @8
     23    AttachThreadInput          = _AttachThreadInput@12        @8
    2024    BeginDeferWindowPos        = _BeginDeferWindowPos@4       @9
    21     BeginPaint                 = _BeginPaint@8                @10
    22     BringWindowToTop           = _BringWindowToTop@4          @11
     25    BeginPaint                 = _BeginPaint@8                @10
     26    BringWindowToTop           = _BringWindowToTop@4          @11
    2327    BroadcastSystemMessage     = _BroadcastSystemMessage@20   @12
    24 ;    CalcChildScroll            = _CalcChildScroll@??         @13
    25     CallMsgFilter              = _CallMsgFilterA@8           @14
    26     CallMsgFilterA             = _CallMsgFilterA@8           @15
    27     CallMsgFilterW             = _CallMsgFilterW@8           @16
    28     CallNextHookEx             = _CallNextHookEx@16          @17
    29     CallWindowProcA            = _CallWindowProcA@20         @18
    30     CallWindowProcW            = _CallWindowProcW@20         @19
     28;    CalcChildScroll            = _CalcChildScroll@??         @13
     29    CallMsgFilter              = _CallMsgFilterA@8           @14
     30    CallMsgFilterA             = _CallMsgFilterA@8           @15
     31    CallMsgFilterW             = _CallMsgFilterW@8           @16
     32    CallNextHookEx             = _CallNextHookEx@16          @17
     33    CallWindowProcA            = _CallWindowProcA@20         @18
     34    CallWindowProcW            = _CallWindowProcW@20         @19
    3135    CascadeChildWindows        = _CascadeChildWindows@8      @20
    32     CascadeWindows             = _CascadeWindows@20          @21
     36    CascadeWindows             = _CascadeWindows@20          @21
    3337    ChangeClipboardChain       = _ChangeClipboardChain@8     @22
    3438    ChangeDisplaySettingsA     = _ChangeDisplaySettingsA@8   @23
    3539    ChangeDisplaySettingsW     = _ChangeDisplaySettingsW@8   @24
    36     ChangeMenuA                = _ChangeMenuA@20             @25
    37     ChangeMenuW                = _ChangeMenuW@20             @26
    38     CharLowerA                 = _CharLowerA@4               @27
    39     CharLowerBuffA             = _CharLowerBuffA@8           @28
    40     CharLowerBuffW             = _CharLowerBuffW@8           @29
    41     CharLowerW                 = _CharLowerW@4               @30
    42     CharNextA                  = _CharNextA@4                @31
    43     CharNextExA                = _CharNextExA@12             @32
    44     CharNextExW                = _CharNextExW@12             @33
    45     CharNextW                  = _CharNextW@4                @34
    46     CharPrevA                  = _CharPrevA@8                @35
    47     CharPrevExA                = _CharPrevExA@16             @36
    48     CharPrevExW                = _CharPrevExW@16             @37
    49     CharPrevW                  = _CharPrevW@8                @38
    50     CharToOemA                 = _CharToOemA@8               @39
    51     CharToOemBuffA             = _CharToOemBuffA@12          @40
    52     CharToOemBuffW             = _CharToOemBuffW@12          @41
    53     CharToOemW                 = _CharToOemW@8              @42
    54     CharUpperA                 = _CharUpperA@4              @43
    55     CharUpperBuffA             = _CharUpperBuffA@8          @44
    56     CharUpperBuffW             = _CharUpperBuffW@8          @45
    57     CharUpperW                 = _CharUpperW@4              @46
    58     CheckDlgButton             = _CheckDlgButton@12          @47
    59     CheckMenuItem              = _CheckMenuItem@12           @48
    60     CheckMenuRadioItem         = _CheckMenuRadioItem@20      @49
    61     CheckRadioButton           = _CheckRadioButton@16        @50
     40    ChangeMenuA                = _ChangeMenuA@20             @25
     41    ChangeMenuW                = _ChangeMenuW@20             @26
     42    CharLowerA                 = _CharLowerA@4               @27
     43    CharLowerBuffA             = _CharLowerBuffA@8           @28
     44    CharLowerBuffW             = _CharLowerBuffW@8           @29
     45    CharLowerW                 = _CharLowerW@4               @30
     46    CharNextA                  = _CharNextA@4                @31
     47    CharNextExA                = _CharNextExA@12             @32
     48    CharNextExW                = _CharNextExW@12             @33
     49    CharNextW                  = _CharNextW@4                @34
     50    CharPrevA                  = _CharPrevA@8                @35
     51    CharPrevExA                = _CharPrevExA@16             @36
     52    CharPrevExW                = _CharPrevExW@16             @37
     53    CharPrevW                  = _CharPrevW@8                @38
     54    CharToOemA                 = _CharToOemA@8               @39
     55    CharToOemBuffA             = _CharToOemBuffA@12          @40
     56    CharToOemBuffW             = _CharToOemBuffW@12          @41
     57    CharToOemW                 = _CharToOemW@8              @42
     58    CharUpperA                 = _CharUpperA@4              @43
     59    CharUpperBuffA             = _CharUpperBuffA@8          @44
     60    CharUpperBuffW             = _CharUpperBuffW@8          @45
     61    CharUpperW                 = _CharUpperW@4              @46
     62    CheckDlgButton             = _CheckDlgButton@12          @47
     63    CheckMenuItem              = _CheckMenuItem@12           @48
     64    CheckMenuRadioItem         = _CheckMenuRadioItem@20      @49
     65    CheckRadioButton           = _CheckRadioButton@16        @50
    6266    ChildWindowFromPoint       = _ChildWindowFromPoint@12    @51
    6367    ChildWindowFromPointEx     = _ChildWindowFromPointEx@16  @52
    64 ;    ClientThreadConnect        = _ClientThreadConnect@??     @53
    65     ClientToScreen             = _ClientToScreen@8           @54
    66     ClipCursor                 = _ClipCursor@4              @55
    67     CloseClipboard             = _CloseClipboard@0           @56
    68     CloseDesktop               = _CloseDesktop@4             @57
    69     CloseWindow                = _CloseWindow@4              @58
    70     CloseWindowStation         = _CloseWindowStation@4       @59
     68;    ClientThreadConnect        = _ClientThreadConnect@??     @53
     69    ClientToScreen             = _ClientToScreen@8           @54
     70    ClipCursor                 = _ClipCursor@4              @55
     71    CloseClipboard             = _CloseClipboard@0           @56
     72    CloseDesktop               = _CloseDesktop@4             @57
     73    CloseWindow                = _CloseWindow@4              @58
     74    CloseWindowStation         = _CloseWindowStation@4       @59
    7175    CopyAcceleratorTableA      = _CopyAcceleratorTableA@12   @60
    7276    CopyAcceleratorTableW      = _CopyAcceleratorTableW@12   @61
    73     CopyIcon                   = _CopyIcon@4                 @62
    74     CopyImage                  = _CopyImage@20               @63
    75     CopyRect                   = _CopyRect@8                 @64
     77    CopyIcon                   = _CopyIcon@4                 @62
     78    CopyImage                  = _CopyImage@20               @63
     79    CopyRect                   = _CopyRect@8                 @64
    7680    CountClipboardFormats      = _CountClipboardFormats@0    @65
    7781    CreateAcceleratorTableA    = _CreateAcceleratorTableA@8  @66
    7882    CreateAcceleratorTableW    = _CreateAcceleratorTableW@8  @67
    79     CreateCaret                = _CreateCaret@16             @68
    80     CreateCursor               = _CreateCursor@28            @69
    81     CreateDesktopA             = _CreateDesktopA@24          @70
    82     CreateDesktopW             = _CreateDesktopW@24          @71
    83     CreateDialogIndirectParamA  = _CreateDialogIndirectParamA@20 @72
    84     CreateDialogIndirectParamW  = _CreateDialogIndirectParamW@20 @73
    85     CreateDialogParamA         = _CreateDialogParamA@20      @74
    86     CreateDialogParamW         = _CreateDialogParamW@20      @75
    87     CreateIcon                 = _CreateIcon@28              @76
     83    CreateCaret                = _CreateCaret@16             @68
     84    CreateCursor               = _CreateCursor@28            @69
     85    CreateDesktopA             = _CreateDesktopA@24          @70
     86    CreateDesktopW             = _CreateDesktopW@24          @71
     87    CreateDialogIndirectParamA  = _CreateDialogIndirectParamA@20 @72
     88    CreateDialogIndirectParamW  = _CreateDialogIndirectParamW@20 @73
     89    CreateDialogParamA         = _CreateDialogParamA@20      @74
     90    CreateDialogParamW         = _CreateDialogParamW@20      @75
     91    CreateIcon                 = _CreateIcon@28              @76
    8892    CreateIconFromResource     = _CreateIconFromResource@16  @77
    8993    CreateIconFromResourceEx   = _CreateIconFromResourceEx@28 @78
    90     CreateIconIndirect         = _CreateIconIndirect@4       @79
    91     CreateMDIWindowA           = _CreateMDIWindowA@40        @80
    92     CreateMDIWindowW           = _CreateMDIWindowW@40        @81
    93     CreateMenu                 = _CreateMenu@0               @82
    94     CreatePopupMenu            = _CreatePopupMenu@0          @83
    95     CreateWindowExA            = _CreateWindowExA@48         @84
    96     CreateWindowExW            = _CreateWindowExW@48         @85
     94    CreateIconIndirect         = _CreateIconIndirect@4       @79
     95    CreateMDIWindowA           = _CreateMDIWindowA@40        @80
     96    CreateMDIWindowW           = _CreateMDIWindowW@40        @81
     97    CreateMenu                 = _CreateMenu@0               @82
     98    CreatePopupMenu            = _CreatePopupMenu@0          @83
     99    CreateWindowExA            = _CreateWindowExA@48         @84
     100    CreateWindowExW            = _CreateWindowExW@48         @85
    97101    CreateWindowStationA       = _CreateWindowStationA@16    @86
    98102    CreateWindowStationW       = _CreateWindowStationW@16    @87
    99103    DdeAbandonTransaction      = _DdeAbandonTransaction@12   @88
    100     DdeAccessData              = _DdeAccessData@8            @89
    101     DdeAddData                 = _DdeAddData@16              @90
     104    DdeAccessData              = _DdeAccessData@8            @89
     105    DdeAddData                 = _DdeAddData@16              @90
    102106    DdeClientTransaction       = _DdeClientTransaction@32    @91
    103107    DdeCmpStringHandles        = _DdeCmpStringHandles@8      @92
    104     DdeConnect                 = _DdeConnect@16              @93
    105     DdeConnectList             = _DdeConnectList@20          @94
     108    DdeConnect                 = _DdeConnect@16              @93
     109    DdeConnectList             = _DdeConnectList@20          @94
    106110    DdeCreateDataHandle        = _DdeCreateDataHandle@28     @95
    107111    DdeCreateStringHandleA     = _DdeCreateStringHandleA@12  @96
    108112    DdeCreateStringHandleW     = _DdeCreateStringHandleW@12  @97
    109     DdeDisconnect              = _DdeDisconnect@4            @98
    110     DdeDisconnectList          = _DdeDisconnectList@4        @99
    111     DdeEnableCallback          = _DdeEnableCallback@12       @100
    112     DdeFreeDataHandle          = _DdeFreeDataHandle@4        @101
     113    DdeDisconnect              = _DdeDisconnect@4            @98
     114    DdeDisconnectList          = _DdeDisconnectList@4        @99
     115    DdeEnableCallback          = _DdeEnableCallback@12       @100
     116    DdeFreeDataHandle          = _DdeFreeDataHandle@4        @101
    113117    DdeFreeStringHandle        = _DdeFreeStringHandle@8      @102
    114     DdeGetData                 = _DdeGetData@16              @103
    115     DdeGetLastError            = _DdeGetLastError@4          @104
     118    DdeGetData                 = _DdeGetData@16              @103
     119    DdeGetLastError            = _DdeGetLastError@4          @104
    116120    DdeImpersonateClient       = _DdeImpersonateClient@4     @105
    117     DdeInitializeA             = _DdeInitializeA@16          @106
    118     DdeInitializeW             = _DdeInitializeW@16          @107
     121    DdeInitializeA             = _DdeInitializeA@16          @106
     122    DdeInitializeW             = _DdeInitializeW@16          @107
    119123    DdeKeepStringHandle        = _DdeKeepStringHandle@8      @108
    120     DdeNameService             = _DdeNameService@16          @109
    121     DdePostAdvise              = _DdePostAdvise@12           @110
    122     DdeQueryConvInfo           = _DdeQueryConvInfo@12        @111
    123     DdeQueryNextServer         = _DdeQueryNextServer@8       @112
    124     DdeQueryStringA            = _DdeQueryStringA@20         @113
    125     DdeQueryStringW            = _DdeQueryStringW@20         @114
    126     DdeReconnect               = _DdeReconnect@4             @115
     124    DdeNameService             = _DdeNameService@16          @109
     125    DdePostAdvise              = _DdePostAdvise@12           @110
     126    DdeQueryConvInfo           = _DdeQueryConvInfo@12        @111
     127    DdeQueryNextServer         = _DdeQueryNextServer@8       @112
     128    DdeQueryStringA            = _DdeQueryStringA@20         @113
     129    DdeQueryStringW            = _DdeQueryStringW@20         @114
     130    DdeReconnect               = _DdeReconnect@4             @115
    127131    DdeSetQualityOfService     = _DdeSetQualityOfService@12  @116
    128     DdeSetUserHandle           = _DdeSetUserHandle@12        @117
    129     DdeUnaccessData            = _DdeUnaccessData@4          @118
    130     DdeUninitialize            = _DdeUninitialize@4          @119
    131     DefDlgProcA                = _DefDlgProcA@16             @120
    132     DefDlgProcW                = _DefDlgProcW@16             @121
    133     DefFrameProcA              = _DefFrameProcA@20           @122
    134     DefFrameProcW              = _DefFrameProcW@20           @123
    135     DefMDIChildProcA           = _DefMDIChildProcA@16        @124
    136     DefMDIChildProcW           = _DefMDIChildProcW@16        @125
    137     DefWindowProcA             = _DefWindowProcA@16          @126
    138     DefWindowProcW             = _DefWindowProcW@16          @127
    139     DeferWindowPos             = _DeferWindowPos@32          @128
    140     DeleteMenu                 = _DeleteMenu@12              @129
     132    DdeSetUserHandle           = _DdeSetUserHandle@12        @117
     133    DdeUnaccessData            = _DdeUnaccessData@4          @118
     134    DdeUninitialize            = _DdeUninitialize@4          @119
     135    DefDlgProcA                = _DefDlgProcA@16             @120
     136    DefDlgProcW                = _DefDlgProcW@16             @121
     137    DefFrameProcA              = _DefFrameProcA@20           @122
     138    DefFrameProcW              = _DefFrameProcW@20           @123
     139    DefMDIChildProcA           = _DefMDIChildProcA@16        @124
     140    DefMDIChildProcW           = _DefMDIChildProcW@16        @125
     141    DefWindowProcA             = _DefWindowProcA@16          @126
     142    DefWindowProcW             = _DefWindowProcW@16          @127
     143    DeferWindowPos             = _DeferWindowPos@32          @128
     144    DeleteMenu                 = _DeleteMenu@12              @129
    141145    DestroyAcceleratorTable    = _DestroyAcceleratorTable@4  @130
    142     DestroyCaret               = _DestroyCaret@0             @131
    143     DestroyCursor              = _DestroyCursor@4            @132
    144     DestroyIcon                = _DestroyIcon@4              @133
    145     DestroyMenu                = _DestroyMenu@4              @134
    146     DestroyWindow              = _DestroyWindow@4            @135
     146    DestroyCaret               = _DestroyCaret@0             @131
     147    DestroyCursor              = _DestroyCursor@4            @132
     148    DestroyIcon                = _DestroyIcon@4              @133
     149    DestroyMenu                = _DestroyMenu@4              @134
     150    DestroyWindow              = _DestroyWindow@4            @135
    147151    DialogBoxIndirectParamA    = _DialogBoxIndirectParamA@20 @136
    148152    DialogBoxIndirectParamW    = _DialogBoxIndirectParamW@20 @137
    149     DialogBoxParamA            = _DialogBoxParamA@20         @138
    150     DialogBoxParamW            = _DialogBoxParamW@20         @139
    151     DispatchMessageA           = _DispatchMessageA@4         @140
    152     DispatchMessageW           = _DispatchMessageW@4         @141
    153     DlgDirListA                = _DlgDirListA@20             @142
     153    DialogBoxParamA            = _DialogBoxParamA@20         @138
     154    DialogBoxParamW            = _DialogBoxParamW@20         @139
     155    DispatchMessageA           = _DispatchMessageA@4         @140
     156    DispatchMessageW           = _DispatchMessageW@4         @141
     157    DlgDirListA                = _DlgDirListA@20             @142
    154158    DlgDirListComboBoxA        = _DlgDirListComboBoxA@20     @143
    155159    DlgDirListComboBoxW        = _DlgDirListComboBoxW@20     @144
    156     DlgDirListW                = _DlgDirListW@20             @145
     160    DlgDirListW                = _DlgDirListW@20             @145
    157161    DlgDirSelectComboBoxExA    = _DlgDirSelectComboBoxExA@16 @146
    158162    DlgDirSelectComboBoxExW    = _DlgDirSelectComboBoxExW@16 @147
    159     DlgDirSelectExA            = _DlgDirSelectExA@16         @148
    160     DlgDirSelectExW            = _DlgDirSelectExW@16         @149
    161     DragDetect                 = _DragDetect@12              @150
    162     DragObject                 = _DragObject@20              @151
    163     DrawAnimatedRects          = _DrawAnimatedRects@16       @152
    164     DrawCaption                = _DrawCaption@16             @153
    165     DrawCaptionTempA           = _DrawCaptionTempA@28        @154
    166     DrawCaptionTempW           = _DrawCaptionTempW@28        @155
    167     DrawEdge                   = _DrawEdge@16                @156
    168     DrawFocusRect              = _DrawFocusRect@8            @157
    169 ;    DrawFrame                  = _DrawFrame@??               @158
    170     DrawFrameControl           = _DrawFrameControl@16        @159
    171     DrawIcon                   = _DrawIcon@16                @160
    172     DrawIconEx                 = _DrawIconEx@36              @161
    173     DrawMenuBar                = _DrawMenuBar@4              @162
    174     DrawStateA                 = _DrawStateA@40              @163
    175     DrawStateW                 = _DrawStateW@40              @164
    176     DrawTextA                  = _DrawTextA@20               @165
    177     DrawTextExA                = _DrawTextExA@24             @166
    178     DrawTextExW                = _DrawTextExW@24             @167
    179     DrawTextW                  = _DrawTextW@20               @168
    180 ;    EditWndProc                = _EditWndProc@??             @169
    181     EmptyClipboard             = _EmptyClipboard@0           @170
    182     EnableMenuItem             = _EnableMenuItem@12          @171
    183     EnableScrollBar            = _EnableScrollBar@12         @172
    184     EnableWindow               = _EnableWindow@8             @173
    185     EndDeferWindowPos          = _EndDeferWindowPos@4        @174
    186     EndDialog                  = _EndDialog@8                @175
    187     EndPaint                   = _EndPaint@8                 @176
    188     EndTask                    = _EndTask@12                 @177
    189     EnumChildWindows           = _EnumChildWindows@12        @178
     163    DlgDirSelectExA            = _DlgDirSelectExA@16         @148
     164    DlgDirSelectExW            = _DlgDirSelectExW@16         @149
     165    DragDetect                 = _DragDetect@12              @150
     166    DragObject                 = _DragObject@20              @151
     167    DrawAnimatedRects          = _DrawAnimatedRects@16       @152
     168    DrawCaption                = _DrawCaption@16             @153
     169    DrawCaptionTempA           = _DrawCaptionTempA@28        @154
     170    DrawCaptionTempW           = _DrawCaptionTempW@28        @155
     171    DrawEdge                   = _DrawEdge@16                @156
     172    DrawFocusRect              = _DrawFocusRect@8            @157
     173;    DrawFrame                  = _DrawFrame@??               @158
     174    DrawFrameControl           = _DrawFrameControl@16        @159
     175    DrawIcon                   = _DrawIcon@16                @160
     176    DrawIconEx                 = _DrawIconEx@36              @161
     177    DrawMenuBar                = _DrawMenuBar@4              @162
     178    DrawStateA                 = _DrawStateA@40              @163
     179    DrawStateW                 = _DrawStateW@40              @164
     180    DrawTextA                  = _DrawTextA@20               @165
     181    DrawTextExA                = _DrawTextExA@24             @166
     182    DrawTextExW                = _DrawTextExW@24             @167
     183    DrawTextW                  = _DrawTextW@20               @168
     184;    EditWndProc                = _EditWndProc@??             @169
     185    EmptyClipboard             = _EmptyClipboard@0           @170
     186    EnableMenuItem             = _EnableMenuItem@12          @171
     187    EnableScrollBar            = _EnableScrollBar@12         @172
     188    EnableWindow               = _EnableWindow@8             @173
     189    EndDeferWindowPos          = _EndDeferWindowPos@4        @174
     190    EndDialog                  = _EndDialog@8                @175
     191    EndPaint                   = _EndPaint@8                 @176
     192    EndTask                    = _EndTask@12                 @177
     193    EnumChildWindows           = _EnumChildWindows@12        @178
    190194    EnumClipboardFormats       = _EnumClipboardFormats@4     @179
    191     EnumDesktopWindows         = _EnumDesktopWindows@12      @180
    192     EnumDesktopsA              = _EnumDesktopsA@12           @181
    193     EnumDesktopsW              = _EnumDesktopsW@12           @182
     195    EnumDesktopWindows         = _EnumDesktopWindows@12      @180
     196    EnumDesktopsA              = _EnumDesktopsA@12           @181
     197    EnumDesktopsW              = _EnumDesktopsW@12           @182
    194198    EnumDisplaySettingsA       = _EnumDisplaySettingsA@12    @183
    195199    EnumDisplaySettingsW       = _EnumDisplaySettingsW@12    @184
    196     EnumPropsA                 = _EnumPropsA@8               @185
    197     EnumPropsExA               = _EnumPropsExA@12            @186
    198     EnumPropsExW               = _EnumPropsExW@12            @187
    199     EnumPropsW                 = _EnumPropsW@8               @188
    200     EnumThreadWindows          = _EnumThreadWindows@12       @189
     200    EnumPropsA                 = _EnumPropsA@8               @185
     201    EnumPropsExA               = _EnumPropsExA@12            @186
     202    EnumPropsExW               = _EnumPropsExW@12            @187
     203    EnumPropsW                 = _EnumPropsW@8               @188
     204    EnumThreadWindows          = _EnumThreadWindows@12       @189
    201205    EnumWindowStationsA        = _EnumWindowStationsA@8      @190
    202206    EnumWindowStationsW        = _EnumWindowStationsW@8      @191
    203     EnumWindows                = _EnumWindows@8              @192
    204     EqualRect                  = _EqualRect@8                @193
    205     ExcludeUpdateRgn           = _ExcludeUpdateRgn@8         @194
    206     ExitWindowsEx              = _ExitWindowsEx@8            @195
    207     FillRect                   = _FillRect@12                @196
    208     FindWindowA                = _FindWindowA@8              @197
    209     FindWindowExA              = _FindWindowExA@16           @198
    210     FindWindowExW              = _FindWindowExW@16           @199
    211     FindWindowW                = _FindWindowW@8              @200
    212     FlashWindow                = _FlashWindow@8              @201
    213     FrameRect                  = _FrameRect@12               @202
    214     FreeDDElParam              = _FreeDDElParam@8            @203
    215     GetActiveWindow            = _GetActiveWindow@0          @204
    216     GetAsyncKeyState           = _GetAsyncKeyState@4         @205
    217     GetCapture                 = _GetCapture@0               @206
    218     GetCaretBlinkTime          = _GetCaretBlinkTime@0        @207
    219     GetCaretPos                = _GetCaretPos@4              @208
    220     GetClassInfoA              = _GetClassInfoA@12           @209
    221     GetClassInfoExA            = _GetClassInfoExA@12         @210
    222     GetClassInfoExW            = _GetClassInfoExW@12         @211
    223     GetClassInfoW              = _GetClassInfoW@12           @212
    224     GetClassLongA              = _GetClassLongA@8            @213
    225     GetClassLongW              = _GetClassLongW@8            @214
    226     GetClassNameA              = _GetClassNameA@12           @215
    227     GetClassNameW              = _GetClassNameW@12           @216
    228     GetClassWord               = _GetClassWord@8             @217
    229     GetClientRect              = _GetClientRect@8            @218
    230     GetClipCursor              = _GetClipCursor@4            @219
    231     GetClipboardData           = _GetClipboardData@4         @220
     207    EnumWindows                = _EnumWindows@8              @192
     208    EqualRect                  = _EqualRect@8                @193
     209    ExcludeUpdateRgn           = _ExcludeUpdateRgn@8         @194
     210    ExitWindowsEx              = _ExitWindowsEx@8            @195
     211    FillRect                   = _FillRect@12                @196
     212    FindWindowA                = _FindWindowA@8              @197
     213    FindWindowExA              = _FindWindowExA@16           @198
     214    FindWindowExW              = _FindWindowExW@16           @199
     215    FindWindowW                = _FindWindowW@8              @200
     216    FlashWindow                = _FlashWindow@8              @201
     217    FrameRect                  = _FrameRect@12               @202
     218    FreeDDElParam              = _FreeDDElParam@8            @203
     219    GetActiveWindow            = _GetActiveWindow@0          @204
     220    GetAsyncKeyState           = _GetAsyncKeyState@4         @205
     221    GetCapture                 = _GetCapture@0               @206
     222    GetCaretBlinkTime          = _GetCaretBlinkTime@0        @207
     223    GetCaretPos                = _GetCaretPos@4              @208
     224    GetClassInfoA              = _GetClassInfoA@12           @209
     225    GetClassInfoExA            = _GetClassInfoExA@12         @210
     226    GetClassInfoExW            = _GetClassInfoExW@12         @211
     227    GetClassInfoW              = _GetClassInfoW@12           @212
     228    GetClassLongA              = _GetClassLongA@8            @213
     229    GetClassLongW              = _GetClassLongW@8            @214
     230    GetClassNameA              = _GetClassNameA@12           @215
     231    GetClassNameW              = _GetClassNameW@12           @216
     232    GetClassWord               = _GetClassWord@8             @217
     233    GetClientRect              = _GetClientRect@8            @218
     234    GetClipCursor              = _GetClipCursor@4            @219
     235    GetClipboardData           = _GetClipboardData@4         @220
    232236    GetClipboardFormatNameA    = _GetClipboardFormatNameA@12 @221
    233237    GetClipboardFormatNameW    = _GetClipboardFormatNameW@12 @222
    234     GetClipboardOwner          = _GetClipboardOwner@0        @223
    235     GetClipboardViewer         = _GetClipboardViewer@0       @224
    236     GetCursor                  = _GetCursor@0               @225
    237     GetCursorPos               = _GetCursorPos@4            @226
    238     GetDC                      = _GetDC@4                    @227
    239     GetDCEx                    = _GetDCEx@12                 @228
    240     GetDesktopWindow           = _GetDesktopWindow@0         @229
    241     GetDialogBaseUnits         = _GetDialogBaseUnits@0       @230
    242     GetDlgCtrlID               = _GetDlgCtrlID@4             @231
    243     GetDlgItem                 = _GetDlgItem@8               @232
    244     GetDlgItemInt              = _GetDlgItemInt@16           @233
    245     GetDlgItemTextA            = _GetDlgItemTextA@16         @234
    246     GetDlgItemTextW            = _GetDlgItemTextW@16         @235
    247     GetDoubleClickTime         = _GetDoubleClickTime@0       @236
    248     GetFocus                   = _GetFocus@0                 @237
     238    GetClipboardOwner          = _GetClipboardOwner@0        @223
     239    GetClipboardViewer         = _GetClipboardViewer@0       @224
     240    GetCursor                  = _GetCursor@0               @225
     241    GetCursorPos               = _GetCursorPos@4            @226
     242    GetDC                      = _GetDC@4                    @227
     243    GetDCEx                    = _GetDCEx@12                 @228
     244    GetDesktopWindow           = _GetDesktopWindow@0         @229
     245    GetDialogBaseUnits         = _GetDialogBaseUnits@0       @230
     246    GetDlgCtrlID               = _GetDlgCtrlID@4             @231
     247    GetDlgItem                 = _GetDlgItem@8               @232
     248    GetDlgItemInt              = _GetDlgItemInt@16           @233
     249    GetDlgItemTextA            = _GetDlgItemTextA@16         @234
     250    GetDlgItemTextW            = _GetDlgItemTextW@16         @235
     251    GetDoubleClickTime         = _GetDoubleClickTime@0       @236
     252    GetFocus                   = _GetFocus@0                 @237
    249253    GetForegroundWindow        = _GetForegroundWindow@0      @238
    250     GetIconInfo                = _GetIconInfo@8              @239
    251 ;    GetInputDesktop            = _GetInputDesktop@??         @240
    252     GetInputState              = _GetInputState@0            @241
     254    GetIconInfo                = _GetIconInfo@8              @239
     255;    GetInputDesktop            = _GetInputDesktop@??         @240
     256    GetInputState              = _GetInputState@0            @241
    253257    GetInternalWindowPos       = _GetInternalWindowPos@12    @242
    254     GetKBCodePage              = _GetKBCodePage@0            @243
    255     GetKeyNameTextA            = _GetKeyNameTextA@12         @244
    256     GetKeyNameTextW            = _GetKeyNameTextW@12         @245
    257     GetKeyState                = _GetKeyState@4             @246
    258     GetKeyboardLayout          = _GetKeyboardLayout@4        @247
     258    GetKBCodePage              = _GetKBCodePage@0            @243
     259    GetKeyNameTextA            = _GetKeyNameTextA@12         @244
     260    GetKeyNameTextW            = _GetKeyNameTextW@12         @245
     261    GetKeyState                = _GetKeyState@4             @246
     262    GetKeyboardLayout          = _GetKeyboardLayout@4        @247
    259263    GetKeyboardLayoutList      = _GetKeyboardLayoutList@8    @248
    260264    GetKeyboardLayoutNameA     = _GetKeyboardLayoutNameA@4   @249
    261265    GetKeyboardLayoutNameW     = _GetKeyboardLayoutNameW@4   @250
    262     GetKeyboardState           = _GetKeyboardState@4         @251
    263     GetKeyboardType            = _GetKeyboardType@4           @252
    264     GetLastActivePopup         = _GetLastActivePopup@4       @253
    265     GetMenu                    = _GetMenu@4                  @254
    266     GetMenuCheckMarkDimensions  = _GetMenuCheckMarkDimensions@0 @255
     266    GetKeyboardState           = _GetKeyboardState@4         @251
     267    GetKeyboardType            = _GetKeyboardType@4           @252
     268    GetLastActivePopup         = _GetLastActivePopup@4       @253
     269    GetMenu                    = _GetMenu@4                  @254
     270    GetMenuCheckMarkDimensions  = _GetMenuCheckMarkDimensions@0 @255
    267271    GetMenuContextHelpId       = _GetMenuContextHelpId@4     @256
    268     GetMenuDefaultItem         = _GetMenuDefaultItem@12      @257
    269     GetMenuItemCount           = _GetMenuItemCount@4         @258
    270     GetMenuItemID              = _GetMenuItemID@8            @259
    271     GetMenuItemInfoA           = _GetMenuItemInfoA@16        @260
    272     GetMenuItemInfoW           = _GetMenuItemInfoW@16        @261
    273     GetMenuItemRect            = _GetMenuItemRect@16         @262
    274     GetMenuState               = _GetMenuState@12            @263
    275     GetMenuStringA             = _GetMenuStringA@20          @264
    276     GetMenuStringW             = _GetMenuStringW@20          @265
    277     GetMessageA                = _GetMessageA@16             @266
     272    GetMenuDefaultItem         = _GetMenuDefaultItem@12      @257
     273    GetMenuItemCount           = _GetMenuItemCount@4         @258
     274    GetMenuItemID              = _GetMenuItemID@8            @259
     275    GetMenuItemInfoA           = _GetMenuItemInfoA@16        @260
     276    GetMenuItemInfoW           = _GetMenuItemInfoW@16        @261
     277    GetMenuItemRect            = _GetMenuItemRect@16         @262
     278    GetMenuState               = _GetMenuState@12            @263
     279    GetMenuStringA             = _GetMenuStringA@20          @264
     280    GetMenuStringW             = _GetMenuStringW@20          @265
     281    GetMessageA                = _GetMessageA@16             @266
    278282    GetMessageExtraInfo        = _GetMessageExtraInfo@0      @267
    279     GetMessagePos              = _GetMessagePos@0            @268
    280     GetMessageTime             = _GetMessageTime@0           @269
    281     GetMessageW                = _GetMessageW@16             @270
     283    GetMessagePos              = _GetMessagePos@0            @268
     284    GetMessageTime             = _GetMessageTime@0           @269
     285    GetMessageW                = _GetMessageW@16             @270
    282286    GetNextDlgGroupItem        = _GetNextDlgGroupItem@12     @271
    283     GetNextDlgTabItem          = _GetNextDlgTabItem@12       @272
    284     GetNextQueueWindow         = _GetNextQueueWindow@8       @273
     287    GetNextDlgTabItem          = _GetNextDlgTabItem@12       @272
     288    GetNextQueueWindow         = _GetNextQueueWindow@8       @273
    285289    GetOpenClipboardWindow     = _GetOpenClipboardWindow@0   @274
    286     GetParent                  = _GetParent@4                @275
    287     GetPriorityClipboardFormat  = _GetPriorityClipboardFormat@8 @276
     290    GetParent                  = _GetParent@4                @275
     291    GetPriorityClipboardFormat  = _GetPriorityClipboardFormat@8 @276
    288292    GetProcessWindowStation    = _GetProcessWindowStation@0  @277
    289     GetProgmanWindow           = _GetProgmanWindow@0                 ;@289
    290     GetPropA                   = _GetPropA@8                 @278
    291     GetPropW                   = _GetPropW@8                 @279
    292     GetQueueStatus             = _GetQueueStatus@4           @280
    293     GetScrollInfo              = _GetScrollInfo@12           @281
    294     GetScrollPos               = _GetScrollPos@8             @282
    295     GetScrollRange             = _GetScrollRange@16          @283
    296     GetShellWindow             = _GetShellWindow@0           @284
    297     GetSubMenu                 = _GetSubMenu@8               @285
    298     GetSysColor                = _GetSysColor@4              @286
    299     GetSysColorBrush           = _GetSysColorBrush@4         @287
    300     GetSystemMenu              = _GetSystemMenu@8            @288
    301     GetSystemMetrics           = _GetSystemMetrics@4         @289
     293    GetProgmanWindow           = _GetProgmanWindow@0                 ;@289
     294    GetPropA                   = _GetPropA@8                 @278
     295    GetPropW                   = _GetPropW@8                 @279
     296    GetQueueStatus             = _GetQueueStatus@4           @280
     297    GetScrollInfo              = _GetScrollInfo@12           @281
     298    GetScrollPos               = _GetScrollPos@8             @282
     299    GetScrollRange             = _GetScrollRange@16          @283
     300    GetShellWindow             = _GetShellWindow@0           @284
     301    GetSubMenu                 = _GetSubMenu@8               @285
     302    GetSysColor                = _GetSysColor@4              @286
     303    GetSysColorBrush           = _GetSysColorBrush@4         @287
     304    GetSystemMenu              = _GetSystemMenu@8            @288
     305    GetSystemMetrics           = _GetSystemMetrics@4         @289
    302306    GetTabbedTextExtentA       = _GetTabbedTextExtentA@20    @290
    303307    GetTabbedTextExtentW       = _GetTabbedTextExtentW@20    @291
    304     GetTaskmanWindow           = _GetTaskmanWindow@0                  ;@304
    305     GetThreadDesktop           = _GetThreadDesktop@4         @292
    306     GetTopWindow               = _GetTopWindow@4             @293
    307     GetUpdateRect              = _GetUpdateRect@12           @294
    308     GetUpdateRgn               = _GetUpdateRgn@12            @295
     308    GetTaskmanWindow           = _GetTaskmanWindow@0                  ;@304
     309    GetThreadDesktop           = _GetThreadDesktop@4         @292
     310    GetTopWindow               = _GetTopWindow@4             @293
     311    GetUpdateRect              = _GetUpdateRect@12           @294
     312    GetUpdateRgn               = _GetUpdateRgn@12            @295
    309313    GetUserObjectInformationA  = _GetUserObjectInformationA@20 @296
    310314    GetUserObjectInformationW  = _GetUserObjectInformationW@20 @297
    311315    GetUserObjectSecurity      = _GetUserObjectSecurity@20   @298
    312     GetWindow                  = _GetWindow@8                @299
     316    GetWindow                  = _GetWindow@8                @299
    313317    GetWindowContextHelpId     = _GetWindowContextHelpId@4   @300
    314     GetWindowDC                = _GetWindowDC@4              @301
    315     GetWindowLongA             = _GetWindowLongA@8           @302
    316     GetWindowLongW             = _GetWindowLongW@8           @303
    317     GetWindowPlacement         = _GetWindowPlacement@8       @304
    318     GetWindowRect              = _GetWindowRect@8            @305
    319     GetWindowRgn               = _GetWindowRgn@8             @306
    320     GetWindowTextA             = _GetWindowTextA@12          @307
     318    GetWindowDC                = _GetWindowDC@4              @301
     319    GetWindowLongA             = _GetWindowLongA@8           @302
     320    GetWindowLongW             = _GetWindowLongW@8           @303
     321    GetWindowPlacement         = _GetWindowPlacement@8       @304
     322    GetWindowRect              = _GetWindowRect@8            @305
     323    GetWindowRgn               = _GetWindowRgn@8             @306
     324    GetWindowTextA             = _GetWindowTextA@12          @307
    321325    GetWindowTextLengthA       = _GetWindowTextLengthA@4     @308
    322326    GetWindowTextLengthW       = _GetWindowTextLengthW@4     @309
    323     GetWindowTextW             = _GetWindowTextW@12          @310
     327    GetWindowTextW             = _GetWindowTextW@12          @310
    324328    GetWindowThreadProcessId   = _GetWindowThreadProcessId@8 @311
    325     GetWindowWord              = _GetWindowWord@8            @312
    326     GrayStringA                = _GrayStringA@36             @313
    327     GrayStringW                = _GrayStringW@36             @314
    328     HideCaret                  = _HideCaret@4                @315
    329     HiliteMenuItem             = _HiliteMenuItem@16          @316
    330     ImpersonateDdeClientWindow  = _ImpersonateDdeClientWindow@8 @317
    331     InSendMessage              = _InSendMessage@0            @318
    332     InflateRect                = _InflateRect@12             @319
    333 ;    InitSharedTable            = _InitSharedTable@??         @320
    334 ;    InitTask                   = _InitTask@??                @321
    335     InsertMenuA                = _InsertMenuA@20             @322
    336     InsertMenuItemA            = _InsertMenuItemA@16         @323
    337     InsertMenuItemW            = _InsertMenuItemW@16         @324
    338     InsertMenuW                = _InsertMenuW@20             @325
     329    GetWindowWord              = _GetWindowWord@8            @312
     330    GrayStringA                = _GrayStringA@36             @313
     331    GrayStringW                = _GrayStringW@36             @314
     332    HideCaret                  = _HideCaret@4                @315
     333    HiliteMenuItem             = _HiliteMenuItem@16          @316
     334    ImpersonateDdeClientWindow  = _ImpersonateDdeClientWindow@8 @317
     335    InSendMessage              = _InSendMessage@0            @318
     336    InflateRect                = _InflateRect@12             @319
     337;    InitSharedTable            = _InitSharedTable@??         @320
     338;    InitTask                   = _InitTask@??                @321
     339    InsertMenuA                = _InsertMenuA@20             @322
     340    InsertMenuItemA            = _InsertMenuItemA@16         @323
     341    InsertMenuItemW            = _InsertMenuItemW@16         @324
     342    InsertMenuW                = _InsertMenuW@20             @325
    339343    InternalGetWindowText      = _InternalGetWindowText@12   @326
    340     IntersectRect              = _IntersectRect@12           @327
    341     InvalidateRect             = _InvalidateRect@12          @328
    342     InvalidateRgn              = _InvalidateRgn@12           @329
    343     InvertRect                 = _InvertRect@8               @330
    344     IsCharAlphaA               = _IsCharAlphaA@4             @331
     344    IntersectRect              = _IntersectRect@12           @327
     345    InvalidateRect             = _InvalidateRect@12          @328
     346    InvalidateRgn              = _InvalidateRgn@12           @329
     347    InvertRect                 = _InvertRect@8               @330
     348    IsCharAlphaA               = _IsCharAlphaA@4             @331
    345349    IsCharAlphaNumericA        = _IsCharAlphaNumericA@4      @332
    346350    IsCharAlphaNumericW        = _IsCharAlphaNumericW@4      @333
    347     IsCharAlphaW               = _IsCharAlphaW@4             @334
    348     IsCharLowerA               = _IsCharLowerA@4             @335
    349     IsCharLowerW               = _IsCharLowerW@4             @336
    350     IsCharUpperA               = _IsCharUpperA@4             @337
    351     IsCharUpperW               = _IsCharUpperW@4             @338
    352     IsChild                    = _IsChild@8                  @339
    353     IsClipboardFormatAvailable  = _IsClipboardFormatAvailable@4 @340
    354     IsDialogMessage            = _IsDialogMessageA@8         @341
    355     IsDialogMessageA           = _IsDialogMessageA@8         @342
    356     IsDialogMessageW           = _IsDialogMessageW@8         @343
    357     IsDlgButtonChecked         = _IsDlgButtonChecked@8       @344
    358     IsHungThread               = _IsHungThread@4             @345
    359     IsHungAppWindow            = _IsHungAppWindow@8
    360     IsIconic                   = _IsIconic@4                 @346
    361     IsMenu                     = _IsMenu@4                   @347
    362     IsRectEmpty                = _IsRectEmpty@4              @348
    363     IsWindow                   = _IsWindow@4                 @349
    364     IsWindowEnabled            = _IsWindowEnabled@4          @350
    365     IsWindowUnicode            = _IsWindowUnicode@4          @351
    366     IsWindowVisible            = _IsWindowVisible@4          @352
    367     IsZoomed                   = _IsZoomed@4                 @353
    368     KillTimer                  = _KillTimer@8                @354
    369     LoadAcceleratorsA          = _LoadAcceleratorsA@8        @355
    370     LoadAcceleratorsW          = _LoadAcceleratorsW@8        @356
    371     LoadBitmapA                = _LoadBitmapA@8              @357
    372     LoadBitmapW                = _LoadBitmapW@8              @358
    373     LoadCursorA                = _LoadCursorA@8              @359
     351    IsCharAlphaW               = _IsCharAlphaW@4             @334
     352    IsCharLowerA               = _IsCharLowerA@4             @335
     353    IsCharLowerW               = _IsCharLowerW@4             @336
     354    IsCharUpperA               = _IsCharUpperA@4             @337
     355    IsCharUpperW               = _IsCharUpperW@4             @338
     356    IsChild                    = _IsChild@8                  @339
     357    IsClipboardFormatAvailable  = _IsClipboardFormatAvailable@4 @340
     358    IsDialogMessage            = _IsDialogMessageA@8         @341
     359    IsDialogMessageA           = _IsDialogMessageA@8         @342
     360    IsDialogMessageW           = _IsDialogMessageW@8         @343
     361    IsDlgButtonChecked         = _IsDlgButtonChecked@8       @344
     362    IsHungThread               = _IsHungThread@4             @345
     363    IsHungAppWindow            = _IsHungAppWindow@8
     364    IsIconic                   = _IsIconic@4                 @346
     365    IsMenu                     = _IsMenu@4                   @347
     366    IsRectEmpty                = _IsRectEmpty@4              @348
     367    IsWindow                   = _IsWindow@4                 @349
     368    IsWindowEnabled            = _IsWindowEnabled@4          @350
     369    IsWindowUnicode            = _IsWindowUnicode@4          @351
     370    IsWindowVisible            = _IsWindowVisible@4          @352
     371    IsZoomed                   = _IsZoomed@4                 @353
     372    KillTimer                  = _KillTimer@8                @354
     373    LoadAcceleratorsA          = _LoadAcceleratorsA@8        @355
     374    LoadAcceleratorsW          = _LoadAcceleratorsW@8        @356
     375    LoadBitmapA                = _LoadBitmapA@8              @357
     376    LoadBitmapW                = _LoadBitmapW@8              @358
     377    LoadCursorA                = _LoadCursorA@8              @359
    374378    LoadCursorFromFileA        = _LoadCursorFromFileA@4      @360
    375379    LoadCursorFromFileW        = _LoadCursorFromFileW@4      @361
    376     LoadCursorW                = _LoadCursorW@8              @362
    377     LoadIconA                  = _LoadIconA@8                @363
    378     LoadIconW                  = _LoadIconW@8                @364
    379     LoadImageA                 = _LoadImageA@24              @365
    380     LoadImageW                 = _LoadImageW@24              @366
     380    LoadCursorW                = _LoadCursorW@8              @362
     381    LoadIconA                  = _LoadIconA@8                @363
     382    LoadIconW                  = _LoadIconW@8                @364
     383    LoadImageA                 = _LoadImageA@24              @365
     384    LoadImageW                 = _LoadImageW@24              @366
    381385    LoadKeyboardLayoutA        = _LoadKeyboardLayoutA@8      @367
    382386    LoadKeyboardLayoutW        = _LoadKeyboardLayoutW@8      @368
    383     LoadMenuA                  = _LoadMenuA@8                @369
    384     LoadMenuIndirectA          = _LoadMenuIndirectA@4        @370
    385     LoadMenuIndirectW          = _LoadMenuIndirectW@4        @371
    386     LoadMenuW                  = _LoadMenuW@8                @372
    387     LoadStringA                = _LoadStringA@16             @373
    388     LoadStringW                = _LoadStringW@16             @374
    389 ;    LockWindowStation          = _LockWindowStation@??       @375
    390     LockWindowUpdate           = _LockWindowUpdate@4         @376
     387    LoadMenuA                  = _LoadMenuA@8                @369
     388    LoadMenuIndirectA          = _LoadMenuIndirectA@4        @370
     389    LoadMenuIndirectW          = _LoadMenuIndirectW@4        @371
     390    LoadMenuW                  = _LoadMenuW@8                @372
     391    LoadStringA                = _LoadStringA@16             @373
     392    LoadStringW                = _LoadStringW@16             @374
     393;    LockWindowStation          = _LockWindowStation@??       @375
     394    LockWindowUpdate           = _LockWindowUpdate@4         @376
    391395    LookupIconIdFromDirectory  = _LookupIconIdFromDirectory@8 @377
    392396    LookupIconIdFromDirectoryEx  = _LookupIconIdFromDirectoryEx@20 @378
    393     MapDialogRect              = _MapDialogRect@8            @379
    394     MapVirtualKeyA             = _MapVirtualKeyA@8           @380
    395     MapVirtualKeyExA           = _MapVirtualKeyExA@12        @381
    396     MapVirtualKeyExW           = _MapVirtualKeyExW@12        @382
    397     MapVirtualKeyW             = _MapVirtualKeyW@8           @383
    398     MapWindowPoints            = _MapWindowPoints@16         @384
    399     MenuItemFromPoint          = _MenuItemFromPoint@16       @385
    400     MessageBeep                = _MessageBeep@4              @386
    401     MessageBoxA                = _MessageBoxA@16             @387
    402     MessageBoxExA              = _MessageBoxExA@20           @388
    403     MessageBoxExW              = _MessageBoxExW@20           @389
     397    MapDialogRect              = _MapDialogRect@8            @379
     398    MapVirtualKeyA             = _MapVirtualKeyA@8           @380
     399    MapVirtualKeyExA           = _MapVirtualKeyExA@12        @381
     400    MapVirtualKeyExW           = _MapVirtualKeyExW@12        @382
     401    MapVirtualKeyW             = _MapVirtualKeyW@8           @383
     402    MapWindowPoints            = _MapWindowPoints@16         @384
     403    MenuItemFromPoint          = _MenuItemFromPoint@16       @385
     404    MessageBeep                = _MessageBeep@4              @386
     405    MessageBoxA                = _MessageBoxA@16             @387
     406    MessageBoxExA              = _MessageBoxExA@20           @388
     407    MessageBoxExW              = _MessageBoxExW@20           @389
    404408    MessageBoxIndirectA        = _MessageBoxIndirectA@4     @390
    405409    MessageBoxIndirectW        = _MessageBoxIndirectW@4     @391
    406     MessageBoxW                = _MessageBoxW@16             @392
    407 ;    ModifyAccess               = _ModifyAccess@??            @393
    408     ModifyMenuA                = _ModifyMenuA@20             @394
    409     ModifyMenuW                = _ModifyMenuW@20             @395
    410     MoveWindow                 = _MoveWindow@24              @396
     410    MessageBoxW                = _MessageBoxW@16             @392
     411;    ModifyAccess               = _ModifyAccess@??            @393
     412    ModifyMenuA                = _ModifyMenuA@20             @394
     413    ModifyMenuW                = _ModifyMenuW@20             @395
     414    MoveWindow                 = _MoveWindow@24              @396
    411415    MsgWaitForMultipleObjects  = _MsgWaitForMultipleObjects@20 @397
    412     OemKeyScan                 = _OemKeyScan@4               @398
    413     OemToCharA                 = _OemToCharA@8               @399
    414     OemToCharBuffA             = _OemToCharBuffA@12          @400
    415     OemToCharBuffW             = _OemToCharBuffW@12          @401
    416     OemToCharW                 = _OemToCharW@8               @402
    417     OffsetRect                 = _OffsetRect@12              @403
    418     OpenClipboard              = _OpenClipboard@4            @404
    419     OpenDesktopA               = _OpenDesktopA@16            @405
    420     OpenDesktopW               = _OpenDesktopW@16            @406
    421     OpenIcon                   = _OpenIcon@4                 @407
    422     OpenInputDesktop           = _OpenInputDesktop@12        @408
    423     OpenWindowStationA         = _OpenWindowStationA@12      @409
    424     OpenWindowStationW         = _OpenWindowStationW@12      @410
    425     PackDDElParam              = _PackDDElParam@12           @411
    426     PaintDesktop               = _PaintDesktop@4             @412
    427     PeekMessageA               = _PeekMessageA@20            @413
    428     PeekMessageW               = _PeekMessageW@20            @414
    429     PlaySoundEvent             = _PlaySoundEvent@4           @415
    430     PostMessageA               = _PostMessageA@16            @416
    431     PostMessageW               = _PostMessageW@16            @417
    432     PostQuitMessage            = _PostQuitMessage@4          @418
    433     PostThreadMessageA         = _PostThreadMessageA@16      @419
    434     PostThreadMessageW         = _PostThreadMessageW@16      @420
    435     PtInRect                   = _PtInRect@12                @421
    436     RedrawWindow               = _RedrawWindow@16            @422
    437     RegisterClassA             = _RegisterClassA@4           @423
    438     RegisterClassExA           = _RegisterClassExA@4         @424
    439     RegisterClassExW           = _RegisterClassExW@4         @425
    440     RegisterClassW             = _RegisterClassW@4           @426
     416    OemKeyScan                 = _OemKeyScan@4               @398
     417    OemToCharA                 = _OemToCharA@8               @399
     418    OemToCharBuffA             = _OemToCharBuffA@12          @400
     419    OemToCharBuffW             = _OemToCharBuffW@12          @401
     420    OemToCharW                 = _OemToCharW@8               @402
     421    OffsetRect                 = _OffsetRect@12              @403
     422    OpenClipboard              = _OpenClipboard@4            @404
     423    OpenDesktopA               = _OpenDesktopA@16            @405
     424    OpenDesktopW               = _OpenDesktopW@16            @406
     425    OpenIcon                   = _OpenIcon@4                 @407
     426    OpenInputDesktop           = _OpenInputDesktop@12        @408
     427    OpenWindowStationA         = _OpenWindowStationA@12      @409
     428    OpenWindowStationW         = _OpenWindowStationW@12      @410
     429    PackDDElParam              = _PackDDElParam@12           @411
     430    PaintDesktop               = _PaintDesktop@4             @412
     431    PeekMessageA               = _PeekMessageA@20            @413
     432    PeekMessageW               = _PeekMessageW@20            @414
     433    PlaySoundEvent             = _PlaySoundEvent@4           @415
     434    PostMessageA               = _PostMessageA@16            @416
     435    PostMessageW               = _PostMessageW@16            @417
     436    PostQuitMessage            = _PostQuitMessage@4          @418
     437    PostThreadMessageA         = _PostThreadMessageA@16      @419
     438    PostThreadMessageW         = _PostThreadMessageW@16      @420
     439    PtInRect                   = _PtInRect@12                @421
     440    RedrawWindow               = _RedrawWindow@16            @422
     441    RegisterClassA             = _RegisterClassA@4           @423
     442    RegisterClassExA           = _RegisterClassExA@4         @424
     443    RegisterClassExW           = _RegisterClassExW@4         @425
     444    RegisterClassW             = _RegisterClassW@4           @426
    441445    RegisterClipboardFormatA   = _RegisterClipboardFormatA@4 @427
    442446    RegisterClipboardFormatW   = _RegisterClipboardFormatW@4 @428
    443     RegisterHotKey             = _RegisterHotKey@16          @429
    444 ;    RegisterLogonProcess       = _RegisterLogonProcess@??    @430
     447    RegisterHotKey             = _RegisterHotKey@16          @429
     448;    RegisterLogonProcess       = _RegisterLogonProcess@??    @430
    445449    RegisterNetworkCapabilities  = _RegisterNetworkCapabilities@8 @431
    446450    RegisterSystemThread       = _RegisterSystemThread@8     @432
    447     RegisterTasklist           = _RegisterTasklist@4         @433
     451    RegisterTasklist           = _RegisterTasklist@4         @433
    448452    RegisterWindowMessageA     = _RegisterWindowMessageA@4   @434
    449453    RegisterWindowMessageW     = _RegisterWindowMessageW@4   @435
    450     ReleaseCapture             = _ReleaseCapture@0           @436
    451     ReleaseDC                  = _ReleaseDC@8                @437
    452     RemoveMenu                 = _RemoveMenu@12              @438
    453     RemovePropA                = _RemovePropA@8              @439
    454     RemovePropW                = _RemovePropW@8              @440
    455     ReplyMessage               = _ReplyMessage@4             @441
    456     ReuseDDElParam             = _ReuseDDElParam@20          @442
    457     ScreenToClient             = _ScreenToClient@8           @443
    458     ScrollDC                   = _ScrollDC@28                @444
    459     ScrollWindow               = _ScrollWindow@20            @445
    460     ScrollWindowEx             = _ScrollWindowEx@32          @446
     454    ReleaseCapture             = _ReleaseCapture@0           @436
     455    ReleaseDC                  = _ReleaseDC@8                @437
     456    RemoveMenu                 = _RemoveMenu@12              @438
     457    RemovePropA                = _RemovePropA@8              @439
     458    RemovePropW                = _RemovePropW@8              @440
     459    ReplyMessage               = _ReplyMessage@4             @441
     460    ReuseDDElParam             = _ReuseDDElParam@20          @442
     461    ScreenToClient             = _ScreenToClient@8           @443
     462    ScrollDC                   = _ScrollDC@28                @444
     463    ScrollWindow               = _ScrollWindow@20            @445
     464    ScrollWindowEx             = _ScrollWindowEx@32          @446
    461465    SendDlgItemMessageA        = _SendDlgItemMessageA@20     @447
    462466    SendDlgItemMessageW        = _SendDlgItemMessageW@20     @448
    463     SendMessageA               = _SendMessageA@16            @449
     467    SendMessageA               = _SendMessageA@16            @449
    464468    SendMessageCallbackA       = _SendMessageCallbackA@24    @450
    465469    SendMessageCallbackW       = _SendMessageCallbackW@24    @451
    466470    SendMessageTimeoutA        = _SendMessageTimeoutA@28     @452
    467471    SendMessageTimeoutW        = _SendMessageTimeoutW@28     @453
    468     SendMessageW               = _SendMessageW@16            @454
    469     SendNotifyMessageA         = _SendNotifyMessageA@16      @455
    470     SendNotifyMessageW         = _SendNotifyMessageW@16      @456
    471     SetActiveWindow            = _SetActiveWindow@4          @457
    472     SetCapture                 = _SetCapture@4               @458
    473     SetCaretBlinkTime          = _SetCaretBlinkTime@4        @459
    474     SetCaretPos                = _SetCaretPos@8              @460
    475     SetClassLongA              = _SetClassLongA@12           @461
    476     SetClassLongW              = _SetClassLongW@12           @462
    477     SetClassWord               = _SetClassWord@12            @463
    478     SetClipboardData           = _SetClipboardData@8         @464
    479     SetClipboardViewer         = _SetClipboardViewer@4      @465
    480     SetCursor                  = _SetCursor@4                @466
    481     SetCursorPos               = _SetCursorPos@8             @467
    482     SetDebugErrorLevel         = _SetDebugErrorLevel@4       @468
    483 ;    SetDeskWallpaper           = _SetDeskWallpaper@??        @469
    484 ;    SetDesktopBitmap           = _SetDesktopBitmap@??        @470
    485     SetDlgItemInt              = _SetDlgItemInt@16           @471
    486     SetDlgItemTextA            = _SetDlgItemTextA@12         @472
    487     SetDlgItemTextW            = _SetDlgItemTextW@12         @473
    488     SetDoubleClickTime         = _SetDoubleClickTime@4       @474
    489     SetFocus                   = _SetFocus@4                 @475
     472    SendMessageW               = _SendMessageW@16            @454
     473    SendNotifyMessageA         = _SendNotifyMessageA@16      @455
     474    SendNotifyMessageW         = _SendNotifyMessageW@16      @456
     475    SetActiveWindow            = _SetActiveWindow@4          @457
     476    SetCapture                 = _SetCapture@4               @458
     477    SetCaretBlinkTime          = _SetCaretBlinkTime@4        @459
     478    SetCaretPos                = _SetCaretPos@8              @460
     479    SetClassLongA              = _SetClassLongA@12           @461
     480    SetClassLongW              = _SetClassLongW@12           @462
     481    SetClassWord               = _SetClassWord@12            @463
     482    SetClipboardData           = _SetClipboardData@8         @464
     483    SetClipboardViewer         = _SetClipboardViewer@4      @465
     484    SetCursor                  = _SetCursor@4                @466
     485    SetCursorPos               = _SetCursorPos@8             @467
     486    SetDebugErrorLevel         = _SetDebugErrorLevel@4       @468
     487;    SetDeskWallpaper           = _SetDeskWallpaper@??        @469
     488;    SetDesktopBitmap           = _SetDesktopBitmap@??        @470
     489    SetDlgItemInt              = _SetDlgItemInt@16           @471
     490    SetDlgItemTextA            = _SetDlgItemTextA@12         @472
     491    SetDlgItemTextW            = _SetDlgItemTextW@12         @473
     492    SetDoubleClickTime         = _SetDoubleClickTime@4       @474
     493    SetFocus                   = _SetFocus@4                 @475
    490494    SetForegroundWindow        = _SetForegroundWindow@4      @476
    491495    SetInternalWindowPos       = _SetInternalWindowPos@16    @477
    492     SetKeyboardState           = _SetKeyboardState@4         @478
    493     SetLastErrorEx             = _SetLastErrorEx@8           @479
    494 ;    SetLogonNotifyWindow       = _SetLogonNotifyWindow@??    @480
    495     SetMenu                    = _SetMenu@8                  @481
     496    SetKeyboardState           = _SetKeyboardState@4         @478
     497    SetLastErrorEx             = _SetLastErrorEx@8           @479
     498;    SetLogonNotifyWindow       = _SetLogonNotifyWindow@??    @480
     499    SetMenu                    = _SetMenu@8                  @481
    496500    SetMenuContextHelpId       = _SetMenuContextHelpId@8     @482
    497     SetMenuDefaultItem         = _SetMenuDefaultItem@12      @483
    498     SetMenuItemBitmaps         = _SetMenuItemBitmaps@20      @484
    499     SetMenuItemInfoA           = _SetMenuItemInfoA@16        @485
    500     SetMenuItemInfoW           = _SetMenuItemInfoW@16        @486
     501    SetMenuDefaultItem         = _SetMenuDefaultItem@12      @483
     502    SetMenuItemBitmaps         = _SetMenuItemBitmaps@20      @484
     503    SetMenuItemInfoA           = _SetMenuItemInfoA@16        @485
     504    SetMenuItemInfoW           = _SetMenuItemInfoW@16        @486
    501505    SetMessageExtraInfo        = _SetMessageExtraInfo@4      @487
    502     SetMessageQueue            = _SetMessageQueue@4          @488
    503     SetParent                  = _SetParent@8                @489
     506    SetMessageQueue            = _SetMessageQueue@4          @488
     507    SetParent                  = _SetParent@8                @489
    504508    SetProcessWindowStation    = _SetProcessWindowStation@4  @490
    505     SetProgmanWindow           = _SetProgmanWindow@4                 ;@522 ?
    506     SetPropA                   = _SetPropA@12                @491
    507     SetPropW                   = _SetPropW@12                @492
    508     SetRect                    = _SetRect@20                 @493
    509     SetRectEmpty               = _SetRectEmpty@4             @494
    510     SetScrollInfo              = _SetScrollInfo@16           @495
    511     SetScrollPos               = _SetScrollPos@16            @496
    512     SetScrollRange             = _SetScrollRange@20          @497
    513     SetShellWindow             = _SetShellWindow@4           @498
    514     SetShellWindowEx           = _SetShellWindowEx@8                 ;@531 ?
    515     SetSysColors               = _SetSysColors@12            @499
    516     SetSysColorsTemp           = _SetSysColorsTemp@0         @500
    517     SetSystemCursor            = _SetSystemCursor@8          @501
    518     SetTaskmanWindow           = _SetTaskmanWindow@4                 ;@537
    519     SetThreadDesktop           = _SetThreadDesktop@4         @502
    520     SetTimer                   = _SetTimer@16                @503
     509    SetProgmanWindow           = _SetProgmanWindow@4                 ;@522 ?
     510    SetPropA                   = _SetPropA@12                @491
     511    SetPropW                   = _SetPropW@12                @492
     512    SetRect                    = _SetRect@20                 @493
     513    SetRectEmpty               = _SetRectEmpty@4             @494
     514    SetScrollInfo              = _SetScrollInfo@16           @495
     515    SetScrollPos               = _SetScrollPos@16            @496
     516    SetScrollRange             = _SetScrollRange@20          @497
     517    SetShellWindow             = _SetShellWindow@4           @498
     518    SetShellWindowEx           = _SetShellWindowEx@8                 ;@531 ?
     519    SetSysColors               = _SetSysColors@12            @499
     520    SetSysColorsTemp           = _SetSysColorsTemp@0         @500
     521    SetSystemCursor            = _SetSystemCursor@8          @501
     522    SetTaskmanWindow           = _SetTaskmanWindow@4                 ;@537
     523    SetThreadDesktop           = _SetThreadDesktop@4         @502
     524    SetTimer                   = _SetTimer@16                @503
    521525    SetUserObjectInformationA  = _SetUserObjectInformationA@16 @504
    522526    SetUserObjectInformationW  = _SetUserObjectInformationW@16 @505
    523527    SetUserObjectSecurity      = _SetUserObjectSecurity@12   @506
    524528    SetWindowContextHelpId     = _SetWindowContextHelpId@8   @507
    525 ;    SetWindowFullScreenState   = _SetWindowFullScreenState@?? @508
    526     SetWindowLongA             = _SetWindowLongA@12          @509
    527     SetWindowLongW             = _SetWindowLongW@12          @510
    528     SetWindowPlacement         = _SetWindowPlacement@8       @511
    529     SetWindowPos               = _SetWindowPos@28            @512
    530     SetWindowRgn               = _SetWindowRgn@12            @513
    531     SetWindowTextA             = _SetWindowTextA@8           @514
    532     SetWindowTextW             = _SetWindowTextW@8           @515
    533     SetWindowWord              = _SetWindowWord@12           @516
    534     SetWindowsHookA            = _SetWindowsHookA@8          @517
    535     SetWindowsHookExA          = _SetWindowsHookExA@16       @518
    536     SetWindowsHookExW          = _SetWindowsHookExW@16       @519
    537     SetWindowsHookW            = _SetWindowsHookW@8          @520
    538     ShowCaret                  = _ShowCaret@4                @521
    539     ShowCursor                 = _ShowCursor@4               @522
    540     ShowOwnedPopups            = _ShowOwnedPopups@8          @523
    541     ShowScrollBar              = _ShowScrollBar@12           @524
    542     ShowWindow                 = _ShowWindow@8               @525
    543     ShowWindowAsync            = _ShowWindowAsync@8          @526
    544     SubtractRect               = _SubtractRect@12            @527
    545     SwapMouseButton            = _SwapMouseButton@4          @528
    546     SwitchDesktop              = _SwitchDesktop@4            @529
    547     SwitchToThisWindow         = _SwitchToThisWindow@8       @530
    548     SysErrorBox                = _SysErrorBox@12             @531
     529;    SetWindowFullScreenState   = _SetWindowFullScreenState@?? @508
     530    SetWindowLongA             = _SetWindowLongA@12          @509
     531    SetWindowLongW             = _SetWindowLongW@12          @510
     532    SetWindowPlacement         = _SetWindowPlacement@8       @511
     533    SetWindowPos               = _SetWindowPos@28            @512
     534    SetWindowRgn               = _SetWindowRgn@12            @513
     535    SetWindowTextA             = _SetWindowTextA@8           @514
     536    SetWindowTextW             = _SetWindowTextW@8           @515
     537    SetWindowWord              = _SetWindowWord@12           @516
     538    SetWindowsHookA            = _SetWindowsHookA@8          @517
     539    SetWindowsHookExA          = _SetWindowsHookExA@16       @518
     540    SetWindowsHookExW          = _SetWindowsHookExW@16       @519
     541    SetWindowsHookW            = _SetWindowsHookW@8          @520
     542    ShowCaret                  = _ShowCaret@4                @521
     543    ShowCursor                 = _ShowCursor@4               @522
     544    ShowOwnedPopups            = _ShowOwnedPopups@8          @523
     545    ShowScrollBar              = _ShowScrollBar@12           @524
     546    ShowWindow                 = _ShowWindow@8               @525
     547    ShowWindowAsync            = _ShowWindowAsync@8          @526
     548    SubtractRect               = _SubtractRect@12            @527
     549    SwapMouseButton            = _SwapMouseButton@4          @528
     550    SwitchDesktop              = _SwitchDesktop@4            @529
     551    SwitchToThisWindow         = _SwitchToThisWindow@8       @530
     552    SysErrorBox                = _SysErrorBox@12             @531
    549553    SystemParametersInfoA      = _SystemParametersInfoA@16   @532
    550554    SystemParametersInfoW      = _SystemParametersInfoW@16   @533
    551     TabbedTextOutA             = _TabbedTextOutA@32          @534
    552     TabbedTextOutW             = _TabbedTextOutW@32          @535
    553     TileChildWindows           = _TileChildWindows@8         @536
    554     TileWindows                = _TileWindows@20             @537
    555     ToAscii                    = _ToAscii@20                 @538
    556     ToAsciiEx                  = _ToAsciiEx@24               @539
    557     ToUnicode                  = _ToUnicode@24               @540
    558     TrackPopupMenu             = _TrackPopupMenu@28          @541
    559     TrackPopupMenuEx           = _TrackPopupMenuEx@24        @542
     555    TabbedTextOutA             = _TabbedTextOutA@32          @534
     556    TabbedTextOutW             = _TabbedTextOutW@32          @535
     557    TileChildWindows           = _TileChildWindows@8         @536
     558    TileWindows                = _TileWindows@20             @537
     559    ToAscii                    = _ToAscii@20                 @538
     560    ToAsciiEx                  = _ToAsciiEx@24               @539
     561    ToUnicode                  = _ToUnicode@24               @540
     562    TrackPopupMenu             = _TrackPopupMenu@28          @541
     563    TrackPopupMenuEx           = _TrackPopupMenuEx@24        @542
    560564    TranslateAccelerator       = _TranslateAcceleratorA@12   @543
    561565    TranslateAcceleratorA      = _TranslateAcceleratorA@12   @544
    562566    TranslateAcceleratorW      = _TranslateAcceleratorW@12   @545
    563567    TranslateMDISysAccel       = _TranslateMDISysAccel@8     @546
    564     TranslateMessage           = _TranslateMessage@4         @547
    565     UnhookWindowsHook          = _UnhookWindowsHook@8        @548
     568    TranslateMessage           = _TranslateMessage@4         @547
     569    UnhookWindowsHook          = _UnhookWindowsHook@8        @548
    566570    UnhookWindowsHookEx        = _UnhookWindowsHookEx@4      @549
    567     UnionRect                  = _UnionRect@12               @550
     571    UnionRect                  = _UnionRect@12               @550
    568572    UnloadKeyboardLayout       = _UnloadKeyboardLayout@4     @551
    569 ;    UnlockWindowStation        = _UnlockWindowStation@??     @552
    570     UnpackDDElParam            = _UnpackDDElParam@16         @553
    571     UnregisterClassA           = _UnregisterClassA@8         @554
    572     UnregisterClassW           = _UnregisterClassW@8         @555
    573     UnregisterHotKey           = _UnregisterHotKey@8         @556
    574     UpdateWindow               = _UpdateWindow@4             @557
    575 ;    UserClientDllInitialize    = _UserClientDllInitialize@?? @558
    576     UserSignalProc             = _UserSignalProc@16          @559
    577     ValidateRect               = _ValidateRect@8             @560
    578     ValidateRgn                = _ValidateRgn@8              @561
    579     VkKeyScanA                 = _VkKeyScanA@4              @562
    580     VkKeyScanExA               = _VkKeyScanExA@8             @563
    581     VkKeyScanExW               = _VkKeyScanExW@8             @564
    582     VkKeyScanW                 = _VkKeyScanW@4               @565
    583 ;    WNDPROC_CALLBACK           = _WNDPROC_CALLBACK@??        @566
    584     WaitForInputIdle           = _WaitForInputIdle@8         @567
    585     WaitMessage                = _WaitMessage@0              @568
    586     WinHelpA                   = _WinHelpA@16                @569
    587     WinHelpW                   = _WinHelpW@16                @570
     573;    UnlockWindowStation        = _UnlockWindowStation@??     @552
     574    UnpackDDElParam            = _UnpackDDElParam@16         @553
     575    UnregisterClassA           = _UnregisterClassA@8         @554
     576    UnregisterClassW           = _UnregisterClassW@8         @555
     577    UnregisterHotKey           = _UnregisterHotKey@8         @556
     578    UpdateWindow               = _UpdateWindow@4             @557
     579;    UserClientDllInitialize    = _UserClientDllInitialize@?? @558
     580    UserSignalProc             = _UserSignalProc@16          @559
     581    ValidateRect               = _ValidateRect@8             @560
     582    ValidateRgn                = _ValidateRgn@8              @561
     583    VkKeyScanA                 = _VkKeyScanA@4              @562
     584    VkKeyScanExA               = _VkKeyScanExA@8             @563
     585    VkKeyScanExW               = _VkKeyScanExW@8             @564
     586    VkKeyScanW                 = _VkKeyScanW@4               @565
     587;    WNDPROC_CALLBACK           = _WNDPROC_CALLBACK@??        @566
     588    WaitForInputIdle           = _WaitForInputIdle@8         @567
     589    WaitMessage                = _WaitMessage@0              @568
     590    WinHelpA                   = _WinHelpA@16                @569
     591    WinHelpW                   = _WinHelpW@16                @570
    588592    WinOldAppHackoMatic        = _WinOldAppHackoMatic@4      @571
    589     WindowFromDC               = _WindowFromDC@4             @572
    590     WindowFromPoint            = _WindowFromPoint@8          @573
    591     YieldTask                  = _YieldTask@0                @574
    592     keybd_event                = _keybd_event@16             @575
    593     mouse_event                = _mouse_event@20             @576
    594     wsprintfA                  = _wsprintfA                   @577
    595     wsprintfW                  = _wsprintfW                   @578
    596     wvsprintfA                 = _wvsprintfA@12              @579
    597     wvsprintfW                 = _wvsprintfW@12              @580
    598     GetMonitorInfoW               = _GetMonitorInfoW@8          @1000
    599     GetMonitorInfoA               = _GetMonitorInfoA@8          @1001
    600     MonitorFromWindow          = _MonitorFromWindow@8           @1002
    601     MonitorFromRect            = _MonitorFromRect@8             @1003
    602     MonitorFromPoint              = _MonitorFromPoint@12        @1004
    603     EnumDisplayMonitors        = _EnumDisplayMonitors@16        @1005
     593    WindowFromDC               = _WindowFromDC@4             @572
     594    WindowFromPoint            = _WindowFromPoint@8          @573
     595    YieldTask                  = _YieldTask@0                @574
     596    keybd_event                = _keybd_event@16             @575
     597    mouse_event                = _mouse_event@20             @576
     598    wsprintfA                  = _wsprintfA                   @577
     599    wsprintfW                  = _wsprintfW                   @578
     600    wvsprintfA                 = _wvsprintfA@12              @579
     601    wvsprintfW                 = _wvsprintfW@12              @580
     602    GetMonitorInfoW               = _GetMonitorInfoW@8          @1000
     603    GetMonitorInfoA               = _GetMonitorInfoA@8          @1001
     604    MonitorFromWindow          = _MonitorFromWindow@8           @1002
     605    MonitorFromRect            = _MonitorFromRect@8             @1003
     606    MonitorFromPoint              = _MonitorFromPoint@12        @1004
     607    EnumDisplayMonitors        = _EnumDisplayMonitors@16        @1005
    604608
    605     CreateWindowProc                    @2000
     609    CreateWindowProc                    @2000
    606610    GetOS2Callback__15Win32WindowProcFv = GetOS2Callback__Fv @2001
    607611
    608612; Wine helper function
    609     GetSysColorPen              = _GetSysColorPen@4              @2002
     613    GetSysColorPen              = _GetSysColorPen@4              @2002
    610614; COMCTL32 helper functions
    611     NativeDlgBoxIP             = _NativeDlgBoxIP@24          @2003
    612     NativeCreateDlgIP          = _NativeCreateDlgIP@24       @2004
    613     NativeLoadBitmap           = _NativeLoadBitmap@8         @2005
     615    NativeDlgBoxIP             = _NativeDlgBoxIP@24          @2003
     616    NativeCreateDlgIP          = _NativeCreateDlgIP@24       @2004
     617    NativeLoadBitmap           = _NativeLoadBitmap@8         @2005
  • trunk/src/user32/new/win32class.h

    r728 r819  
    1 /* $Id: win32class.h,v 1.6 1999-08-28 17:24:45 dengert Exp $ */
     1/* $Id: win32class.h,v 1.7 1999-09-04 17:56:41 dengert Exp $ */
    22/*
    33 * Win32 Window Class Managment Code for OS/2
     
    5555
    5656          BOOL  hasClassName(LPSTR classname, BOOL fUnicode = 0);
    57          
     57
    5858 static  void   UnregisterClassA(HINSTANCE hinst, LPSTR id);
    5959
     
    6464
    6565 //Standard class words/longs
     66 ULONG          windowStyle;            //GCL_STYLE     * must be offset 14h *
    6667 ULONG          nrExtraClassWords;      //GCL_CBCLSEXTRA
    6768 ULONG          nrExtraWindowWords;     //GCL_CBWNDEXTRA
     
    7273 PCHAR          menuNameA;              //GCL_MENUNAME
    7374 WCHAR         *menuNameW;              //GCL_MENUNAME
    74  ULONG          windowStyle;            //GCL_STYLE
    7575 WNDPROC        windowProc;             //GCL_WNDPROC
    7676 ULONG          classAtom;              //GCW_ATOM
  • trunk/src/user32/new/win32wbase.cpp

    r780 r819  
    1 /* $Id: win32wbase.cpp,v 1.5 1999-09-01 19:12:22 phaller Exp $ */
     1/* $Id: win32wbase.cpp,v 1.6 1999-09-04 17:56:41 dengert Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    6262//******************************************************************************
    6363Win32BaseWindow::Win32BaseWindow(CREATESTRUCTA *lpCreateStructA, ATOM classAtom, BOOL isUnicode)
    64                         : GenericObject(&windows, OBJTYPE_WINDOW), ChildWindow()
     64                        : GenericObject(&windows, OBJTYPE_WINDOW), ChildWindow()
    6565{
    6666  Init();
     
    7272void Win32BaseWindow::Init()
    7373{
    74   isUnicode        = FALSE;
    75   fCreated         = FALSE;
    76   fFirstShow       = TRUE;
    77 
    78   windowNameA      = NULL;
    79   windowNameW      = NULL;
     74  isUnicode        = FALSE;
     75  fCreated         = FALSE;
     76  fFirstShow       = TRUE;
     77
     78  windowNameA      = NULL;
     79  windowNameW      = NULL;
    8080  wndNameLength    = 0;
    8181
     
    8383  nrUserWindowLong = 0;
    8484
    85   magic            = WIN32PM_MAGIC;
    86   OS2Hwnd          = 0;
    87   OS2HwndFrame     = 0;
    88   OS2HwndMenu      = 0;
    89   Win32Hwnd        = 0;
     85  magic            = WIN32PM_MAGIC;
     86  OS2Hwnd          = 0;
     87  OS2HwndFrame     = 0;
     88  OS2HwndMenu      = 0;
     89  Win32Hwnd        = 0;
    9090
    9191  if(HwAllocateWindowHandle(&Win32Hwnd, (ULONG)this) == FALSE)
    9292  {
    93         dprintf(("Win32BaseWindow::Init HwAllocateWindowHandle failed!!"));
    94         DebugInt3();
    95   }
    96 
    97   posx = posy      = 0;
     93        dprintf(("Win32BaseWindow::Init HwAllocateWindowHandle failed!!"));
     94        DebugInt3();
     95  }
     96
     97  posx = posy      = 0;
    9898  width = height   = 0;
    9999
    100   dwExStyle        = 0;
    101   dwStyle          = 0;
    102   win32wndproc     = 0;
    103   hInstance        = 0;
    104   windowId         = 0xFFFFFFFF;        //default = -1
    105   userData         = 0;
     100  dwExStyle        = 0;
     101  dwStyle          = 0;
     102  win32wndproc     = 0;
     103  hInstance        = 0;
     104  windowId         = 0xFFFFFFFF;        //default = -1
     105  userData         = 0;
    106106
    107107  hwndLinkAfter    = HWND_BOTTOM;
    108   flags            = 0;
    109   isIcon           = FALSE;
     108  flags            = 0;
     109  isIcon           = FALSE;
    110110  lastHitTestVal   = 0;
    111   owner            = NULL;
    112   windowClass      = 0;
     111  owner            = NULL;
     112  windowClass      = 0;
    113113
    114114  acceltableResource = NULL;
    115   menuResource       = NULL;
    116   iconResource       = NULL;
     115  menuResource       = NULL;
     116  iconResource       = NULL;
    117117}
    118118//******************************************************************************
     
    125125
    126126  if(Win32Hwnd)
    127         HwFreeWindowHandle(Win32Hwnd);
     127        HwFreeWindowHandle(Win32Hwnd);
    128128
    129129  if(userWindowLong)
    130         free(userWindowLong);
     130        free(userWindowLong);
    131131  if(windowNameA) {
    132         free(windowNameA);
    133         windowNameA = NULL;
     132        free(windowNameA);
     133        windowNameA = NULL;
    134134  }
    135135  if(windowNameW) {
    136         free(windowNameW);
    137         windowNameW = NULL;
     136        free(windowNameW);
     137        windowNameW = NULL;
    138138  }
    139139}
     
    157157    if (cs->hwndParent)
    158158    {
    159             Win32BaseWindow *window = GetWindowFromHandle(cs->hwndParent);
    160             if(!window) {
    161                     dprintf(("Bad parent %04x\n", cs->hwndParent ));
    162                     SetLastError(ERROR_INVALID_PARAMETER);
    163                     return FALSE;
    164             }
    165             /* Make sure parent is valid */
    166             if (!window->IsWindow() )
    167             {
    168                     dprintf(("Bad parent %04x\n", cs->hwndParent ));
    169                     SetLastError(ERROR_INVALID_PARAMETER);
    170                     return FALSE;
    171             }
     159            Win32BaseWindow *window = GetWindowFromHandle(cs->hwndParent);
     160            if(!window) {
     161                    dprintf(("Bad parent %04x\n", cs->hwndParent ));
     162                    SetLastError(ERROR_INVALID_PARAMETER);
     163                    return FALSE;
     164            }
     165            /* Make sure parent is valid */
     166            if (!window->IsWindow() )
     167            {
     168                    dprintf(("Bad parent %04x\n", cs->hwndParent ));
     169                    SetLastError(ERROR_INVALID_PARAMETER);
     170                    return FALSE;
     171            }
    172172    }
    173173    else
    174174    if ((cs->style & WS_CHILD) && !(cs->style & WS_POPUP)) {
    175             dprintf(("No parent for child window\n" ));
    176             SetLastError(ERROR_INVALID_PARAMETER);
    177             return FALSE;  /* WS_CHILD needs a parent, but WS_POPUP doesn't */
     175            dprintf(("No parent for child window\n" ));
     176            SetLastError(ERROR_INVALID_PARAMETER);
     177            return FALSE;  /* WS_CHILD needs a parent, but WS_POPUP doesn't */
    178178    }
    179179
     
    182182  if (!windowClass)
    183183  {
    184         GlobalGetAtomNameA( classAtom, buffer, sizeof(buffer) );
    185         dprintf(("Bad class '%s'\n", buffer ));
    186         return 0;
     184        GlobalGetAtomNameA( classAtom, buffer, sizeof(buffer) );
     185        dprintf(("Bad class '%s'\n", buffer ));
     186        return 0;
    187187  }
    188188
     
    192192   */
    193193  if (!HIWORD(cs->lpszClass) ) {
    194         if (isUnicode) {
    195                 GlobalGetAtomNameW( classAtom, (LPWSTR)buffer, sizeof(buffer) );
    196         }
    197         else {
    198                 GlobalGetAtomNameA( classAtom, buffer, sizeof(buffer) );
    199         }
    200         cs->lpszClass = buffer;
     194        if (isUnicode) {
     195                GlobalGetAtomNameW( classAtom, (LPWSTR)buffer, sizeof(buffer) );
     196        }
     197        else {
     198                GlobalGetAtomNameA( classAtom, buffer, sizeof(buffer) );
     199        }
     200        cs->lpszClass = buffer;
    201201  }
    202202
     
    204204  if (cs->x == CW_USEDEFAULT || cs->x == CW_USEDEFAULT16)
    205205  {
    206 //        PDB *pdb = PROCESS_Current();
     206//        PDB *pdb = PROCESS_Current();
    207207
    208208       /* Never believe Microsoft's documentation... CreateWindowEx doc says
    209         * that if an overlapped window is created with WS_VISIBLE style bit
    210         * set and the x parameter is set to CW_USEDEFAULT, the system ignores
    211         * the y parameter. However, disassembling NT implementation (WIN32K.SYS)
    212         * reveals that
    213         *
    214         * 1) not only if checks for CW_USEDEFAULT but also for CW_USEDEFAULT16
    215         * 2) it does not ignore the y parameter as the docs claim; instead, it
    216         *    uses it as second parameter to ShowWindow() unless y is either
    217         *    CW_USEDEFAULT or CW_USEDEFAULT16.
    218         *
    219         * The fact that we didn't do 2) caused bogus windows pop up when wine
    220         * was running apps that were using this obscure feature. Example -
    221         * calc.exe that comes with Win98 (only Win98, it's different from
    222         * the one that comes with Win95 and NT)
    223         */
    224         if (cs->y != CW_USEDEFAULT && cs->y != CW_USEDEFAULT16) sw = cs->y;
    225 
    226         /* We have saved cs->y, now we can trash it */
     209        * that if an overlapped window is created with WS_VISIBLE style bit
     210        * set and the x parameter is set to CW_USEDEFAULT, the system ignores
     211        * the y parameter. However, disassembling NT implementation (WIN32K.SYS)
     212        * reveals that
     213        *
     214        * 1) not only if checks for CW_USEDEFAULT but also for CW_USEDEFAULT16
     215        * 2) it does not ignore the y parameter as the docs claim; instead, it
     216        *    uses it as second parameter to ShowWindow() unless y is either
     217        *    CW_USEDEFAULT or CW_USEDEFAULT16.
     218        *
     219        * The fact that we didn't do 2) caused bogus windows pop up when wine
     220        * was running apps that were using this obscure feature. Example -
     221        * calc.exe that comes with Win98 (only Win98, it's different from
     222        * the one that comes with Win95 and NT)
     223        */
     224        if (cs->y != CW_USEDEFAULT && cs->y != CW_USEDEFAULT16) sw = cs->y;
     225
     226        /* We have saved cs->y, now we can trash it */
    227227#if 0
    228         if (   !(cs->style & (WS_CHILD | WS_POPUP))
    229             &&  (pdb->env_db->startup_info->dwFlags & STARTF_USEPOSITION) )
    230         {
    231             cs->x = pdb->env_db->startup_info->dwX;
    232             cs->y = pdb->env_db->startup_info->dwY;
    233         }
     228        if (   !(cs->style & (WS_CHILD | WS_POPUP))
     229            &&  (pdb->env_db->startup_info->dwFlags & STARTF_USEPOSITION) )
     230        {
     231            cs->x = pdb->env_db->startup_info->dwX;
     232            cs->y = pdb->env_db->startup_info->dwY;
     233        }
    234234#endif
    235             cs->x = 0;
    236             cs->y = 0;
    237 //        }
     235            cs->x = 0;
     236            cs->y = 0;
     237//        }
    238238  }
    239239  if (cs->cx == CW_USEDEFAULT || cs->cx == CW_USEDEFAULT16)
    240240  {
    241241#if 0
    242         PDB *pdb = PROCESS_Current();
    243         if (   !(cs->style & (WS_CHILD | WS_POPUP))
    244             &&  (pdb->env_db->startup_info->dwFlags & STARTF_USESIZE) )
    245         {
    246             cs->cx = pdb->env_db->startup_info->dwXSize;
    247             cs->cy = pdb->env_db->startup_info->dwYSize;
    248         }
    249         else
    250         {
     242        PDB *pdb = PROCESS_Current();
     243        if (   !(cs->style & (WS_CHILD | WS_POPUP))
     244            &&  (pdb->env_db->startup_info->dwFlags & STARTF_USESIZE) )
     245        {
     246            cs->cx = pdb->env_db->startup_info->dwXSize;
     247            cs->cy = pdb->env_db->startup_info->dwYSize;
     248        }
     249        else
     250        {
    251251#endif
    252             cs->cx = 600; /* FIXME */
    253             cs->cy = 400;
    254 //        }
     252            cs->cx = 600; /* FIXME */
     253            cs->cy = 400;
     254//        }
    255255  }
    256256
     
    261261  nrUserWindowLong = windowClass->getExtraWndWords();
    262262  if(nrUserWindowLong) {
    263         userWindowLong = (ULONG *)_smalloc(nrUserWindowLong);
    264         memset(userWindowLong, 0, nrUserWindowLong);
     263        userWindowLong = (ULONG *)_smalloc(nrUserWindowLong);
     264        memset(userWindowLong, 0, nrUserWindowLong);
    265265  }
    266266
    267267  if ((cs->style & WS_CHILD) && cs->hwndParent)
    268268  {
    269         SetParent(cs->hwndParent);
    270         owner = GetWindowFromHandle(cs->hwndParent);
    271         if(owner == NULL)
    272         {
    273             dprintf(("HwGetWindowHandleData couldn't find owner window %x!!!", cs->hwndParent));
    274             return FALSE;
    275         }
     269        SetParent(cs->hwndParent);
     270        owner = GetWindowFromHandle(cs->hwndParent);
     271        if(owner == NULL)
     272        {
     273            dprintf(("HwGetWindowHandleData couldn't find owner window %x!!!", cs->hwndParent));
     274            return FALSE;
     275        }
    276276  }
    277277  else
    278278  {
    279         if (!cs->hwndParent) {
    280             owner = NULL;
    281         }
    282         else
    283         {
    284             owner = GetWindowFromHandle(cs->hwndParent);
    285             if(owner == NULL)
    286             {
    287                 dprintf(("HwGetWindowHandleData couldn't find owner window %x!!!", cs->hwndParent));
    288                 return FALSE;
    289             }
    290         }
     279        if (!cs->hwndParent) {
     280            owner = NULL;
     281        }
     282        else
     283        {
     284            owner = GetWindowFromHandle(cs->hwndParent);
     285            if(owner == NULL)
     286            {
     287                dprintf(("HwGetWindowHandleData couldn't find owner window %x!!!", cs->hwndParent));
     288                return FALSE;
     289            }
     290        }
    291291  }
    292292
     
    297297
    298298  hwndLinkAfter = ((cs->style & (WS_CHILD|WS_MAXIMIZE)) == WS_CHILD)
    299                   ? HWND_BOTTOM : HWND_TOP;
     299                  ? HWND_BOTTOM : HWND_TOP;
    300300
    301301#if 0
     
    306306    {
    307307    CBT_CREATEWNDA cbtc;
    308         LRESULT ret;
     308        LRESULT ret;
    309309
    310310    cbtc.lpcs = cs;
    311311    cbtc.hwndInsertAfter = hwndLinkAfter;
    312         ret = unicode ? HOOK_CallHooksW(WH_CBT, HCBT_CREATEWND, Win32Hwnd, (LPARAM)&cbtc)
    313                       : HOOK_CallHooksA(WH_CBT, HCBT_CREATEWND, Win32Hwnd, (LPARAM)&cbtc);
    314         if (ret)
     312        ret = unicode ? HOOK_CallHooksW(WH_CBT, HCBT_CREATEWND, Win32Hwnd, (LPARAM)&cbtc)
     313                      : HOOK_CallHooksA(WH_CBT, HCBT_CREATEWND, Win32Hwnd, (LPARAM)&cbtc);
     314        if (ret)
    315315    {
    316         TRACE_(win)("CBT-hook returned 0\n");
    317         wndPtr->pDriver->pFinalize(wndPtr);
    318             retvalue =  0;
    319             goto end;
     316        TRACE_(win)("CBT-hook returned 0\n");
     317        wndPtr->pDriver->pFinalize(wndPtr);
     318            retvalue =  0;
     319            goto end;
    320320    }
    321321    }
     
    328328  if (!(cs->style & WS_CHILD))
    329329  {
    330         dwStyle |= WS_CLIPSIBLINGS;
    331         if (!(cs->style & WS_POPUP))
    332         {
    333             dwStyle |= WS_CAPTION;
    334             flags |= WIN_NEED_SIZE;
    335         }
     330        dwStyle |= WS_CLIPSIBLINGS;
     331        if (!(cs->style & WS_POPUP))
     332        {
     333            dwStyle |= WS_CAPTION;
     334            flags |= WIN_NEED_SIZE;
     335        }
    336336  }
    337337  if (cs->dwExStyle & WS_EX_DLGMODALFRAME) dwStyle &= ~WS_THICKFRAME;
     
    348348  if ((cs->style & WS_THICKFRAME) || !(cs->style & (WS_POPUP | WS_CHILD)))
    349349  {
    350         GetMinMaxInfo(&maxSize, &maxPos, &minTrack, &maxTrack);
    351         if (maxSize.x < cs->cx) cs->cx = maxSize.x;
    352         if (maxSize.y < cs->cy) cs->cy = maxSize.y;
    353         if (cs->cx < minTrack.x ) cs->cx = minTrack.x;
    354         if (cs->cy < minTrack.y ) cs->cy = minTrack.y;
     350        GetMinMaxInfo(&maxSize, &maxPos, &minTrack, &maxTrack);
     351        if (maxSize.x < cs->cx) cs->cx = maxSize.x;
     352        if (maxSize.y < cs->cy) cs->cy = maxSize.y;
     353        if (cs->cx < minTrack.x ) cs->cx = minTrack.x;
     354        if (cs->cy < minTrack.y ) cs->cy = minTrack.y;
    355355  }
    356356
    357357  if(cs->style & WS_CHILD)
    358358  {
    359         if(cs->cx < 0) cs->cx = 0;
    360         if(cs->cy < 0) cs->cy = 0;
     359        if(cs->cx < 0) cs->cx = 0;
     360        if(cs->cy < 0) cs->cy = 0;
    361361  }
    362362  else
    363363  {
    364         if (cs->cx <= 0) cs->cx = 1;
    365         if (cs->cy <= 0) cs->cy = 1;
     364        if (cs->cx <= 0) cs->cx = 1;
     365        if (cs->cy <= 0) cs->cy = 1;
    366366  }
    367367
     
    370370  rectWindow.right  = cs->x + cs->cx;
    371371  rectWindow.bottom = cs->y + cs->cy;
    372   rectClient        = rectWindow;
     372  rectClient        = rectWindow;
    373373
    374374  DWORD dwOSWinStyle, dwOSFrameStyle;
     
    379379#if 1
    380380  if(cs->style & WS_CHILD) {
    381         dwOSFrameStyle = 0;
     381        dwOSFrameStyle = 0;
    382382  }
    383383#endif
    384384
    385385  if(cs->lpszName)
    386         SetWindowText((LPSTR)cs->lpszName);
     386        SetWindowText((LPSTR)cs->lpszName);
    387387
    388388  OS2Hwnd = OSLibWinCreateWindow((getParent()) ? getParent()->getOS2WindowHandle() : OSLIB_HWND_DESKTOP,
    389                                 dwOSWinStyle, dwOSFrameStyle, (char *)windowNameA,
    390                                 (owner) ? owner->getOS2WindowHandle() : OSLIB_HWND_DESKTOP,
    391                                 (hwndLinkAfter == HWND_BOTTOM) ? TRUE : FALSE,
    392                                 &OS2HwndFrame);
     389                                dwOSWinStyle, dwOSFrameStyle, (char *)windowNameA,
     390                                (owner) ? owner->getOS2WindowHandle() : OSLIB_HWND_DESKTOP,
     391                                (hwndLinkAfter == HWND_BOTTOM) ? TRUE : FALSE,
     392                                &OS2HwndFrame);
    393393
    394394  if(OS2Hwnd == 0) {
    395         dprintf(("Window creation failed!!"));
    396         return FALSE;
     395        dprintf(("Window creation failed!!"));
     396        return FALSE;
    397397  }
    398398
    399399  if(OSLibWinSetWindowULong(OS2Hwnd, OFFSET_WIN32WNDPTR, (ULONG)this) == FALSE) {
    400         dprintf(("WM_CREATE: WinSetWindowULong %X failed!!", OS2Hwnd));
    401         return FALSE;
     400        dprintf(("WM_CREATE: WinSetWindowULong %X failed!!", OS2Hwnd));
     401        return FALSE;
    402402  }
    403403  if(OSLibWinSetWindowULong(OS2Hwnd, OFFSET_WIN32PM_MAGIC, WIN32PM_MAGIC) == FALSE) {
    404         dprintf(("WM_CREATE: WinSetWindowULong2 %X failed!!", OS2Hwnd));
    405         return FALSE;
     404        dprintf(("WM_CREATE: WinSetWindowULong2 %X failed!!", OS2Hwnd));
     405        return FALSE;
    406406  }
    407407  //SvL: Need to store the shared memory base, or else other apps can map it into their memory space
    408408  if(OSLibWinSetWindowULong(OS2Hwnd, OFFSET_WIN32PM_SHAREDMEM, HeapGetSharedMemBase()) == FALSE) {
    409         dprintf(("WM_CREATE: WinSetWindowULong2 %X failed!!", OS2Hwnd));
    410         return FALSE;
     409        dprintf(("WM_CREATE: WinSetWindowULong2 %X failed!!", OS2Hwnd));
     410        return FALSE;
    411411  }
    412412#if 0
    413413  if(OS2Hwnd != OS2HwndFrame) {
    414414    if(OSLibWinSetWindowULong(OS2HwndFrame, OFFSET_WIN32WNDPTR, (ULONG)this) == FALSE) {
    415             dprintf(("WM_CREATE: WinSetWindowULong %X failed!!", OS2HwndFrame));
    416             return FALSE;
     415            dprintf(("WM_CREATE: WinSetWindowULong %X failed!!", OS2HwndFrame));
     416            return FALSE;
    417417    }
    418418    if(OSLibWinSetWindowULong(OS2HwndFrame, OFFSET_WIN32PM_MAGIC, WIN32PM_MAGIC) == FALSE) {
    419             dprintf(("WM_CREATE: WinSetWindowULong2 %X failed!!", OS2HwndFrame));
    420             return FALSE;
     419            dprintf(("WM_CREATE: WinSetWindowULong2 %X failed!!", OS2HwndFrame));
     420            return FALSE;
    421421    }
    422422    //SvL: Need to store the shared memory base, or else other apps can map it into their memory space
    423423    if(OSLibWinSetWindowULong(OS2HwndFrame, OFFSET_WIN32PM_SHAREDMEM, HeapGetSharedMemBase()) == FALSE) {
    424             dprintf(("WM_CREATE: WinSetWindowULong2 %X failed!!", OS2HwndFrame));
    425             return FALSE;
     424            dprintf(("WM_CREATE: WinSetWindowULong2 %X failed!!", OS2HwndFrame));
     425            return FALSE;
    426426    }
    427427  }
    428428#endif
     429
     430  fakeWinBase.hwndThisObject = OS2Hwnd;
     431  fakeWinBase.pWindowClass = windowClass;
     432  *(PULONG)&fakeWinBase -= 0x90 - 8;
     433//  SetFakeOpen32();
    429434
    430435  /* Set the window menu */
    431436  if ((dwStyle & (WS_CAPTION | WS_CHILD)) == WS_CAPTION )
    432437  {
    433         if (cs->hMenu) SetMenu(cs->hMenu);
    434         else
    435         {
    436                 if (windowClass->getMenuNameA()) {
    437                         cs->hMenu = LoadMenuA(cs->hInstance, windowClass->getMenuNameA());
    438                         if (cs->hMenu) SetMenu(cs->hMenu );
    439                 }
    440         }
    441   }
    442   else  windowId = (UINT)cs->hMenu;
     438        if (cs->hMenu) SetMenu(cs->hMenu);
     439        else
     440        {
     441                if (windowClass->getMenuNameA()) {
     442                        cs->hMenu = LoadMenuA(cs->hInstance, windowClass->getMenuNameA());
     443                        if (cs->hMenu) SetMenu(cs->hMenu );
     444                }
     445        }
     446  }
     447  else  windowId = (UINT)cs->hMenu;
    443448
    444449  //Set icon from class
    445450  if(windowClass->getIcon())
    446         SetIcon(windowClass->getIcon());
     451        SetIcon(windowClass->getIcon());
    447452
    448453  if(getParent()) {
    449         SetWindowPos(getParent()->getWindowHandle(), rectClient.left, rectClient.top,
    450                      rectClient.right-rectClient.left,
    451                      rectClient.bottom-rectClient.top,
    452                      SWP_NOACTIVATE | SWP_NOZORDER);
     454        SetWindowPos(getParent()->getWindowHandle(), rectClient.left, rectClient.top,
     455                     rectClient.right-rectClient.left,
     456                     rectClient.bottom-rectClient.top,
     457                     SWP_NOACTIVATE | SWP_NOZORDER);
    453458  }
    454459  else {
    455         SetWindowPos(HWND_TOP, rectClient.left, rectClient.top,
    456                      rectClient.right-rectClient.left,
    457                      rectClient.bottom-rectClient.top,
    458                      SWP_NOACTIVATE);
     460        SetWindowPos(HWND_TOP, rectClient.left, rectClient.top,
     461                     rectClient.right-rectClient.left,
     462                     rectClient.bottom-rectClient.top,
     463                     SWP_NOACTIVATE);
    459464  }
    460465  //Get the client window rectangle
     
    470475  if(SendInternalMessage(WM_NCCREATE, 0, (LPARAM)cs) )
    471476  {
    472         //doesn't work right, messes up client rectangle
     477        //doesn't work right, messes up client rectangle
    473478#if 0
    474         SendNCCalcSize(FALSE, &rectWindow, NULL, NULL, 0, &rectClient );
     479        SendNCCalcSize(FALSE, &rectWindow, NULL, NULL, 0, &rectClient );
    475480#endif
    476         OffsetRect(&rectWindow, maxPos.x - rectWindow.left, maxPos.y - rectWindow.top);
    477         dprintf(("Sending WM_CREATE"));
    478         if( (SendInternalMessage(WM_CREATE, 0, (LPARAM)cs )) != -1 )
    479         {
    480             if(!(flags & WIN_NEED_SIZE)) {
    481                 SendMessageA(WM_SIZE, SIZE_RESTORED,
    482                                 MAKELONG(rectClient.right-rectClient.left,
    483                                         rectClient.bottom-rectClient.top));
    484                 SendMessageA(WM_MOVE, 0, MAKELONG( rectClient.left, rectClient.top ) );
    485             }
    486             if (cs->style & WS_VISIBLE) ShowWindow( sw );
     481        OffsetRect(&rectWindow, maxPos.x - rectWindow.left, maxPos.y - rectWindow.top);
     482        dprintf(("Sending WM_CREATE"));
     483        if( (SendInternalMessage(WM_CREATE, 0, (LPARAM)cs )) != -1 )
     484        {
     485            if(!(flags & WIN_NEED_SIZE)) {
     486                SendMessageA(WM_SIZE, SIZE_RESTORED,
     487                                MAKELONG(rectClient.right-rectClient.left,
     488                                        rectClient.bottom-rectClient.top));
     489                SendMessageA(WM_MOVE, 0, MAKELONG( rectClient.left, rectClient.top ) );
     490            }
     491            if (cs->style & WS_VISIBLE) ShowWindow( sw );
    487492
    488493#if 0
    489             /* Call WH_SHELL hook */
    490 
    491             if (!(dwStyle & WS_CHILD) && !owner)
    492                 HOOK_CallHooks16( WH_SHELL, HSHELL_WINDOWCREATED, hwnd, 0 );
     494            /* Call WH_SHELL hook */
     495
     496            if (!(dwStyle & WS_CHILD) && !owner)
     497                HOOK_CallHooks16( WH_SHELL, HSHELL_WINDOWCREATED, hwnd, 0 );
    493498#endif
    494             SetLastError(0);
    495             return TRUE;
    496         }
     499            SetLastError(0);
     500            return TRUE;
     501        }
    497502  }
    498503  fCreated = FALSE;
     
    504509#if 0
    505510/***********************************************************************
    506  *           WINPOS_MinMaximize
     511 *           WINPOS_MinMaximize
    507512 *
    508513 * Fill in lpRect and return additional flags to be used with SetWindowPos().
     
    523528    if( dwStyle & WS_MINIMIZE )
    524529    {
    525         if( !SendInternalMessageA(WM_QUERYOPEN, 0, 0L ) )
    526         return (SWP_NOSIZE | SWP_NOMOVE);
    527         swpFlags |= SWP_NOCOPYBITS;
     530        if( !SendInternalMessageA(WM_QUERYOPEN, 0, 0L ) )
     531        return (SWP_NOSIZE | SWP_NOMOVE);
     532        swpFlags |= SWP_NOCOPYBITS;
    528533    }
    529534    switch( cmd )
    530535    {
    531         case SW_MINIMIZE:
    532         if( dwStyle & WS_MAXIMIZE)
    533         {
    534              flags |= WIN_RESTORE_MAX;
    535              dwStyle &= ~WS_MAXIMIZE;
    536                 }
    537                 else
    538              flags &= ~WIN_RESTORE_MAX;
    539              dwStyle |= WS_MINIMIZE;
     536        case SW_MINIMIZE:
     537        if( dwStyle & WS_MAXIMIZE)
     538        {
     539             flags |= WIN_RESTORE_MAX;
     540             dwStyle &= ~WS_MAXIMIZE;
     541                }
     542                else
     543             flags &= ~WIN_RESTORE_MAX;
     544             dwStyle |= WS_MINIMIZE;
    540545
    541546#if 0
    542         if( flags & WIN_NATIVE )
    543              if( pDriver->pSetHostAttr( wndPtr, HAK_ICONICSTATE, TRUE ) )
    544              swpFlags |= MINMAX_NOSWP;
     547        if( flags & WIN_NATIVE )
     548             if( pDriver->pSetHostAttr( wndPtr, HAK_ICONICSTATE, TRUE ) )
     549             swpFlags |= MINMAX_NOSWP;
    545550#endif
    546551
    547         lpPos->ptIconPos = WINPOS_FindIconPos( wndPtr, lpPos->ptIconPos );
    548 
    549         SetRect(lpRect, lpPos->ptIconPos.x, lpPos->ptIconPos.y,
    550              GetSystemMetrics(SM_CXICON), GetSystemMetrics(SM_CYICON) );
    551         swpFlags |= SWP_NOCOPYBITS;
    552         break;
    553 
    554         case SW_MAXIMIZE:
    555                 WINPOS_GetMinMaxInfo( wndPtr, &size, &pt, NULL, NULL );
    556 
    557         if( dwStyle & WS_MINIMIZE )
    558         {
    559              if( flags & WIN_NATIVE )
    560              if( pDriver->pSetHostAttr( wndPtr, HAK_ICONICSTATE, FALSE ) )
    561                 swpFlags |= MINMAX_NOSWP;
    562 
    563              WINPOS_ShowIconTitle( wndPtr, FALSE );
    564              dwStyle &= ~WS_MINIMIZE;
    565         }
    566                 dwStyle |= WS_MAXIMIZE;
    567 
    568         SetRect16( lpRect, lpPos->ptMaxPos.x, lpPos->ptMaxPos.y,
    569                     size.x, size.y );
    570         break;
    571 
    572         case SW_RESTORE:
    573         if( dwStyle & WS_MINIMIZE )
    574         {
    575              if( flags & WIN_NATIVE )
    576              if( pDriver->pSetHostAttr( wndPtr, HAK_ICONICSTATE, FALSE ) )
    577                 swpFlags |= MINMAX_NOSWP;
    578 
    579              dwStyle &= ~WS_MINIMIZE;
    580              WINPOS_ShowIconTitle( wndPtr, FALSE );
    581 
    582              if( flags & WIN_RESTORE_MAX)
    583              {
    584              /* Restore to maximized position */
    585                         CONV_POINT16TO32( &lpPos->ptMaxPos, &pt );
    586                         WINPOS_GetMinMaxInfo( wndPtr, &size, &pt, NULL, NULL);
    587                         CONV_POINT32TO16( &pt, &lpPos->ptMaxPos );
    588              dwStyle |= WS_MAXIMIZE;
    589              SetRect16( lpRect, lpPos->ptMaxPos.x, lpPos->ptMaxPos.y, size.x, size.y );
    590              break;
    591              }
    592         }
    593         else
    594              if( !(dwStyle & WS_MAXIMIZE) ) return (UINT16)(-1);
    595              else dwStyle &= ~WS_MAXIMIZE;
    596 
    597         /* Restore to normal position */
    598 
    599         *lpRect = lpPos->rectNormal;
    600         lpRect->right -= lpRect->left;
    601         lpRect->bottom -= lpRect->top;
    602 
    603         break;
     552        lpPos->ptIconPos = WINPOS_FindIconPos( wndPtr, lpPos->ptIconPos );
     553
     554        SetRect(lpRect, lpPos->ptIconPos.x, lpPos->ptIconPos.y,
     555             GetSystemMetrics(SM_CXICON), GetSystemMetrics(SM_CYICON) );
     556        swpFlags |= SWP_NOCOPYBITS;
     557        break;
     558
     559        case SW_MAXIMIZE:
     560                WINPOS_GetMinMaxInfo( wndPtr, &size, &pt, NULL, NULL );
     561
     562        if( dwStyle & WS_MINIMIZE )
     563        {
     564             if( flags & WIN_NATIVE )
     565             if( pDriver->pSetHostAttr( wndPtr, HAK_ICONICSTATE, FALSE ) )
     566                swpFlags |= MINMAX_NOSWP;
     567
     568             WINPOS_ShowIconTitle( wndPtr, FALSE );
     569             dwStyle &= ~WS_MINIMIZE;
     570        }
     571                dwStyle |= WS_MAXIMIZE;
     572
     573        SetRect16( lpRect, lpPos->ptMaxPos.x, lpPos->ptMaxPos.y,
     574                    size.x, size.y );
     575        break;
     576
     577        case SW_RESTORE:
     578        if( dwStyle & WS_MINIMIZE )
     579        {
     580             if( flags & WIN_NATIVE )
     581             if( pDriver->pSetHostAttr( wndPtr, HAK_ICONICSTATE, FALSE ) )
     582                swpFlags |= MINMAX_NOSWP;
     583
     584             dwStyle &= ~WS_MINIMIZE;
     585             WINPOS_ShowIconTitle( wndPtr, FALSE );
     586
     587             if( flags & WIN_RESTORE_MAX)
     588             {
     589             /* Restore to maximized position */
     590                        CONV_POINT16TO32( &lpPos->ptMaxPos, &pt );
     591                        WINPOS_GetMinMaxInfo( wndPtr, &size, &pt, NULL, NULL);
     592                        CONV_POINT32TO16( &pt, &lpPos->ptMaxPos );
     593             dwStyle |= WS_MAXIMIZE;
     594             SetRect16( lpRect, lpPos->ptMaxPos.x, lpPos->ptMaxPos.y, size.x, size.y );
     595             break;
     596             }
     597        }
     598        else
     599             if( !(dwStyle & WS_MAXIMIZE) ) return (UINT16)(-1);
     600             else dwStyle &= ~WS_MAXIMIZE;
     601
     602        /* Restore to normal position */
     603
     604        *lpRect = lpPos->rectNormal;
     605        lpRect->right -= lpRect->left;
     606        lpRect->bottom -= lpRect->top;
     607
     608        break;
    604609    }
    605610    } else swpFlags |= SWP_NOSIZE | SWP_NOMOVE;
     
    608613#endif
    609614/*******************************************************************
    610  *           GetMinMaxInfo
     615 *           GetMinMaxInfo
    611616 *
    612617 * Get the minimized and maximized information for a window.
    613618 */
    614619void Win32BaseWindow::GetMinMaxInfo(POINT *maxSize, POINT *maxPos,
    615                                 POINT *minTrack, POINT *maxTrack )
     620                                POINT *minTrack, POINT *maxTrack )
    616621{
    617622    MINMAXINFO MinMax;
     
    630635    else if (HAS_DLGFRAME( dwStyle, dwExStyle ))
    631636    {
    632         xinc = GetSystemMetrics(SM_CXDLGFRAME);
    633         yinc = GetSystemMetrics(SM_CYDLGFRAME);
     637        xinc = GetSystemMetrics(SM_CXDLGFRAME);
     638        yinc = GetSystemMetrics(SM_CYDLGFRAME);
    634639    }
    635640    else
    636641    {
    637         xinc = yinc = 0;
    638         if (HAS_THICKFRAME(dwStyle))
    639         {
    640             xinc += GetSystemMetrics(SM_CXFRAME);
    641             yinc += GetSystemMetrics(SM_CYFRAME);
    642         }
    643         if (dwStyle & WS_BORDER)
    644         {
    645             xinc += GetSystemMetrics(SM_CXBORDER);
    646             yinc += GetSystemMetrics(SM_CYBORDER);
    647         }
     642        xinc = yinc = 0;
     643        if (HAS_THICKFRAME(dwStyle))
     644        {
     645            xinc += GetSystemMetrics(SM_CXFRAME);
     646            yinc += GetSystemMetrics(SM_CYFRAME);
     647        }
     648        if (dwStyle & WS_BORDER)
     649        {
     650            xinc += GetSystemMetrics(SM_CXBORDER);
     651            yinc += GetSystemMetrics(SM_CYBORDER);
     652        }
    648653    }
    649654    MinMax.ptMaxSize.x += 2 * xinc;
     
    653658    lpPos = (LPINTERNALPOS)GetPropA( hwndSelf, atomInternalPos );
    654659    if( lpPos && !EMPTYPOINT(lpPos->ptMaxPos) )
    655         CONV_POINT16TO32( &lpPos->ptMaxPos, &MinMax.ptMaxPosition );
     660        CONV_POINT16TO32( &lpPos->ptMaxPos, &MinMax.ptMaxPosition );
    656661    else
    657662    {
    658663#endif
    659         MinMax.ptMaxPosition.x = -xinc;
    660         MinMax.ptMaxPosition.y = -yinc;
     664        MinMax.ptMaxPosition.x = -xinc;
     665        MinMax.ptMaxPosition.y = -yinc;
    661666//    }
    662667
     
    666671
    667672    dprintf(("GetMinMaxInfo: %ld %ld / %ld %ld / %ld %ld / %ld %ld\n",
    668                       MinMax.ptMaxSize.x, MinMax.ptMaxSize.y,
    669                       MinMax.ptMaxPosition.x, MinMax.ptMaxPosition.y,
    670                       MinMax.ptMaxTrackSize.x, MinMax.ptMaxTrackSize.y,
    671                       MinMax.ptMinTrackSize.x, MinMax.ptMinTrackSize.y));
     673                      MinMax.ptMaxSize.x, MinMax.ptMaxSize.y,
     674                      MinMax.ptMaxPosition.x, MinMax.ptMaxPosition.y,
     675                      MinMax.ptMaxTrackSize.x, MinMax.ptMaxTrackSize.y,
     676                      MinMax.ptMinTrackSize.x, MinMax.ptMinTrackSize.y));
    672677    MinMax.ptMaxTrackSize.x = MAX( MinMax.ptMaxTrackSize.x,
    673                                    MinMax.ptMinTrackSize.x );
     678                                   MinMax.ptMinTrackSize.x );
    674679    MinMax.ptMaxTrackSize.y = MAX( MinMax.ptMaxTrackSize.y,
    675                                    MinMax.ptMinTrackSize.y );
     680                                   MinMax.ptMinTrackSize.y );
    676681
    677682    if (maxSize)    *maxSize  = MinMax.ptMaxSize;
     
    681686}
    682687/***********************************************************************
    683  *           WINPOS_SendNCCalcSize
     688 *           WINPOS_SendNCCalcSize
    684689 *
    685690 * Send a WM_NCCALCSIZE message to a window.
     
    689694 */
    690695LONG Win32BaseWindow::SendNCCalcSize(BOOL calcValidRect, RECT *newWindowRect, RECT *oldWindowRect,
    691                                 RECT *oldClientRect, WINDOWPOS *winpos,
    692                                 RECT *newClientRect )
     696                                RECT *oldClientRect, WINDOWPOS *winpos,
     697                                RECT *newClientRect )
    693698{
    694699   NCCALCSIZE_PARAMS params;
     
    699704   if (calcValidRect)
    700705   {
    701         winposCopy = *winpos;
    702         params.rgrc[1] = *oldWindowRect;
    703         params.rgrc[2] = *oldClientRect;
    704         params.lppos = &winposCopy;
     706        winposCopy = *winpos;
     707        params.rgrc[1] = *oldWindowRect;
     708        params.rgrc[2] = *oldClientRect;
     709        params.lppos = &winposCopy;
    705710   }
    706711   result = SendInternalMessageA(WM_NCCALCSIZE, calcValidRect,
    707                                 (LPARAM)&params );
     712                                (LPARAM)&params );
    708713   *newClientRect = params.rgrc[0];
    709714   return result;
     
    727732{
    728733  if(SendInternalMessageA(WM_CLOSE, 0, 0) == 0) {
    729         return 0; //app handles this message
     734        return 0; //app handles this message
    730735  }
    731736  delete this;
     
    762767#if 1
    763768    if(fCreated == FALSE) {
    764         return 1;
     769        return 1;
    765770    }
    766771#endif
     
    774779#if 1
    775780    if(fCreated == FALSE) {
    776         return 1;
     781        return 1;
    777782    }
    778783#endif
     
    785790    dprintf(("MsgMove to (%d,%d)", x, y));
    786791    if(fCreated == FALSE) {
    787         return 1;
     792        return 1;
    788793    }
    789794
     
    796801  switch(cmd) {
    797802    case CMD_MENU:
    798         return SendInternalMessageA(WM_COMMAND, MAKELONG(Id, 0), 0);
     803        return SendInternalMessageA(WM_COMMAND, MAKELONG(Id, 0), 0);
    799804    case CMD_CONTROL:
    800         return 0; //todo
     805        return 0; //todo
    801806    case CMD_ACCELERATOR:
    802         dprintf(("accelerator command"));
    803         return 0; //todo
     807        dprintf(("accelerator command"));
     808        return 0; //todo
    804809  }
    805810  return 0;
     
    820825
    821826    if(fCreated == FALSE) {//Solitaire crashes if it receives a WM_SIZE during CreateWindowEx (normal or our fault?)
    822         return 1;
     827        return 1;
    823828    }
    824829
    825830    if(fMinimize) {
    826             fwSizeType = SIZE_MINIMIZED;
     831            fwSizeType = SIZE_MINIMIZED;
    827832    }
    828833    else
    829834    if(fMaximize) {
    830             fwSizeType = SIZE_MAXIMIZED;
     835            fwSizeType = SIZE_MAXIMIZED;
    831836    }
    832837    else    fwSizeType = SIZE_RESTORED;
     
    840845    if(SendInternalMessageA(WM_NCACTIVATE, fActivate, 0) == FALSE)
    841846    {
    842         if(!fActivate) {
    843             return 1;
    844         }
     847        if(!fActivate) {
     848            return 1;
     849        }
    845850    }
    846851    return SendInternalMessageA(WM_ACTIVATE, (fActivate) ? WA_ACTIVE : WA_INACTIVE, hwnd);
     
    862867    lParam |= (scancode << 16);
    863868    if(keyflags & KEY_ALTDOWN)
    864         lParam |= (1<<29);
     869        lParam |= (1<<29);
    865870    if(keyflags & KEY_PREVDOWN)
    866         lParam |= (1<<30);
     871        lParam |= (1<<30);
    867872    if(keyflags & KEY_UP)
    868         lParam |= (1<<31);
     873        lParam |= (1<<31);
    869874    if(keyflags & KEY_DEADKEY) {
    870         dprintf(("WM_DEADCHAR: %x %x %08x", OS2Hwnd, cmd, lParam));
    871         return SendInternalMessageA(WM_DEADCHAR, cmd, lParam);
     875        dprintf(("WM_DEADCHAR: %x %x %08x", OS2Hwnd, cmd, lParam));
     876        return SendInternalMessageA(WM_DEADCHAR, cmd, lParam);
    872877    }
    873878    else {
    874         dprintf(("WM_CHAR: %x %x %08x", OS2Hwnd, cmd, lParam));
    875         return SendInternalMessageA(WM_CHAR, cmd, lParam);
     879        dprintf(("WM_CHAR: %x %x %08x", OS2Hwnd, cmd, lParam));
     880        return SendInternalMessageA(WM_CHAR, cmd, lParam);
    876881    }
    877882}
     
    881886{
    882887    if(hwnd == 0) {
    883             //other app lost focus
    884             SendInternalMessageA(WM_ACTIVATEAPP, TRUE, 0); //TODO: Need thread id from hwnd app
     888            //other app lost focus
     889            SendInternalMessageA(WM_ACTIVATEAPP, TRUE, 0); //TODO: Need thread id from hwnd app
    885890    }
    886891    return  SendInternalMessageA(WM_SETFOCUS, hwnd, 0);
     
    891896{
    892897    if(hwnd == 0) {
    893             //other app lost focus
    894             SendInternalMessageA(WM_ACTIVATEAPP, FALSE, 0); //TODO: Need thread id from hwnd app
     898            //other app lost focus
     899            SendInternalMessageA(WM_ACTIVATEAPP, FALSE, 0); //TODO: Need thread id from hwnd app
    895900    }
    896901    return  SendInternalMessageA(WM_KILLFOCUS, hwnd, 0);
     
    905910    dprintf(("MsgButton to (%d,%d)", ncx, ncy));
    906911    switch(msg) {
    907         case BUTTON_LEFTDOWN:
    908                 win32msg = WM_LBUTTONDOWN;
    909                 win32ncmsg = WM_NCLBUTTONDOWN;
    910                 break;
    911         case BUTTON_LEFTUP:
    912                 win32msg = WM_LBUTTONUP;
    913                 win32ncmsg = WM_NCLBUTTONUP;
    914                 break;
    915         case BUTTON_LEFTDBLCLICK:
    916                 win32msg = WM_LBUTTONDBLCLK;
    917                 win32ncmsg = WM_NCLBUTTONDBLCLK;
    918                 break;
    919         case BUTTON_RIGHTUP:
    920                 win32msg = WM_RBUTTONUP;
    921                 win32ncmsg = WM_NCRBUTTONUP;
    922                 break;
    923         case BUTTON_RIGHTDOWN:
    924                 win32msg = WM_RBUTTONDOWN;
    925                 win32ncmsg = WM_NCRBUTTONDOWN;
    926                 break;
    927         case BUTTON_RIGHTDBLCLICK:
    928                 win32msg = WM_RBUTTONDBLCLK;
    929                 win32ncmsg = WM_NCRBUTTONDBLCLK;
    930                 break;
    931         case BUTTON_MIDDLEUP:
    932                 win32msg = WM_MBUTTONUP;
    933                 win32ncmsg = WM_NCMBUTTONUP;
    934                 break;
    935         case BUTTON_MIDDLEDOWN:
    936                 win32msg = WM_MBUTTONDOWN;
    937                 win32ncmsg = WM_NCMBUTTONDOWN;
    938                 break;
    939         case BUTTON_MIDDLEDBLCLICK:
    940                 win32msg = WM_MBUTTONDBLCLK;
    941                 win32ncmsg = WM_NCMBUTTONDBLCLK;
    942                 break;
    943         default:
    944                 dprintf(("Win32BaseWindow::Button: invalid msg!!!!"));
    945                 return 1;
     912        case BUTTON_LEFTDOWN:
     913                win32msg = WM_LBUTTONDOWN;
     914                win32ncmsg = WM_NCLBUTTONDOWN;
     915                break;
     916        case BUTTON_LEFTUP:
     917                win32msg = WM_LBUTTONUP;
     918                win32ncmsg = WM_NCLBUTTONUP;
     919                break;
     920        case BUTTON_LEFTDBLCLICK:
     921                win32msg = WM_LBUTTONDBLCLK;
     922                win32ncmsg = WM_NCLBUTTONDBLCLK;
     923                break;
     924        case BUTTON_RIGHTUP:
     925                win32msg = WM_RBUTTONUP;
     926                win32ncmsg = WM_NCRBUTTONUP;
     927                break;
     928        case BUTTON_RIGHTDOWN:
     929                win32msg = WM_RBUTTONDOWN;
     930                win32ncmsg = WM_NCRBUTTONDOWN;
     931                break;
     932        case BUTTON_RIGHTDBLCLICK:
     933                win32msg = WM_RBUTTONDBLCLK;
     934                win32ncmsg = WM_NCRBUTTONDBLCLK;
     935                break;
     936        case BUTTON_MIDDLEUP:
     937                win32msg = WM_MBUTTONUP;
     938                win32ncmsg = WM_NCMBUTTONUP;
     939                break;
     940        case BUTTON_MIDDLEDOWN:
     941                win32msg = WM_MBUTTONDOWN;
     942                win32ncmsg = WM_NCMBUTTONDOWN;
     943                break;
     944        case BUTTON_MIDDLEDBLCLICK:
     945                win32msg = WM_MBUTTONDBLCLK;
     946                win32ncmsg = WM_NCMBUTTONDBLCLK;
     947                break;
     948        default:
     949                dprintf(("Win32BaseWindow::Button: invalid msg!!!!"));
     950                return 1;
    946951    }
    947952    if(win32msg == WM_MBUTTONDBLCLK || win32msg == WM_RBUTTONDBLCLK || win32msg == WM_LBUTTONDBLCLK) {
    948         if(!(windowClass->getClassLongA(GCL_STYLE) & CS_DBLCLKS)) {
    949             return 1;
    950         }
     953        if(!(windowClass->getClassLongA(GCL_STYLE) & CS_DBLCLKS)) {
     954            return 1;
     955        }
    951956    }
    952957    SendInternalMessageA(WM_SETCURSOR, Win32Hwnd, MAKELONG(lastHitTestVal, win32ncmsg));
     
    954959    //WM_NC*BUTTON* is posted when the cursor is in a non-client area of the window
    955960    if(lastHitTestVal != HTCLIENT) {
    956             SendInternalMessageA(win32ncmsg, lastHitTestVal, MAKELONG(ncx, ncy)); //TODO:
     961            SendInternalMessageA(win32ncmsg, lastHitTestVal, MAKELONG(ncx, ncy)); //TODO:
    957962    }
    958963    return  SendInternalMessageA(win32msg, 0, MAKELONG(clx, cly));
     
    966971
    967972    if(keystate & WMMOVE_LBUTTON)
    968         winstate |= MK_LBUTTON;
     973        winstate |= MK_LBUTTON;
    969974    if(keystate & WMMOVE_RBUTTON)
    970         winstate |= MK_RBUTTON;
     975        winstate |= MK_RBUTTON;
    971976    if(keystate & WMMOVE_MBUTTON)
    972         winstate |= MK_MBUTTON;
     977        winstate |= MK_MBUTTON;
    973978    if(keystate & WMMOVE_SHIFT)
    974         winstate |= MK_SHIFT;
     979        winstate |= MK_SHIFT;
    975980    if(keystate & WMMOVE_CTRL)
    976         winstate |= MK_CONTROL;
     981        winstate |= MK_CONTROL;
    977982
    978983    if(lastHitTestVal != HTCLIENT) {
    979         setcursormsg = WM_NCMOUSEMOVE;
     984        setcursormsg = WM_NCMOUSEMOVE;
    980985    }
    981986    //TODO: hiword should be 0 if window enters menu mode (SDK docs)
     
    984989    //WM_NCMOUSEMOVE is posted when the cursor moves into a non-client area of the window
    985990    if(lastHitTestVal != HTCLIENT) {
    986             SendInternalMessageA(WM_NCMOUSEMOVE, lastHitTestVal, MAKELONG(x, y));
     991            SendInternalMessageA(WM_NCMOUSEMOVE, lastHitTestVal, MAKELONG(x, y));
    987992    }
    988993    return  SendInternalMessageA(WM_MOUSEMOVE, keystate, MAKELONG(x, y));
     
    9961001//******************************************************************************
    9971002//TODO: Is the clipper region of the window DC equal to the invalidated rectangle?
    998 //      (or are we simply erasing too much here)
     1003//      (or are we simply erasing too much here)
    9991004//******************************************************************************
    10001005ULONG Win32BaseWindow::MsgEraseBackGround(HDC hdc)
     
    10041009
    10051010    if (hdcErase == 0)
    1006         hdcErase = O32_GetDC(OS2Hwnd);
     1011        hdcErase = O32_GetDC(OS2Hwnd);
    10071012
    10081013    if(isIcon)
    1009         rc = SendInternalMessageA(WM_ICONERASEBKGND, hdcErase, 0);
     1014        rc = SendInternalMessageA(WM_ICONERASEBKGND, hdcErase, 0);
    10101015    else
    1011         rc = SendInternalMessageA(WM_ERASEBKGND, hdcErase, 0);
     1016        rc = SendInternalMessageA(WM_ERASEBKGND, hdcErase, 0);
    10121017    if (hdc == 0)
    1013         O32_ReleaseDC(OS2Hwnd, hdcErase);
     1018        O32_ReleaseDC(OS2Hwnd, hdcErase);
    10141019    return (rc);
    10151020}
     
    10191024{
    10201025    if(isUnicode) {
    1021             return SendInternalMessageW(WM_SETTEXT, 0, (LPARAM)lpsz);
     1026            return SendInternalMessageW(WM_SETTEXT, 0, (LPARAM)lpsz);
    10221027    }
    10231028    else    return SendInternalMessageA(WM_SETTEXT, 0, (LPARAM)lpsz);
     
    10351040{
    10361041    if(isUnicode) {
    1037         SendInternalMessageW(WM_GETTEXT, wndNameLength, (LPARAM)windowNameW);
     1042        SendInternalMessageW(WM_GETTEXT, wndNameLength, (LPARAM)windowNameW);
    10381043    }
    10391044    else {
    1040         SendInternalMessageA(WM_GETTEXT, wndNameLength, (LPARAM)windowNameA);
     1045        SendInternalMessageA(WM_GETTEXT, wndNameLength, (LPARAM)windowNameA);
    10411046    }
    10421047    return windowNameA;
     
    10491054    {
    10501055    case WM_GETTEXTLENGTH:
    1051         return wndNameLength;
     1056        return wndNameLength;
    10521057
    10531058    case WM_GETTEXT:   //TODO: SS_ICON controls
    1054         strncpy((LPSTR)lParam, windowNameA, wParam);
    1055         return min(wndNameLength, wParam);
     1059        strncpy((LPSTR)lParam, windowNameA, wParam);
     1060        return min(wndNameLength, wParam);
    10561061
    10571062    case WM_SETTEXT:
    1058         return 0;
     1063        return 0;
    10591064
    10601065    case WM_SETREDRAW:
    1061         if(wParam)
    1062                 SetWindowLongA (GWL_STYLE, GetWindowLongA (GWL_STYLE) | WS_VISIBLE);
    1063         else    SetWindowLongA (GWL_STYLE, GetWindowLongA (GWL_STYLE) & ~WS_VISIBLE);
    1064 
    1065         return 0; //TODO
     1066        if(wParam)
     1067                SetWindowLongA (GWL_STYLE, GetWindowLongA (GWL_STYLE) | WS_VISIBLE);
     1068        else    SetWindowLongA (GWL_STYLE, GetWindowLongA (GWL_STYLE) & ~WS_VISIBLE);
     1069
     1070        return 0; //TODO
    10661071
    10671072    case WM_NCCREATE:
    1068         return(TRUE);
     1073        return(TRUE);
    10691074
    10701075    case WM_CTLCOLORMSGBOX:
     
    10751080    case WM_CTLCOLORSTATIC:
    10761081    case WM_CTLCOLORSCROLLBAR:
    1077         SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW));
    1078         SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT));
    1079         return GetSysColorBrush(COLOR_BTNFACE);
     1082        SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW));
     1083        SetTextColor((HDC)wParam, GetSysColor(COLOR_WINDOWTEXT));
     1084        return GetSysColorBrush(COLOR_BTNFACE);
    10801085
    10811086    case WM_PARENTNOTIFY:
    1082         return 0;
     1087        return 0;
    10831088
    10841089    case WM_MOUSEACTIVATE:
    10851090    {
    1086         DWORD dwStyle = GetWindowLongA(GWL_STYLE);
    1087         DWORD dwExStyle = GetWindowLongA(GWL_EXSTYLE);
    1088         dprintf(("DefWndProc: WM_MOUSEACTIVATE for %x Msg %s", Win32Hwnd, GetMsgText(HIWORD(lParam))));
    1089         if(dwStyle & WS_CHILD && !(dwExStyle & WS_EX_NOPARENTNOTIFY) )
    1090         {
    1091             if(getParent()) {
    1092                 LRESULT rc = getParent()->SendMessageA(WM_MOUSEACTIVATE, wParam, lParam );
    1093                 if(rc)  return rc;
    1094             }
    1095         }
    1096         return (LOWORD(lParam) == HTCAPTION) ? MA_NOACTIVATE : MA_ACTIVATE;
     1091        DWORD dwStyle = GetWindowLongA(GWL_STYLE);
     1092        DWORD dwExStyle = GetWindowLongA(GWL_EXSTYLE);
     1093        dprintf(("DefWndProc: WM_MOUSEACTIVATE for %x Msg %s", Win32Hwnd, GetMsgText(HIWORD(lParam))));
     1094        if(dwStyle & WS_CHILD && !(dwExStyle & WS_EX_NOPARENTNOTIFY) )
     1095        {
     1096            if(getParent()) {
     1097                LRESULT rc = getParent()->SendMessageA(WM_MOUSEACTIVATE, wParam, lParam );
     1098                if(rc)  return rc;
     1099            }
     1100        }
     1101        return (LOWORD(lParam) == HTCAPTION) ? MA_NOACTIVATE : MA_ACTIVATE;
    10971102    }
    10981103    case WM_SETCURSOR:
    10991104    {
    1100         DWORD dwStyle = GetWindowLongA(GWL_STYLE);
    1101         DWORD dwExStyle = GetWindowLongA(GWL_EXSTYLE);
    1102         dprintf(("DefWndProc: WM_SETCURSOR for %x Msg %s", Win32Hwnd, GetMsgText(HIWORD(lParam))));
    1103         if(dwStyle & WS_CHILD && !(dwExStyle & WS_EX_NOPARENTNOTIFY) )
    1104         {
    1105             if(getParent()) {
    1106                 LRESULT rc = getParent()->SendMessageA(WM_SETCURSOR, wParam, lParam);
    1107                 if(rc)  return rc;
    1108             }
    1109         }
    1110         return 1;
     1105        DWORD dwStyle = GetWindowLongA(GWL_STYLE);
     1106        DWORD dwExStyle = GetWindowLongA(GWL_EXSTYLE);
     1107        dprintf(("DefWndProc: WM_SETCURSOR for %x Msg %s", Win32Hwnd, GetMsgText(HIWORD(lParam))));
     1108        if(dwStyle & WS_CHILD && !(dwExStyle & WS_EX_NOPARENTNOTIFY) )
     1109        {
     1110            if(getParent()) {
     1111                LRESULT rc = getParent()->SendMessageA(WM_SETCURSOR, wParam, lParam);
     1112                if(rc)  return rc;
     1113            }
     1114        }
     1115        return 1;
    11111116    }
    11121117    case WM_MOUSEMOVE:
    1113         return 0;
     1118        return 0;
    11141119
    11151120    case WM_WINDOWPOSCHANGED:
     
    11171122
    11181123/* undocumented SWP flags - from SDK 3.1 */
    1119 #define SWP_NOCLIENTSIZE        0x0800
    1120 #define SWP_NOCLIENTMOVE        0x1000
    1121 
    1122         PWINDOWPOS wpos = (PWINDOWPOS)lParam;
    1123         WPARAM     wp   = SIZE_RESTORED;
    1124 
    1125         if (!(wpos->flags & SWP_NOCLIENTMOVE))
    1126             SendMessageA(WM_MOVE, 0, MAKELONG(rectClient.left, rectClient.top));
    1127 
    1128         if (!(wpos->flags & SWP_NOCLIENTSIZE))
    1129         {
    1130             if (dwStyle & WS_MAXIMIZE) wp = SIZE_MAXIMIZED;
    1131             else if (dwStyle & WS_MINIMIZE) wp = SIZE_MINIMIZED;
    1132 
    1133            SendMessageA(WM_SIZE, wp, MAKELONG(rectClient.right  - rectClient.left,
    1134                                               rectClient.bottom - rectClient.top));
    1135         }
    1136         return 0;
     1124#define SWP_NOCLIENTSIZE        0x0800
     1125#define SWP_NOCLIENTMOVE        0x1000
     1126
     1127        PWINDOWPOS wpos = (PWINDOWPOS)lParam;
     1128        WPARAM     wp   = SIZE_RESTORED;
     1129
     1130        if (!(wpos->flags & SWP_NOCLIENTMOVE))
     1131            SendMessageA(WM_MOVE, 0, MAKELONG(rectClient.left, rectClient.top));
     1132
     1133        if (!(wpos->flags & SWP_NOCLIENTSIZE))
     1134        {
     1135            if (dwStyle & WS_MAXIMIZE) wp = SIZE_MAXIMIZED;
     1136            else if (dwStyle & WS_MINIMIZE) wp = SIZE_MINIMIZED;
     1137
     1138           SendMessageA(WM_SIZE, wp, MAKELONG(rectClient.right  - rectClient.left,
     1139                                              rectClient.bottom - rectClient.top));
     1140        }
     1141        return 0;
    11371142    }
    11381143    case WM_ERASEBKGND:
     
    11421147      int rc;
    11431148
    1144         if (!windowClass->getBackgroundBrush()) return 0;
    1145 
    1146         /*  Since WM_ERASEBKGND may receive either a window dc or a    */
    1147         /*  client dc, the area to be erased has to be retrieved from  */
    1148         /*  the device context.                                    */
    1149         rc = GetClipBox( (HDC)wParam, &rect );
    1150         if ((rc == SIMPLEREGION) || (rc == COMPLEXREGION))
    1151             FillRect( (HDC)wParam, &rect, windowClass->getBackgroundBrush());
    1152 
    1153         return 1;
     1149        if (!windowClass->getBackgroundBrush()) return 0;
     1150
     1151        /*  Since WM_ERASEBKGND may receive either a window dc or a    */
     1152        /*  client dc, the area to be erased has to be retrieved from  */
     1153        /*  the device context.                                    */
     1154        rc = GetClipBox( (HDC)wParam, &rect );
     1155        if ((rc == SIMPLEREGION) || (rc == COMPLEXREGION))
     1156            FillRect( (HDC)wParam, &rect, windowClass->getBackgroundBrush());
     1157
     1158        return 1;
    11541159    }
    11551160
     
    11631168    case WM_NCMBUTTONUP:
    11641169    case WM_NCMBUTTONDBLCLK:
    1165         return 0;           //TODO: Send WM_SYSCOMMAND if required
     1170        return 0;           //TODO: Send WM_SYSCOMMAND if required
    11661171
    11671172    case WM_NCHITTEST: //TODO: Calculate position of
    1168         return HTCLIENT;
     1173        return HTCLIENT;
    11691174
    11701175    default:
    1171         return 1;
     1176        return 1;
    11721177    }
    11731178}
     
    11791184    {
    11801185    case WM_GETTEXTLENGTH:
    1181         return wndNameLength;
     1186        return wndNameLength;
    11821187
    11831188    case WM_GETTEXT:   //TODO: SS_ICON controls
    1184         lstrcpynW((LPWSTR)lParam, windowNameW, wParam);
    1185         return min(wndNameLength, wParam);
     1189        lstrcpynW((LPWSTR)lParam, windowNameW, wParam);
     1190        return min(wndNameLength, wParam);
    11861191
    11871192    default:
    1188         return DefWindowProcA(Msg, wParam, lParam);
     1193        return DefWindowProcA(Msg, wParam, lParam);
    11891194    }
    11901195}
     
    11941199{
    11951200  if(PostSpyMessage(getWindowHandle(), Msg, wParam, lParam) == FALSE)
    1196         dprintf(("SendMessageA %s for %x %x %x", GetMsgText(Msg), getWindowHandle(), wParam, lParam));
     1201        dprintf(("SendMessageA %s for %x %x %x", GetMsgText(Msg), getWindowHandle(), wParam, lParam));
    11971202
    11981203  if(HkCBT::OS2HkCBTProc(getWindowHandle(), Msg, wParam, lParam) == TRUE) {//hook swallowed msg
    1199         return(0);
     1204        return(0);
    12001205  }
    12011206  switch(Msg)
    12021207  {
    1203         case WM_CREATE:
    1204         {
    1205                 if(win32wndproc(getWindowHandle(), WM_NCCREATE, 0, lParam) == 0) {
    1206                         dprintf(("WM_NCCREATE returned FALSE\n"));
    1207                         return(-1); //don't create window
    1208                 }
    1209                 if(win32wndproc(getWindowHandle(), WM_CREATE, 0, lParam) == -1) {
    1210                         dprintf(("WM_CREATE returned -1\n"));
    1211                         return(-1); //don't create window
    1212                 }
    1213                 NotifyParent(Msg, wParam, lParam);
    1214 
    1215                 return(0);
    1216         }
    1217         case WM_SETTEXT: //TODO: Nothing happens if passed to DefWindowProc
    1218                 return win32wndproc(getWindowHandle(), WM_SETTEXT, wParam, lParam);
    1219 
    1220         case WM_LBUTTONDOWN:
    1221         case WM_MBUTTONDOWN:
    1222         case WM_RBUTTONDOWN:
    1223                 NotifyParent(Msg, wParam, lParam);
    1224                 return win32wndproc(getWindowHandle(), Msg, wParam, lParam);
    1225 
    1226         case WM_DESTROY:
    1227                 win32wndproc(getWindowHandle(), WM_NCDESTROY, 0, 0);
    1228                 NotifyParent(Msg, wParam, lParam);
    1229                 return win32wndproc(getWindowHandle(), WM_DESTROY, 0, 0);
    1230         default:
    1231                 return win32wndproc(getWindowHandle(), Msg, wParam, lParam);
     1208        case WM_CREATE:
     1209        {
     1210                if(win32wndproc(getWindowHandle(), WM_NCCREATE, 0, lParam) == 0) {
     1211                        dprintf(("WM_NCCREATE returned FALSE\n"));
     1212                        return(-1); //don't create window
     1213                }
     1214                if(win32wndproc(getWindowHandle(), WM_CREATE, 0, lParam) == -1) {
     1215                        dprintf(("WM_CREATE returned -1\n"));
     1216                        return(-1); //don't create window
     1217                }
     1218                NotifyParent(Msg, wParam, lParam);
     1219
     1220                return(0);
     1221        }
     1222        case WM_SETTEXT: //TODO: Nothing happens if passed to DefWindowProc
     1223                return win32wndproc(getWindowHandle(), WM_SETTEXT, wParam, lParam);
     1224
     1225        case WM_LBUTTONDOWN:
     1226        case WM_MBUTTONDOWN:
     1227        case WM_RBUTTONDOWN:
     1228                NotifyParent(Msg, wParam, lParam);
     1229                return win32wndproc(getWindowHandle(), Msg, wParam, lParam);
     1230
     1231        case WM_DESTROY:
     1232                win32wndproc(getWindowHandle(), WM_NCDESTROY, 0, 0);
     1233                NotifyParent(Msg, wParam, lParam);
     1234                return win32wndproc(getWindowHandle(), WM_DESTROY, 0, 0);
     1235        default:
     1236                return win32wndproc(getWindowHandle(), Msg, wParam, lParam);
    12321237  }
    12331238}
     
    12371242{
    12381243  if(PostSpyMessage(getWindowHandle(), Msg, wParam, lParam) == FALSE)
    1239         dprintf(("SendMessageA %s for %x %x %x", GetMsgText(Msg), getWindowHandle(), wParam, lParam));
     1244        dprintf(("SendMessageA %s for %x %x %x", GetMsgText(Msg), getWindowHandle(), wParam, lParam));
    12401245
    12411246  if(HkCBT::OS2HkCBTProc(getWindowHandle(), Msg, wParam, lParam) == TRUE) {//hook swallowed msg
    1242         return(0);
     1247        return(0);
    12431248  }
    12441249  switch(Msg)
    12451250  {
    1246         case WM_CREATE:
    1247         {
    1248                 if(win32wndproc(getWindowHandle(), WM_NCCREATE, 0, lParam) == 0) {
    1249                         dprintf(("WM_NCCREATE returned FALSE\n"));
    1250                         return(0); //don't create window
    1251                 }
    1252                 if(win32wndproc(getWindowHandle(), WM_CREATE, 0, lParam) == 0) {
    1253                         dprintf(("WM_CREATE returned FALSE\n"));
    1254                         return(0); //don't create window
    1255                 }
    1256                 NotifyParent(Msg, wParam, lParam);
    1257 
    1258                 return(1);
    1259         }
    1260         case WM_SETTEXT: //TODO: Nothing happens if passed to DefWindowProc
    1261                 return win32wndproc(getWindowHandle(), WM_SETTEXT, wParam, lParam);
    1262 
    1263         case WM_LBUTTONDOWN:
    1264         case WM_MBUTTONDOWN:
    1265         case WM_RBUTTONDOWN:
    1266                 NotifyParent(Msg, wParam, lParam);
    1267                 return win32wndproc(getWindowHandle(), Msg, wParam, lParam);
    1268 
    1269         case WM_DESTROY:
    1270                 win32wndproc(getWindowHandle(), WM_NCDESTROY, 0, 0);
    1271                 NotifyParent(Msg, wParam, lParam);
    1272                 return win32wndproc(getWindowHandle(), WM_DESTROY, 0, 0);
    1273 
    1274         default:
    1275                 return win32wndproc(getWindowHandle(), Msg, wParam, lParam);
     1251        case WM_CREATE:
     1252        {
     1253                if(win32wndproc(getWindowHandle(), WM_NCCREATE, 0, lParam) == 0) {
     1254                        dprintf(("WM_NCCREATE returned FALSE\n"));
     1255                        return(0); //don't create window
     1256                }
     1257                if(win32wndproc(getWindowHandle(), WM_CREATE, 0, lParam) == 0) {
     1258                        dprintf(("WM_CREATE returned FALSE\n"));
     1259                        return(0); //don't create window
     1260                }
     1261                NotifyParent(Msg, wParam, lParam);
     1262
     1263                return(1);
     1264        }
     1265        case WM_SETTEXT: //TODO: Nothing happens if passed to DefWindowProc
     1266                return win32wndproc(getWindowHandle(), WM_SETTEXT, wParam, lParam);
     1267
     1268        case WM_LBUTTONDOWN:
     1269        case WM_MBUTTONDOWN:
     1270        case WM_RBUTTONDOWN:
     1271                NotifyParent(Msg, wParam, lParam);
     1272                return win32wndproc(getWindowHandle(), Msg, wParam, lParam);
     1273
     1274        case WM_DESTROY:
     1275                win32wndproc(getWindowHandle(), WM_NCDESTROY, 0, 0);
     1276                NotifyParent(Msg, wParam, lParam);
     1277                return win32wndproc(getWindowHandle(), WM_DESTROY, 0, 0);
     1278
     1279        default:
     1280                return win32wndproc(getWindowHandle(), Msg, wParam, lParam);
    12761281  }
    12771282}
     
    12821287{
    12831288  if(PostSpyMessage(getWindowHandle(), Msg, wParam, lParam) == FALSE)
    1284         dprintf(("SendInternalMessageA %s for %x %x %x", GetMsgText(Msg), getWindowHandle(), wParam, lParam));
     1289        dprintf(("SendInternalMessageA %s for %x %x %x", GetMsgText(Msg), getWindowHandle(), wParam, lParam));
    12851290
    12861291  if(HkCBT::OS2HkCBTProc(getWindowHandle(), Msg, wParam, lParam) == TRUE) {//hook swallowed msg
    1287         return(0);
     1292        return(0);
    12881293  }
    12891294  switch(Msg)
    12901295  {
    1291         case WM_CREATE:
    1292         {
    1293                 if(win32wndproc(getWindowHandle(), WM_NCCREATE, 0, lParam) == 0) {
    1294                         dprintf(("WM_NCCREATE returned FALSE\n"));
    1295                         return(0); //don't create window
    1296                 }
    1297                 if(win32wndproc(getWindowHandle(), WM_CREATE, 0, lParam) == 0) {
    1298                         dprintf(("WM_CREATE returned FALSE\n"));
    1299                         return(0); //don't create window
    1300                 }
    1301                 NotifyParent(Msg, wParam, lParam);
    1302 
    1303                 return(1);
    1304         }
    1305         case WM_LBUTTONDOWN:
    1306         case WM_MBUTTONDOWN:
    1307         case WM_RBUTTONDOWN:
    1308                 NotifyParent(Msg, wParam, lParam);
    1309                 return win32wndproc(getWindowHandle(), Msg, wParam, lParam);
    1310 
    1311         case WM_DESTROY:
    1312                 win32wndproc(getWindowHandle(), WM_NCDESTROY, 0, 0);
    1313                 NotifyParent(Msg, wParam, lParam);
    1314                 return win32wndproc(getWindowHandle(), WM_DESTROY, 0, 0);
    1315         default:
    1316                 return win32wndproc(getWindowHandle(), Msg, wParam, lParam);
     1296        case WM_CREATE:
     1297        {
     1298                if(win32wndproc(getWindowHandle(), WM_NCCREATE, 0, lParam) == 0) {
     1299                        dprintf(("WM_NCCREATE returned FALSE\n"));
     1300                        return(0); //don't create window
     1301                }
     1302                if(win32wndproc(getWindowHandle(), WM_CREATE, 0, lParam) == 0) {
     1303                        dprintf(("WM_CREATE returned FALSE\n"));
     1304                        return(0); //don't create window
     1305                }
     1306                NotifyParent(Msg, wParam, lParam);
     1307
     1308                return(1);
     1309        }
     1310        case WM_LBUTTONDOWN:
     1311        case WM_MBUTTONDOWN:
     1312        case WM_RBUTTONDOWN:
     1313                NotifyParent(Msg, wParam, lParam);
     1314                return win32wndproc(getWindowHandle(), Msg, wParam, lParam);
     1315
     1316        case WM_DESTROY:
     1317                win32wndproc(getWindowHandle(), WM_NCDESTROY, 0, 0);
     1318                NotifyParent(Msg, wParam, lParam);
     1319                return win32wndproc(getWindowHandle(), WM_DESTROY, 0, 0);
     1320        default:
     1321                return win32wndproc(getWindowHandle(), Msg, wParam, lParam);
    13171322  }
    13181323}
     
    13241329{
    13251330  if(PostSpyMessage(getWindowHandle(), Msg, wParam, lParam) == FALSE)
    1326         dprintf(("SendInternalMessageW %s for %x %x %x", GetMsgText(Msg), getWindowHandle(), wParam, lParam));
     1331        dprintf(("SendInternalMessageW %s for %x %x %x", GetMsgText(Msg), getWindowHandle(), wParam, lParam));
    13271332
    13281333  if(HkCBT::OS2HkCBTProc(getWindowHandle(), Msg, wParam, lParam) == TRUE) {//hook swallowed msg
    1329         return(0);
     1334        return(0);
    13301335  }
    13311336  switch(Msg)
    13321337  {
    1333         case WM_CREATE:
    1334         {
    1335                 if(win32wndproc(getWindowHandle(), WM_NCCREATE, 0, lParam) == 0) {
    1336                         dprintf(("WM_NCCREATE returned FALSE\n"));
    1337                         return(0); //don't create window
    1338                 }
    1339                 if(win32wndproc(getWindowHandle(), WM_CREATE, 0, lParam) == 0) {
    1340                         dprintf(("WM_CREATE returned FALSE\n"));
    1341                         return(0); //don't create window
    1342                 }
    1343                 NotifyParent(Msg, wParam, lParam);
    1344 
    1345                 return(1);
    1346         }
    1347         case WM_LBUTTONDOWN:
    1348         case WM_MBUTTONDOWN:
    1349         case WM_RBUTTONDOWN:
    1350                 NotifyParent(Msg, wParam, lParam);
    1351                 return win32wndproc(getWindowHandle(), Msg, wParam, lParam);
    1352 
    1353         case WM_DESTROY:
    1354                 win32wndproc(getWindowHandle(), WM_NCDESTROY, 0, 0);
    1355                 NotifyParent(Msg, wParam, lParam);
    1356                 return win32wndproc(getWindowHandle(), WM_DESTROY, 0, 0);
    1357         default:
    1358                 return win32wndproc(getWindowHandle(), Msg, wParam, lParam);
     1338        case WM_CREATE:
     1339        {
     1340                if(win32wndproc(getWindowHandle(), WM_NCCREATE, 0, lParam) == 0) {
     1341                        dprintf(("WM_NCCREATE returned FALSE\n"));
     1342                        return(0); //don't create window
     1343                }
     1344                if(win32wndproc(getWindowHandle(), WM_CREATE, 0, lParam) == 0) {
     1345                        dprintf(("WM_CREATE returned FALSE\n"));
     1346                        return(0); //don't create window
     1347                }
     1348                NotifyParent(Msg, wParam, lParam);
     1349
     1350                return(1);
     1351        }
     1352        case WM_LBUTTONDOWN:
     1353        case WM_MBUTTONDOWN:
     1354        case WM_RBUTTONDOWN:
     1355                NotifyParent(Msg, wParam, lParam);
     1356                return win32wndproc(getWindowHandle(), Msg, wParam, lParam);
     1357
     1358        case WM_DESTROY:
     1359                win32wndproc(getWindowHandle(), WM_NCDESTROY, 0, 0);
     1360                NotifyParent(Msg, wParam, lParam);
     1361                return win32wndproc(getWindowHandle(), WM_DESTROY, 0, 0);
     1362        default:
     1363                return win32wndproc(getWindowHandle(), Msg, wParam, lParam);
    13591364  }
    13601365}
     
    13811386   while(window)
    13821387   {
    1383         if(window->getStyle() & WS_CHILD && !(window->getExStyle() & WS_EX_NOPARENTNOTIFY) )
    1384         {
    1385                 /* Notify the parent window only */
    1386                 parentwindow = window->getParent();
    1387                 if(parentwindow) {
    1388                         if(Msg == WM_CREATE || Msg == WM_DESTROY) {
    1389                                 parentwindow->SendInternalMessageA(WM_PARENTNOTIFY, MAKEWPARAM(Msg, window->getWindowId()), (LPARAM)window->getWindowHandle());
    1390                         }
    1391                         else    parentwindow->SendInternalMessageA(WM_PARENTNOTIFY, MAKEWPARAM(Msg, window->getWindowId()), lParam );
    1392                 }
    1393         }
    1394         else    break;
    1395 
    1396         window = parentwindow;
     1388        if(window->getStyle() & WS_CHILD && !(window->getExStyle() & WS_EX_NOPARENTNOTIFY) )
     1389        {
     1390                /* Notify the parent window only */
     1391                parentwindow = window->getParent();
     1392                if(parentwindow) {
     1393                        if(Msg == WM_CREATE || Msg == WM_DESTROY) {
     1394                                parentwindow->SendInternalMessageA(WM_PARENTNOTIFY, MAKEWPARAM(Msg, window->getWindowId()), (LPARAM)window->getWindowHandle());
     1395                        }
     1396                        else    parentwindow->SendInternalMessageA(WM_PARENTNOTIFY, MAKEWPARAM(Msg, window->getWindowId()), lParam );
     1397                }
     1398        }
     1399        else    break;
     1400
     1401        window = parentwindow;
    13971402   }
    13981403}
     
    14011406BOOL Win32BaseWindow::SetMenu(HMENU hMenu)
    14021407{
    1403  PVOID          menutemplate;
     1408 PVOID          menutemplate;
    14041409 Win32Resource *winres = (Win32Resource *)hMenu;
    14051410
    14061411    dprintf(("SetMenu %x", hMenu));
    14071412    if(HIWORD(winres) == 0) {
    1408         dprintf(("Win32BaseWindow:: Win32Resource *winres == 0"));
    1409         SetLastError(ERROR_INVALID_PARAMETER);
    1410         return FALSE;
     1413        dprintf(("Win32BaseWindow:: Win32Resource *winres == 0"));
     1414        SetLastError(ERROR_INVALID_PARAMETER);
     1415        return FALSE;
    14111416    }
    14121417    menutemplate = winres->lockOS2Resource();
    14131418    if(menutemplate == NULL)
    14141419    {
    1415         dprintf(("Win32BaseWindow::SetMenu menutemplate == 0"));
    1416         return FALSE;
     1420        dprintf(("Win32BaseWindow::SetMenu menutemplate == 0"));
     1421        return FALSE;
    14171422    }
    14181423    OS2HwndMenu = OSLibWinCreateMenu(OS2HwndFrame, menutemplate);
    14191424    if(OS2HwndMenu == 0) {
    1420         dprintf(("Win32BaseWindow::SetMenu OS2HwndMenu == 0"));
    1421         return FALSE;
     1425        dprintf(("Win32BaseWindow::SetMenu OS2HwndMenu == 0"));
     1426        return FALSE;
    14221427    }
    14231428    winres->setOS2Handle(OS2HwndMenu);
     
    14301435{
    14311436 Win32Resource *winres = (Win32Resource *)hAccel;
    1432  HANDLE         accelhandle;
     1437 HANDLE         accelhandle;
    14331438
    14341439    if(HIWORD(hAccel) == 0) {
    1435         dprintf(("SetAccelTable: hAccel %x invalid", hAccel));
    1436         SetLastError(ERROR_INVALID_PARAMETER);
    1437         return FALSE;
     1440        dprintf(("SetAccelTable: hAccel %x invalid", hAccel));
     1441        SetLastError(ERROR_INVALID_PARAMETER);
     1442        return FALSE;
    14381443    }
    14391444    acceltableResource = winres;
     
    14571462    dprintf(("ShowWindow %x", nCmdShow));
    14581463    if(fFirstShow) {
    1459         if(isFrameWindow() && IS_OVERLAPPED(getStyle())) {
    1460                 SendMessageA(WM_SIZE, SIZE_RESTORED,
    1461                                 MAKELONG(rectClient.right-rectClient.left,
    1462                                         rectClient.bottom-rectClient.top));
    1463                 SendMessageA(WM_MOVE, 0, MAKELONG( rectClient.left, rectClient.top ) );
    1464 
    1465         }
    1466         fFirstShow = FALSE;
     1464        if(isFrameWindow() && IS_OVERLAPPED(getStyle())) {
     1465                SendMessageA(WM_SIZE, SIZE_RESTORED,
     1466                                MAKELONG(rectClient.right-rectClient.left,
     1467                                        rectClient.bottom-rectClient.top));
     1468                SendMessageA(WM_MOVE, 0, MAKELONG( rectClient.left, rectClient.top ) );
     1469
     1470        }
     1471        fFirstShow = FALSE;
    14671472    }
    14681473    switch(nCmdShow)
     
    14701475    case SW_SHOW:
    14711476    case SW_SHOWDEFAULT: //todo
    1472         showstate = SWPOS_SHOW | SWPOS_ACTIVATE;
    1473         break;
     1477        showstate = SWPOS_SHOW | SWPOS_ACTIVATE;
     1478        break;
    14741479    case SW_HIDE:
    1475         showstate = SWPOS_HIDE;
    1476         break;
     1480        showstate = SWPOS_HIDE;
     1481        break;
    14771482    case SW_RESTORE:
    1478         showstate = SWPOS_RESTORE | SWPOS_SHOW | SWPOS_ACTIVATE;
    1479         break;
     1483        showstate = SWPOS_RESTORE | SWPOS_SHOW | SWPOS_ACTIVATE;
     1484        break;
    14801485    case SW_MINIMIZE:
    1481         showstate = SWPOS_MINIMIZE;
    1482         break;
     1486        showstate = SWPOS_MINIMIZE;
     1487        break;
    14831488    case SW_SHOWMAXIMIZED:
    1484         showstate = SWPOS_MAXIMIZE | SWPOS_SHOW | SWPOS_ACTIVATE;
    1485         break;
     1489        showstate = SWPOS_MAXIMIZE | SWPOS_SHOW | SWPOS_ACTIVATE;
     1490        break;
    14861491    case SW_SHOWMINIMIZED:
    1487         showstate = SWPOS_MINIMIZE | SWPOS_SHOW | SWPOS_ACTIVATE;
    1488         break;
     1492        showstate = SWPOS_MINIMIZE | SWPOS_SHOW | SWPOS_ACTIVATE;
     1493        break;
    14891494    case SW_SHOWMINNOACTIVE:
    1490         showstate = SWPOS_MINIMIZE | SWPOS_SHOW;
    1491         break;
     1495        showstate = SWPOS_MINIMIZE | SWPOS_SHOW;
     1496        break;
    14921497    case SW_SHOWNA:
    1493         showstate = SWPOS_SHOW;
    1494         break;
     1498        showstate = SWPOS_SHOW;
     1499        break;
    14951500    case SW_SHOWNOACTIVATE:
    1496         showstate = SWPOS_SHOW;
    1497         break;
     1501        showstate = SWPOS_SHOW;
     1502        break;
    14981503    case SW_SHOWNORMAL:
    1499         showstate = SWPOS_RESTORE | SWPOS_ACTIVATE | SWPOS_SHOW;
    1500         break;
     1504        showstate = SWPOS_RESTORE | SWPOS_ACTIVATE | SWPOS_SHOW;
     1505        break;
    15011506    }
    15021507    return OSLibWinShowWindow(OS2HwndFrame, showstate);
     
    15121517   dprintf (("SetWindowPos %x %x (%d,%d)(%d,%d) %x", Win32Hwnd, hwndInsertAfter, x, y, cx, cy, fuFlags));
    15131518
    1514    /* Validate the flags passed in ...                  */
     1519   /* Validate the flags passed in ...                  */
    15151520   if ( fuFlags &
    1516         ~(SWP_NOSIZE     | SWP_NOMOVE     | SWP_NOZORDER     |
    1517           SWP_NOREDRAW  | SWP_NOACTIVATE | SWP_FRAMECHANGED |
    1518           SWP_SHOWWINDOW | SWP_HIDEWINDOW | SWP_NOCOPYBITS   |
    1519           SWP_NOOWNERZORDER) )
     1521        ~(SWP_NOSIZE     | SWP_NOMOVE     | SWP_NOZORDER     |
     1522          SWP_NOREDRAW  | SWP_NOACTIVATE | SWP_FRAMECHANGED |
     1523          SWP_SHOWWINDOW | SWP_HIDEWINDOW | SWP_NOCOPYBITS   |
     1524          SWP_NOOWNERZORDER) )
    15201525   {
    15211526      return FALSE;
     
    15281533   // Set up with Windows values.
    15291534   //****************************
    1530    wpos.flags            = fuFlags;
    1531    wpos.cy              = cy;
    1532    wpos.cx              = cx;
    1533    wpos.x                = x;
    1534    wpos.y                = y;
     1535   wpos.flags            = fuFlags;
     1536   wpos.cy              = cy;
     1537   wpos.cx              = cx;
     1538   wpos.x                = x;
     1539   wpos.y                = y;
    15351540   wpos.hwndInsertAfter  = hwndInsertAfter;
    1536    wpos.hwnd            = getWindowHandle();
     1541   wpos.hwnd            = getWindowHandle();
    15371542
    15381543   //**********************************************
     
    15421547       if (isChild())
    15431548       {
    1544            hParent = getParent()->getOS2WindowHandle();
    1545            OSLibWinQueryWindowPos(OS2Hwnd, &swpOld);
     1549           hParent = getParent()->getOS2WindowHandle();
     1550           OSLibWinQueryWindowPos(OS2Hwnd, &swpOld);
    15461551       } else
    1547            OSLibWinQueryWindowPos(OS2HwndFrame, &swpOld);
     1552           OSLibWinQueryWindowPos(OS2HwndFrame, &swpOld);
    15481553   }
    15491554   OSLibMapWINDOWPOStoSWP(&wpos, &swp, &swpOld, hParent, OS2HwndFrame);
     
    15901595   if (rc == FALSE)
    15911596   {
    1592 //      SET_ERROR_LAST();
     1597//      SET_ERROR_LAST();
    15931598   }
    15941599   else
     
    16021607      ** a WM_UPDATEFRAME, which will provide the behavior of WM_NCCALCSIZE.
    16031608      */
    1604 //      if (fuFlags & SWP_FRAMECHANGED_W)
    1605 //         WinSendMsg(hWindow, WM_UPDATEFRAME, (MPARAM)-1, 0);
     1609//      if (fuFlags & SWP_FRAMECHANGED_W)
     1610//         WinSendMsg(hWindow, WM_UPDATEFRAME, (MPARAM)-1, 0);
    16061611   }
    16071612
     
    16221627    return getParent()->getWindowHandle();
    16231628  }
    1624   else  return 0;
     1629  else  return 0;
    16251630}
    16261631//******************************************************************************
     
    16321637
    16331638   if(getParent()) {
    1634         oldhwnd = getParent()->getWindowHandle();
     1639        oldhwnd = getParent()->getWindowHandle();
    16351640   }
    16361641   else oldhwnd = 0;
     
    16381643   if(hwndNewParent == 0) {//desktop window = parent
    16391644    setParent(NULL);
    1640         OSLibWinSetParent(getOS2WindowHandle(), OSLIB_HWND_DESKTOP);
    1641         return oldhwnd;
     1645        OSLibWinSetParent(getOS2WindowHandle(), OSLIB_HWND_DESKTOP);
     1646        return oldhwnd;
    16421647   }
    16431648   newparent = GetWindowFromHandle(hwndNewParent);
    16441649   if(newparent)
    16451650   {
    1646         setParent(newparent);
    1647         OSLibWinSetParent(getOS2WindowHandle(), getParent()->getOS2WindowHandle());
    1648         return oldhwnd;
     1651        setParent(newparent);
     1652        OSLibWinSetParent(getOS2WindowHandle(), getParent()->getOS2WindowHandle());
     1653        return oldhwnd;
    16491654   }
    16501655   SetLastError(ERROR_INVALID_PARAMETER);
     
    16581663    return getParent()->getWindowHandle() == hwndParent;
    16591664  }
    1660   else  return 0;
     1665  else  return 0;
    16611666}
    16621667//******************************************************************************
     
    16771682    if(OSLibWinQueryUpdateRect(OS2Hwnd, &rect))
    16781683    {//update region not empty
    1679         HDC hdc;
    1680 
    1681         hdc = O32_GetDC(OS2Hwnd);
    1682         if (isIcon)
    1683         {
    1684             SendInternalMessageA(WM_ICONERASEBKGND, (WPARAM)hdc, 0);
    1685             SendInternalMessageA(WM_PAINTICON, 0, 0);
    1686         } else
    1687         {
    1688             SendInternalMessageA(WM_ERASEBKGND, (WPARAM)hdc, 0);
    1689             SendInternalMessageA(WM_PAINT, 0, 0);
    1690         }
    1691         O32_ReleaseDC(OS2Hwnd, hdc);
     1684        HDC hdc;
     1685
     1686        hdc = O32_GetDC(OS2Hwnd);
     1687        if (isIcon)
     1688        {
     1689            SendInternalMessageA(WM_ICONERASEBKGND, (WPARAM)hdc, 0);
     1690            SendInternalMessageA(WM_PAINTICON, 0, 0);
     1691        } else
     1692        {
     1693            SendInternalMessageA(WM_ERASEBKGND, (WPARAM)hdc, 0);
     1694            SendInternalMessageA(WM_PAINT, 0, 0);
     1695        }
     1696        O32_ReleaseDC(OS2Hwnd, hdc);
    16921697    }
    16931698    return TRUE;
     
    17051710//******************************************************************************
    17061711HWND Win32BaseWindow::FindWindowEx(HWND hwndParent, HWND hwndChildAfter, LPSTR lpszClass, LPSTR lpszWindow,
    1707                                BOOL fUnicode)
     1712                               BOOL fUnicode)
    17081713{
    17091714 Win32BaseWindow *parent = GetWindowFromHandle(hwndParent);
     
    17141719       (hwndParent == OSLIB_HWND_DESKTOP && hwndChildAfter != 0))
    17151720    {
    1716         dprintf(("Win32BaseWindow::FindWindowEx: parent or child not found %x %x", hwndParent, hwndChildAfter));
    1717         SetLastError(ERROR_INVALID_WINDOW_HANDLE);
    1718         return 0;
     1721        dprintf(("Win32BaseWindow::FindWindowEx: parent or child not found %x %x", hwndParent, hwndChildAfter));
     1722        SetLastError(ERROR_INVALID_WINDOW_HANDLE);
     1723        return 0;
    17191724    }
    17201725    if(hwndParent != OSLIB_HWND_DESKTOP)
    17211726    {//if the current process owns the window, just do a quick search
    1722         child = (Win32BaseWindow *)parent->getFirstChild();
    1723         if(hwndChildAfter != 0)
    1724         {
    1725             while(child)
    1726             {
    1727                 if(child->getWindowHandle() == hwndChildAfter)
    1728                 {
    1729                     child = (Win32BaseWindow *)child->getNextChild();
    1730                     break;
    1731                 }
    1732                 child = (Win32BaseWindow *)child->getNextChild();
    1733             }
    1734         }
    1735         while(child)
    1736         {
    1737             if(child->getWindowClass()->hasClassName(lpszClass, fUnicode) &&
    1738                (!lpszWindow || child->hasWindowName(lpszWindow, fUnicode)))
    1739             {
    1740                 dprintf(("FindWindowEx: Found window %x", child->getWindowHandle()));
    1741                 return child->getWindowHandle();
    1742             }
    1743             child = (Win32BaseWindow *)child->getNextChild();
    1744         }
     1727        child = (Win32BaseWindow *)parent->getFirstChild();
     1728        if(hwndChildAfter != 0)
     1729        {
     1730            while(child)
     1731            {
     1732                if(child->getWindowHandle() == hwndChildAfter)
     1733                {
     1734                    child = (Win32BaseWindow *)child->getNextChild();
     1735                    break;
     1736                }
     1737                child = (Win32BaseWindow *)child->getNextChild();
     1738            }
     1739        }
     1740        while(child)
     1741        {
     1742            if(child->getWindowClass()->hasClassName(lpszClass, fUnicode) &&
     1743               (!lpszWindow || child->hasWindowName(lpszWindow, fUnicode)))
     1744            {
     1745                dprintf(("FindWindowEx: Found window %x", child->getWindowHandle()));
     1746                return child->getWindowHandle();
     1747            }
     1748            child = (Win32BaseWindow *)child->getNextChild();
     1749        }
    17451750    }
    17461751    else {
    1747         Win32BaseWindow *wnd;
    1748         HWND henum, hwnd;
    1749 
    1750         henum = OSLibWinBeginEnumWindows(OSLIB_HWND_DESKTOP);
    1751         hwnd = OSLibWinGetNextWindow(henum);
    1752 
    1753         while(hwnd)
    1754         {
    1755             wnd = GetWindowFromOS2Handle(hwnd);
    1756             if(wnd == NULL) {
    1757                 hwnd = OSLibWinQueryClientWindow(hwnd);
    1758                 if(hwnd)  wnd = GetWindowFromOS2Handle(hwnd);
    1759             }
    1760 
    1761             if(wnd) {
    1762                 LPVOID sharedmembase = (LPVOID)OSLibWinGetWindowULong(hwnd, OFFSET_WIN32PM_SHAREDMEM);
    1763 
    1764                 if(OSLibDosGetSharedMem(sharedmembase, MAX_HEAPSIZE, OSLIB_PAG_READ) != 0) {
    1765                     dprintf(("OSLibDosGetSharedMem returned error for %x", wnd));
    1766                     break;
    1767                 }
    1768                 if(wnd->getWindowClass()->hasClassName(lpszClass, fUnicode) &&
    1769                    (!lpszWindow || wnd->hasWindowName(lpszWindow, fUnicode)))
    1770                 {
    1771                     OSLibWinEndEnumWindows(henum);
    1772                     dprintf(("FindWindowEx: Found window %x", wnd->getWindowHandle()));
    1773                     return wnd->getWindowHandle();
    1774                 }
    1775             }
    1776             hwnd = OSLibWinGetNextWindow(henum);
    1777         }
    1778         OSLibWinEndEnumWindows(henum);
     1752        Win32BaseWindow *wnd;
     1753        HWND henum, hwnd;
     1754
     1755        henum = OSLibWinBeginEnumWindows(OSLIB_HWND_DESKTOP);
     1756        hwnd = OSLibWinGetNextWindow(henum);
     1757
     1758        while(hwnd)
     1759        {
     1760            wnd = GetWindowFromOS2Handle(hwnd);
     1761            if(wnd == NULL) {
     1762                hwnd = OSLibWinQueryClientWindow(hwnd);
     1763                if(hwnd)  wnd = GetWindowFromOS2Handle(hwnd);
     1764            }
     1765
     1766            if(wnd) {
     1767                LPVOID sharedmembase = (LPVOID)OSLibWinGetWindowULong(hwnd, OFFSET_WIN32PM_SHAREDMEM);
     1768
     1769                if(OSLibDosGetSharedMem(sharedmembase, MAX_HEAPSIZE, OSLIB_PAG_READ) != 0) {
     1770                    dprintf(("OSLibDosGetSharedMem returned error for %x", wnd));
     1771                    break;
     1772                }
     1773                if(wnd->getWindowClass()->hasClassName(lpszClass, fUnicode) &&
     1774                   (!lpszWindow || wnd->hasWindowName(lpszWindow, fUnicode)))
     1775                {
     1776                    OSLibWinEndEnumWindows(henum);
     1777                    dprintf(("FindWindowEx: Found window %x", wnd->getWindowHandle()));
     1778                    return wnd->getWindowHandle();
     1779                }
     1780            }
     1781            hwnd = OSLibWinGetNextWindow(henum);
     1782        }
     1783        OSLibWinEndEnumWindows(henum);
    17791784    }
    17801785    SetLastError(ERROR_CANNOT_FIND_WND_CLASS); //TODO: not always correct
     
    17871792{
    17881793 Win32BaseWindow  *win32wnd;
    1789  ULONG         magic;
    1790  ULONG         getcmd = 0;
    1791  HWND          hwndRelated;
     1794 ULONG         magic;
     1795 ULONG         getcmd = 0;
     1796 HWND          hwndRelated;
    17921797
    17931798    dprintf(("GetWindow %x %d NOT COMPLETE", getWindowHandle(), uCmd));
    17941799    switch(uCmd)
    17951800    {
    1796         case GW_CHILD:
    1797             getcmd = QWOS_TOP;
    1798             break;
    1799         case GW_HWNDFIRST:
    1800             if(getParent()) {
    1801                     getcmd = QWOS_TOP; //top of child windows
    1802             }
    1803             else    getcmd = QWOS_TOP; //TODO
    1804             break;
    1805         case GW_HWNDLAST:
    1806             if(getParent()) {
    1807                     getcmd = QWOS_BOTTOM; //bottom of child windows
    1808             }
    1809             else    getcmd = QWOS_BOTTOM; //TODO
    1810             break;
    1811         case GW_HWNDNEXT:
    1812             getcmd = QWOS_NEXT;
    1813             break;
    1814         case GW_HWNDPREV:
    1815             getcmd = QWOS_PREV;
    1816             break;
    1817         case GW_OWNER:
    1818             if(owner) {
    1819                     return owner->getWindowHandle();
    1820             }
    1821             else    return 0;
     1801        case GW_CHILD:
     1802            getcmd = QWOS_TOP;
     1803            break;
     1804        case GW_HWNDFIRST:
     1805            if(getParent()) {
     1806                    getcmd = QWOS_TOP; //top of child windows
     1807            }
     1808            else    getcmd = QWOS_TOP; //TODO
     1809            break;
     1810        case GW_HWNDLAST:
     1811            if(getParent()) {
     1812                    getcmd = QWOS_BOTTOM; //bottom of child windows
     1813            }
     1814            else    getcmd = QWOS_BOTTOM; //TODO
     1815            break;
     1816        case GW_HWNDNEXT:
     1817            getcmd = QWOS_NEXT;
     1818            break;
     1819        case GW_HWNDPREV:
     1820            getcmd = QWOS_PREV;
     1821            break;
     1822        case GW_OWNER:
     1823            if(owner) {
     1824                    return owner->getWindowHandle();
     1825            }
     1826            else    return 0;
    18221827    }
    18231828    hwndRelated = OSLibWinQueryWindow(OS2Hwnd, getcmd);
    18241829    if(hwndRelated)
    18251830    {
    1826         win32wnd = (Win32BaseWindow *)OSLibWinGetWindowULong(hwndRelated, OFFSET_WIN32WNDPTR);
    1827         magic    = OSLibWinGetWindowULong(hwndRelated, OFFSET_WIN32PM_MAGIC);
    1828         if(CheckMagicDword(magic) && win32wnd)
    1829         {
    1830             return win32wnd->getWindowHandle();
    1831         }
     1831        win32wnd = (Win32BaseWindow *)OSLibWinGetWindowULong(hwndRelated, OFFSET_WIN32WNDPTR);
     1832        magic    = OSLibWinGetWindowULong(hwndRelated, OFFSET_WIN32PM_MAGIC);
     1833        if(CheckMagicDword(magic) && win32wnd)
     1834        {
     1835            return win32wnd->getWindowHandle();
     1836        }
    18321837    }
    18331838    return 0;
     
    18561861HWND Win32BaseWindow::GetActiveWindow()
    18571862{
    1858  HWND          hwndActive;
     1863 HWND          hwndActive;
    18591864 Win32BaseWindow  *win32wnd;
    1860  ULONG         magic;
     1865 ULONG         magic;
    18611866
    18621867  hwndActive = OSLibWinQueryActiveWindow();
     
    18661871  if(CheckMagicDword(magic) && win32wnd)
    18671872  {
    1868         return win32wnd->getWindowHandle();
     1873        return win32wnd->getWindowHandle();
    18691874  }
    18701875  return hwndActive;
     
    18991904{
    19001905    if(fUnicode) {
    1901             return (lstrcmpW(windowNameW, (LPWSTR)wndname) == 0);
     1906            return (lstrcmpW(windowNameW, (LPWSTR)wndname) == 0);
    19021907    }
    19031908    else    return (strcmp(windowNameA, wndname) == 0);
     
    19201925{
    19211926    if(lpsz == NULL)
    1922         return FALSE;
     1927        return FALSE;
    19231928
    19241929    if(isUnicode == FALSE) {
    1925         windowNameA = (LPSTR)_smalloc(strlen(lpsz)+1);
    1926         strcpy(windowNameA, lpsz);
    1927         windowNameW = (LPWSTR)_smalloc((strlen(lpsz)+1)*sizeof(WCHAR));
    1928         lstrcpyAtoW(windowNameW, windowNameA);
     1930        windowNameA = (LPSTR)_smalloc(strlen(lpsz)+1);
     1931        strcpy(windowNameA, lpsz);
     1932        windowNameW = (LPWSTR)_smalloc((strlen(lpsz)+1)*sizeof(WCHAR));
     1933        lstrcpyAtoW(windowNameW, windowNameA);
    19291934    }
    19301935    else {
    1931         windowNameW = (LPWSTR)_smalloc((lstrlenW((LPWSTR)lpsz)+1)*sizeof(WCHAR));
    1932         lstrcpyW(windowNameW, (LPWSTR)lpsz);
    1933         windowNameA = (LPSTR)_smalloc(lstrlenW((LPWSTR)lpsz)+1);
    1934         lstrcpyWtoA(windowNameA, windowNameW);
     1936        windowNameW = (LPWSTR)_smalloc((lstrlenW((LPWSTR)lpsz)+1)*sizeof(WCHAR));
     1937        lstrcpyW(windowNameW, (LPWSTR)lpsz);
     1938        windowNameA = (LPSTR)_smalloc(lstrlenW((LPWSTR)lpsz)+1);
     1939        lstrcpyWtoA(windowNameA, windowNameW);
    19351940    }
    19361941    wndNameLength = strlen(windowNameA)+1; //including 0 terminator
    19371942
    19381943    if(OS2Hwnd)
    1939         return OSLibWinSetWindowText(OS2Hwnd, (LPSTR)windowNameA);
     1944        return OSLibWinSetWindowText(OS2Hwnd, (LPSTR)windowNameA);
    19401945
    19411946    return TRUE;
     
    19481953
    19491954   switch(index) {
    1950         case GWL_EXSTYLE:
    1951                 oldval = dwExStyle;
    1952                 setExStyle(value);
    1953                 return oldval;
    1954         case GWL_STYLE:
    1955                 oldval = dwStyle;
    1956                 setStyle(value);
    1957                 return oldval;
    1958         case GWL_WNDPROC:
    1959                 oldval = (LONG)getWindowProc();
    1960                 setWindowProc((WNDPROC)value);
    1961                 return oldval;
    1962         case GWL_HINSTANCE:
    1963                 oldval = hInstance;
    1964                 hInstance = value;
    1965                 return oldval;
    1966         case GWL_HWNDPARENT:
    1967                 return SetParent((HWND)value);
    1968 
    1969         case GWL_ID:
    1970                 oldval = getWindowId();
    1971                 setWindowId(value);
    1972                 return oldval;
    1973         case GWL_USERDATA:
    1974                 oldval = userData;
    1975                 userData = value;
    1976                 return oldval;
    1977         default:
    1978                 if(index >= 0 && index/4 < nrUserWindowLong)
    1979                 {
    1980                         oldval = userWindowLong[index/4];
    1981                         userWindowLong[index/4] = value;
    1982                         return oldval;
    1983                 }
    1984                 SetLastError(ERROR_INVALID_PARAMETER);
    1985                 return 0;
     1955        case GWL_EXSTYLE:
     1956                oldval = dwExStyle;
     1957                setExStyle(value);
     1958                return oldval;
     1959        case GWL_STYLE:
     1960                oldval = dwStyle;
     1961                setStyle(value);
     1962                return oldval;
     1963        case GWL_WNDPROC:
     1964                oldval = (LONG)getWindowProc();
     1965                setWindowProc((WNDPROC)value);
     1966                return oldval;
     1967        case GWL_HINSTANCE:
     1968                oldval = hInstance;
     1969                hInstance = value;
     1970                return oldval;
     1971        case GWL_HWNDPARENT:
     1972                return SetParent((HWND)value);
     1973
     1974        case GWL_ID:
     1975                oldval = getWindowId();
     1976                setWindowId(value);
     1977                return oldval;
     1978        case GWL_USERDATA:
     1979                oldval = userData;
     1980                userData = value;
     1981                return oldval;
     1982        default:
     1983                if(index >= 0 && index/4 < nrUserWindowLong)
     1984                {
     1985                        oldval = userWindowLong[index/4];
     1986                        userWindowLong[index/4] = value;
     1987                        return oldval;
     1988                }
     1989                SetLastError(ERROR_INVALID_PARAMETER);
     1990                return 0;
    19861991   }
    19871992}
     
    19911996{
    19921997   switch(index) {
    1993         case GWL_EXSTYLE:
    1994                 return dwExStyle;
    1995         case GWL_STYLE:
    1996                 return dwStyle;
    1997         case GWL_WNDPROC:
    1998                 return (ULONG)getWindowProc();
    1999         case GWL_HINSTANCE:
    2000                 return hInstance;
    2001         case GWL_HWNDPARENT:
    2002                 if(getParent()) {
    2003                         return getParent()->getWindowHandle();
    2004                 }
    2005                 else    return 0;
    2006         case GWL_ID:
    2007                 return getWindowId();
    2008         case GWL_USERDATA:
    2009                 return userData;
    2010         default:
    2011                 if(index >= 0 && index/4 < nrUserWindowLong)
    2012                 {
    2013                         return userWindowLong[index/4];
    2014                 }
    2015                 SetLastError(ERROR_INVALID_PARAMETER);
    2016                 return 0;
     1998        case GWL_EXSTYLE:
     1999                return dwExStyle;
     2000        case GWL_STYLE:
     2001                return dwStyle;
     2002        case GWL_WNDPROC:
     2003                return (ULONG)getWindowProc();
     2004        case GWL_HINSTANCE:
     2005                return hInstance;
     2006        case GWL_HWNDPARENT:
     2007                if(getParent()) {
     2008                        return getParent()->getWindowHandle();
     2009                }
     2010                else    return 0;
     2011        case GWL_ID:
     2012                return getWindowId();
     2013        case GWL_USERDATA:
     2014                return userData;
     2015        default:
     2016                if(index >= 0 && index/4 < nrUserWindowLong)
     2017                {
     2018                        return userWindowLong[index/4];
     2019                }
     2020                SetLastError(ERROR_INVALID_PARAMETER);
     2021                return 0;
    20172022   }
    20182023}
     
    20252030   if(index >= 0 && index/4 < nrUserWindowLong)
    20262031   {
    2027         oldval = ((WORD *)userWindowLong)[index/2];
    2028         ((WORD *)userWindowLong)[index/2] = value;
    2029         return oldval;
     2032        oldval = ((WORD *)userWindowLong)[index/2];
     2033        ((WORD *)userWindowLong)[index/2] = value;
     2034        return oldval;
    20302035   }
    20312036   SetLastError(ERROR_INVALID_PARAMETER);
     
    20382043   if(index >= 0 && index/4 < nrUserWindowLong)
    20392044   {
    2040         return ((WORD *)userWindowLong)[index/2];
     2045        return ((WORD *)userWindowLong)[index/2];
    20412046   }
    20422047   SetLastError(ERROR_INVALID_PARAMETER);
     
    20502055
    20512056   if(HwGetWindowHandleData(hwnd, (DWORD *)&window) == TRUE) {
    2052         return window;
     2057        return window;
    20532058   }
    20542059   else return NULL;
     
    20592064{
    20602065 Win32BaseWindow *win32wnd;
    2061  DWORD        magic;
     2066 DWORD        magic;
    20622067
    20632068  win32wnd = (Win32BaseWindow *)OSLibWinGetWindowULong(hwnd, OFFSET_WIN32WNDPTR);
     
    20652070
    20662071  if(win32wnd && CheckMagicDword(magic)) {
    2067         return win32wnd;
     2072        return win32wnd;
    20682073  }
    20692074  return 0;
  • trunk/src/user32/new/win32wbase.h

    r808 r819  
    1 /* $Id: win32wbase.h,v 1.3 1999-09-03 15:09:45 sandervl Exp $ */
     1/* $Id: win32wbase.h,v 1.4 1999-09-04 17:56:41 dengert Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2
     
    1717
    1818#include <win32class.h>
     19#include "open32wbase.h"
    1920#include <gen_object.h>
    2021#include <win32wndchild.h>
     
    3132#define CheckMagicDword(a)      (a==WIN32PM_MAGIC)
    3233
    33 #define WIN32APP_USERMSGBASE            0x1000
     34#define WIN32APP_USERMSGBASE            0x1000
    3435
    3536typedef struct {
     
    110111         PRECT  getWindowRect()                 { return &rectWindow; };
    111112         void   setClientRect(LONG left, LONG top, LONG right, LONG bottom)
    112          { 
    113                 rectClient.left  = left;  rectClient.top    = top;
    114                 rectClient.right = right; rectClient.bottom = bottom;
    115         };
    116         void   setWindowRect(LONG left, LONG top, LONG right, LONG bottom)
    117          {
    118                 rectWindow.left  = left;  rectWindow.top    = top;
    119                 rectWindow.right = right; rectWindow.bottom = bottom;
    120         };
     113         {
     114                rectClient.left  = left;  rectClient.top    = top;
     115                rectClient.right = right; rectClient.bottom = bottom;
     116        };
     117        void   setWindowRect(LONG left, LONG top, LONG right, LONG bottom)
     118         {
     119                rectWindow.left  = left;  rectWindow.top    = top;
     120                rectWindow.right = right; rectWindow.bottom = bottom;
     121        };
    121122         void   setWindowRect(PRECT rect)       { rectWindow = *rect; };
    122123
     
    158159          BOOL  hasWindowName(LPSTR wndname, BOOL fUnicode = 0);
    159160Win32WndClass  *getClass()  { return windowClass; };
    160         char   *getWindowNameA()              { return windowNameA; };
     161        char   *getWindowNameA()              { return windowNameA; };
    161162Win32BaseWindow *getOwner()                   { return owner; };
    162163
     
    175176    static HWND Win32ToOS2Handle(HWND hwnd)
    176177    {
    177         Win32BaseWindow *window = GetWindowFromHandle(hwnd);
    178 
    179         if(window) {
    180                 return window->getOS2WindowHandle();
    181         }
    182         else  return hwnd;    //OS/2 window handle
     178        Win32BaseWindow *window = GetWindowFromHandle(hwnd);
     179
     180        if(window) {
     181                return window->getOS2WindowHandle();
     182        }
     183        else  return hwnd;    //OS/2 window handle
    183184    }
    184185
    185186    static HWND OS2ToWin32Handle(HWND hwnd)
    186187    {
    187         Win32BaseWindow *window = GetWindowFromOS2Handle(hwnd);
    188 
    189         if(window) {
    190                 return window->getWindowHandle();
    191         }
    192         else  return hwnd;    //OS/2 window handle
     188        Win32BaseWindow *window = GetWindowFromOS2Handle(hwnd);
     189
     190        if(window) {
     191                return window->getWindowHandle();
     192        }
     193        else  return hwnd;    //OS/2 window handle
    193194    }
    194195
     
    265266     }
    266267#endif
     268
     269public:
     270       void SetFakeOpen32()    { WinSetDAXData (OS2Hwnd, &fakeWinBase); }
     271       void RemoveFakeOpen32() { WinSetDAXData (OS2Hwnd, NULL); }
     272
     273  fakeOpen32WinBaseClass fakeWinBase;
    267274};
    268275
  • trunk/src/user32/new/wingdi.cpp

    r777 r819  
    1 /* $Id: wingdi.cpp,v 1.12 1999-09-01 18:48:50 sandervl Exp $ */
     1/* $Id: wingdi.cpp,v 1.13 1999-09-04 17:56:41 dengert Exp $ */
    22/*
    33 * Win32 Window graphics apis for OS/2
     
    3232    return 0;
    3333    }
    34     window->MsgEraseBackGround(hdc);
     34// !! there is no HDC to paint on !!!    window->MsgEraseBackGround(hdc);
    3535#ifdef OPEN32_GDI
    3636    hdc = O32_BeginPaint(window->getOS2WindowHandle(),lps);
Note: See TracChangeset for help on using the changeset viewer.