Go back to non-win32k functions inside user32, using the inline wrappers to call...
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Sun, 11 Jan 2009 12:37:54 +0000 (12:37 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Sun, 11 Jan 2009 12:37:54 +0000 (12:37 +0000)
svn path=/trunk/; revision=38695

29 files changed:
reactos/dll/win32/user32/controls/button.c
reactos/dll/win32/user32/controls/combo.c
reactos/dll/win32/user32/controls/edit.c
reactos/dll/win32/user32/controls/icontitle.c
reactos/dll/win32/user32/controls/listbox.c
reactos/dll/win32/user32/controls/scrollbar.c
reactos/dll/win32/user32/controls/static.c
reactos/dll/win32/user32/include/ntwrapper.h
reactos/dll/win32/user32/include/user32p.h
reactos/dll/win32/user32/misc/dde.c
reactos/dll/win32/user32/misc/ddeserver.c
reactos/dll/win32/user32/misc/desktop.c
reactos/dll/win32/user32/misc/misc.c
reactos/dll/win32/user32/misc/object.c
reactos/dll/win32/user32/misc/stubs.c
reactos/dll/win32/user32/windows/accel.c
reactos/dll/win32/user32/windows/bitmap.c
reactos/dll/win32/user32/windows/caret.c
reactos/dll/win32/user32/windows/cursor.c
reactos/dll/win32/user32/windows/defwnd.c
reactos/dll/win32/user32/windows/dialog.c
reactos/dll/win32/user32/windows/input.c
reactos/dll/win32/user32/windows/mdi.c
reactos/dll/win32/user32/windows/menu.c
reactos/dll/win32/user32/windows/messagebox.c
reactos/dll/win32/user32/windows/nonclient.c
reactos/dll/win32/user32/windows/paint.c
reactos/dll/win32/user32/windows/window.c
reactos/dll/win32/user32/windows/winpos.c

index f00fd7a..0bfd70a 100644 (file)
@@ -210,7 +210,7 @@ __inline static void paint_button( HWND hwnd, LONG style, UINT action )
 {
     if (btnPaintFunc[style] && IsWindowVisible(hwnd))
     {
-        HDC hdc = NtUserGetDC( hwnd );
+        HDC hdc = GetDC( hwnd );
         btnPaintFunc[style]( hwnd, hdc, action );
         ReleaseDC( hwnd, hdc );
     }
@@ -317,11 +317,11 @@ static LRESULT WINAPI ButtonWndProc_common(HWND hWnd, UINT uMsg,
         if (btnPaintFunc[btn_type])
         {
             PAINTSTRUCT ps;
-            HDC hdc = wParam ? (HDC)wParam : NtUserBeginPaint( hWnd, &ps );
+            HDC hdc = wParam ? (HDC)wParam : BeginPaint( hWnd, &ps );
             int nOldMode = SetBkMode( hdc, OPAQUE );
             (btnPaintFunc[btn_type])( hWnd, hdc, ODA_DRAWENTIRE );
             SetBkMode(hdc, nOldMode); /*  reset painting mode */
-            if( !wParam ) NtUserEndPaint( hWnd, &ps );
+            if( !wParam ) EndPaint( hWnd, &ps );
         }
         break;
 
@@ -344,8 +344,8 @@ static LRESULT WINAPI ButtonWndProc_common(HWND hWnd, UINT uMsg,
         }
         /* fall through */
     case WM_LBUTTONDOWN:
-        NtUserSetCapture( hWnd );
-        NtUserSetFocus( hWnd );
+        SetCapture( hWnd );
+        SetFocus( hWnd );
         set_button_state( hWnd, get_button_state( hWnd ) | BUTTON_BTNPRESSED );
         SendMessageW( hWnd, BM_SETSTATE, TRUE, 0 );
         break;
@@ -409,7 +409,7 @@ static LRESULT WINAPI ButtonWndProc_common(HWND hWnd, UINT uMsg,
     case WM_SETTEXT:
     {
         /* Clear an old text here as Windows does */
-        HDC hdc = NtUserGetDC(hWnd);
+        HDC hdc = GetDC(hWnd);
         HBRUSH hbrush;
         RECT client, rc;
         HWND parent = GetParent(hWnd);
index 152c053..14e358a 100644 (file)
@@ -198,7 +198,7 @@ static LRESULT COMBO_NCDestroy( LPHEADCOMBO lphc )
        TRACE("[%p]: freeing storage\n", lphc->self);
 
        if( (CB_GETTYPE(lphc) != CBS_SIMPLE) && lphc->hWndLBox )
-          NtUserDestroyWindow( lphc->hWndLBox );
+          DestroyWindow( lphc->hWndLBox );
 
        SetWindowLongPtrW( lphc->self, 0, 0 );
        HeapFree( GetProcessHeap(), 0, lphc );
@@ -231,7 +231,7 @@ static INT CBGetTextAreaHeight(
   else
   {
     TEXTMETRICW tm;
-    HDC         hDC       = NtUserGetDC(hwnd);
+    HDC         hDC       = GetDC(hwnd);
     HFONT       hPrevFont = 0;
     INT         baseUnitY;
 
@@ -331,7 +331,7 @@ static void CBForceDummyResize(
    * this will cancel-out in the processing of the WM_WINDOWPOSCHANGING
    * message.
    */
-  NtUserSetWindowPos( lphc->self,
+  SetWindowPos( lphc->self,
                NULL,
                0, 0,
                windowRect.right  - windowRect.left,
@@ -662,7 +662,7 @@ static LRESULT COMBO_Create( HWND hwnd, LPHEADCOMBO lphc, HWND hwndParent, LONG
            if( CB_GETTYPE(lphc) != CBS_SIMPLE )
            {
               /* Now do the trick with parent */
-             NtUserSetParent(lphc->hWndLBox, HWND_DESKTOP);
+             SetParent(lphc->hWndLBox, HWND_DESKTOP);
               /*
                * If the combo is a dropdown, we must resize the control
               * to fit only the text area and button. To do this,
@@ -929,7 +929,7 @@ static LRESULT COMBO_Paint(LPHEADCOMBO lphc, HDC hParamDC)
   HDC  hDC;
 
   hDC = (hParamDC) ? hParamDC
-                  : NtUserBeginPaint( lphc->self, &ps);
+                  : BeginPaint( lphc->self, &ps);
 
   TRACE("hdc=%p\n", hDC);
 
@@ -975,7 +975,7 @@ static LRESULT COMBO_Paint(LPHEADCOMBO lphc, HDC hParamDC)
   }
 
   if( !hParamDC )
-    NtUserEndPaint(lphc->self, &ps);
+    EndPaint(lphc->self, &ps);
 
   return 0;
 }
@@ -1141,19 +1141,19 @@ static void CBDropDown( LPHEADCOMBO lphc )
    if( (rect.bottom + nDroppedHeight) >= mon_info.rcWork.bottom )
       rect.bottom = rect.top - nDroppedHeight;
 
-   NtUserSetWindowPos( lphc->hWndLBox, HWND_TOP, rect.left, rect.bottom,
+   SetWindowPos( lphc->hWndLBox, HWND_TOP, rect.left, rect.bottom,
                 lphc->droppedRect.right - lphc->droppedRect.left,
                 nDroppedHeight,
                 SWP_NOACTIVATE | SWP_SHOWWINDOW);
 
 
    if( !(lphc->wState & CBF_NOREDRAW) )
-     NtUserRedrawWindow( lphc->self, NULL, 0, RDW_INVALIDATE |
-                                    RDW_ERASE | RDW_UPDATENOW | RDW_NOCHILDREN );
+     RedrawWindow( lphc->self, NULL, 0, RDW_INVALIDATE |
+                          RDW_ERASE | RDW_UPDATENOW | RDW_NOCHILDREN );
 
    EnableWindow( lphc->hWndLBox, TRUE );
    if (GetCapture() != lphc->self)
-      NtUserSetCapture(lphc->hWndLBox);
+      SetCapture(lphc->hWndLBox);
 }
 
 /***********************************************************************
@@ -1178,7 +1178,7 @@ static void CBRollUp( LPHEADCOMBO lphc, BOOL ok, BOOL bButton )
           RECT rect;
 
           lphc->wState &= ~CBF_DROPPED;
-          NtUserShowWindow( lphc->hWndLBox, SW_HIDE );
+          ShowWindow( lphc->hWndLBox, SW_HIDE );
 
            if(GetCapture() == lphc->hWndLBox)
            {
@@ -1204,8 +1204,8 @@ static void CBRollUp( LPHEADCOMBO lphc, BOOL ok, BOOL bButton )
           }
 
           if( bButton && !(lphc->wState & CBF_NOREDRAW) )
-              NtUserRedrawWindow( hWnd, &rect, 0, RDW_INVALIDATE |
-                                          RDW_ERASE | RDW_UPDATENOW | RDW_NOCHILDREN );
+              RedrawWindow( hWnd, &rect, 0, RDW_INVALIDATE |
+                              RDW_ERASE | RDW_UPDATENOW | RDW_NOCHILDREN );
           CB_NOTIFY( lphc, CBN_CLOSEUP );
        }
    }
@@ -1567,13 +1567,13 @@ static void CBResetPos(
     * sizing messages */
 
    if( lphc->wState & CBF_EDIT )
-     NtUserSetWindowPos( lphc->hWndEdit, 0,
+     SetWindowPos( lphc->hWndEdit, 0,
                   rectEdit->left, rectEdit->top,
                   rectEdit->right - rectEdit->left,
                   rectEdit->bottom - rectEdit->top,
                        SWP_NOZORDER | SWP_NOACTIVATE | ((bDrop) ? SWP_NOREDRAW : 0) );
 
-   NtUserSetWindowPos( lphc->hWndLBox, 0,
+   SetWindowPos( lphc->hWndLBox, 0,
                 rectLB->left, rectLB->top,
                  rectLB->right - rectLB->left,
                 rectLB->bottom - rectLB->top,
@@ -1584,12 +1584,12 @@ static void CBResetPos(
        if( lphc->wState & CBF_DROPPED )
        {
            lphc->wState &= ~CBF_DROPPED;
-           NtUserShowWindow( lphc->hWndLBox, SW_HIDE );
+           ShowWindow( lphc->hWndLBox, SW_HIDE );
        }
 
        if( bRedraw && !(lphc->wState & CBF_NOREDRAW) )
-           NtUserRedrawWindow( lphc->self, NULL, 0,
-                               RDW_INVALIDATE | RDW_ERASE | RDW_UPDATENOW );
+           RedrawWindow( lphc->self, NULL, 0,
+                           RDW_INVALIDATE | RDW_ERASE | RDW_UPDATENOW );
    }
 }
 
@@ -1741,7 +1741,7 @@ static void COMBO_LButtonDown( LPHEADCOMBO lphc, LPARAM lParam )
           /* drop down the listbox and start tracking */
 
            lphc->wState |= CBF_CAPTURE;
-           NtUserSetCapture( hWnd );
+           SetCapture( hWnd );
            CBDropDown( lphc );
        }
        if( bButton ) CBRepaintButton( lphc );
@@ -1770,7 +1770,7 @@ static void COMBO_LButtonUp( LPHEADCOMBO lphc )
           }
        }
        ReleaseCapture();
-       NtUserSetCapture(lphc->hWndLBox);
+       SetCapture(lphc->hWndLBox);
    }
 
    if( lphc->wState & CBF_BUTTONDOWN )
@@ -1943,7 +1943,7 @@ static LRESULT ComboWndProc_common( HWND hwnd, UINT message,
                return  (LRESULT)lphc->hFont;
        case WM_SETFOCUS:
                if( lphc->wState & CBF_EDIT )
-                   NtUserSetFocus( lphc->hWndEdit );
+                   SetFocus( lphc->hWndEdit );
                else
                    COMBO_SetFocus( lphc );
                return  TRUE;
@@ -2054,7 +2054,7 @@ static LRESULT ComboWndProc_common( HWND hwnd, UINT message,
                                 SendMessageA(hwndTarget, message, wParam, lParam);
        }
        case WM_LBUTTONDOWN:
-               if( !(lphc->wState & CBF_FOCUSED) ) NtUserSetFocus( lphc->self );
+               if( !(lphc->wState & CBF_FOCUSED) ) SetFocus( lphc->self );
                if( lphc->wState & CBF_FOCUSED ) COMBO_LButtonDown( lphc, lParam );
                return  TRUE;
        case WM_LBUTTONUP:
index 3891dc5..ec8c553 100644 (file)
@@ -1173,7 +1173,7 @@ static void EDIT_BuildLineDefs_ML(EDITSTATE *es, INT istart, INT iend, INT delta
        if (istart == iend && delta == 0)
                return;
 
-       dc = NtUserGetDC(es->hwndSelf);
+       dc = GetDC(es->hwndSelf);
        if (es->font)
                old_font = SelectObject(dc, es->font);
 
@@ -1443,7 +1443,7 @@ static void EDIT_CalcLineWidth_SL(EDITSTATE *es)
 
        text = EDIT_GetPasswordPointer_SL(es);
 
-       dc = NtUserGetDC(es->hwndSelf);
+       dc = GetDC(es->hwndSelf);
        if (es->font)
                old_font = SelectObject(dc, es->font);
 
@@ -1577,7 +1577,7 @@ static INT EDIT_CharFromPos(EDITSTATE *es, INT x, INT y, LPBOOL after_wrap)
                                *after_wrap = FALSE;
                        return line_index;
                }
-               dc = NtUserGetDC(es->hwndSelf);
+               dc = GetDC(es->hwndSelf);
                if (es->font)
                        old_font = SelectObject(dc, es->font);
                     low = line_index;
@@ -1621,7 +1621,7 @@ static INT EDIT_CharFromPos(EDITSTATE *es, INT x, INT y, LPBOOL after_wrap)
                }
 
                text = EDIT_GetPasswordPointer_SL(es);
-               dc = NtUserGetDC(es->hwndSelf);
+               dc = GetDC(es->hwndSelf);
                if (es->font)
                        old_font = SelectObject(dc, es->font);
                if (x < 0)
@@ -3187,7 +3187,7 @@ static LRESULT EDIT_EM_PosFromChar(EDITSTATE *es, INT index, BOOL after_wrap)
        LINEDEF *line_def;
 
        index = min(index, len);
-       dc = NtUserGetDC(es->hwndSelf);
+       dc = GetDC(es->hwndSelf);
        if (es->font)
                old_font = SelectObject(dc, es->font);
        if (es->style & ES_MULTILINE) {
@@ -3803,7 +3803,7 @@ static void EDIT_EM_SetMargins(EDITSTATE *es, INT action,
 
         /* Set the default margins depending on the font */
         if (es->font && (left == EC_USEFONTINFO || right == EC_USEFONTINFO)) {
-            HDC dc = NtUserGetDC(es->hwndSelf);
+            HDC dc = GetDC(es->hwndSelf);
             HFONT old_font = SelectObject(dc, es->font);
             GetTextMetricsW(dc, &tm);
             /* The default margins are only non zero for TrueType or Vector fonts */
@@ -4257,7 +4257,7 @@ static void EDIT_WM_ContextMenu(EDITSTATE *es, INT x, INT y)
        /* copy */
        EnableMenuItem(popup, 3, MF_BYPOSITION | ((end - start) && !(es->style & ES_PASSWORD) ? MF_ENABLED : MF_GRAYED));
        /* paste */
-       EnableMenuItem(popup, 4, MF_BYPOSITION | (NtUserIsClipboardFormatAvailable(CF_UNICODETEXT) && !(es->style & ES_READONLY) ? MF_ENABLED : MF_GRAYED));
+       EnableMenuItem(popup, 4, MF_BYPOSITION | (IsClipboardFormatAvailable(CF_UNICODETEXT) && !(es->style & ES_READONLY) ? MF_ENABLED : MF_GRAYED));
        /* delete */
        EnableMenuItem(popup, 5, MF_BYPOSITION | ((end - start) && !(es->style & ES_READONLY) ? MF_ENABLED : MF_GRAYED));
        /* select all */
@@ -4274,7 +4274,7 @@ static void EDIT_WM_ContextMenu(EDITSTATE *es, INT x, INT y)
         }
 
        TrackPopupMenu(popup, TPM_LEFTALIGN | TPM_RIGHTBUTTON, x, y, 0, es->hwndSelf, NULL);
-       NtUserDestroyMenu(menu);
+       DestroyMenu(menu);
 }
 
 
@@ -4301,9 +4301,9 @@ static void EDIT_WM_Copy(EDITSTATE *es)
        TRACE("%s\n", debugstr_w(dst));
        GlobalUnlock(hdst);
        OpenClipboard(es->hwndSelf);
-       NtUserEmptyClipboard();
+       EmptyClipboard();
        SetClipboardData(CF_UNICODETEXT, hdst);
-       NtUserCloseClipboard();
+       CloseClipboard();
 }
 
 
@@ -4801,7 +4801,7 @@ static LRESULT EDIT_WM_LButtonDblClk(EDITSTATE *es)
        INT ll;
 
        es->bCaptureState = TRUE;
-       NtUserSetCapture(es->hwndSelf);
+       SetCapture(es->hwndSelf);
 
        l = EDIT_EM_LineFromChar(es, e);
        li = EDIT_EM_LineIndex(es, l);
@@ -4811,7 +4811,7 @@ static LRESULT EDIT_WM_LButtonDblClk(EDITSTATE *es)
        EDIT_EM_SetSel(es, s, e, FALSE);
        EDIT_EM_ScrollCaret(es);
        es->region_posx = es->region_posy = 0;
-       NtUserSetTimer(es->hwndSelf, 0, 100, NULL);
+       SetTimer(es->hwndSelf, 0, 100, NULL);
        return 0;
 }
 
@@ -4827,17 +4827,17 @@ static LRESULT EDIT_WM_LButtonDown(EDITSTATE *es, DWORD keys, INT x, INT y)
        BOOL after_wrap;
 
        es->bCaptureState = TRUE;
-       NtUserSetCapture(es->hwndSelf);
+       SetCapture(es->hwndSelf);
        EDIT_ConfinePoint(es, &x, &y);
        e = EDIT_CharFromPos(es, x, y, &after_wrap);
        EDIT_EM_SetSel(es, (keys & MK_SHIFT) ? es->selection_start : e, e, after_wrap);
        EDIT_EM_ScrollCaret(es);
        es->region_posx = es->region_posy = 0;
        if (!(es->style & ES_MULTILINE))
-           NtUserSetTimer(es->hwndSelf, 0, 100, NULL);
+           SetTimer(es->hwndSelf, 0, 100, NULL);
 
        if (!(es->flags & EF_FOCUSED))
-            NtUserSetFocus(es->hwndSelf);
+            SetFocus(es->hwndSelf);
 
        return 0;
 }
@@ -4851,7 +4851,7 @@ static LRESULT EDIT_WM_LButtonDown(EDITSTATE *es, DWORD keys, INT x, INT y)
 static LRESULT EDIT_WM_LButtonUp(EDITSTATE *es)
 {
        if (es->bCaptureState) {
-               NtUserKillTimer(es->hwndSelf, 0);
+               KillTimer(es->hwndSelf, 0);
                if (GetCapture() == es->hwndSelf) ReleaseCapture();
        }
        es->bCaptureState = FALSE;
@@ -5026,7 +5026,7 @@ static void EDIT_WM_Paint(EDITSTATE *es, HDC hdc)
        BOOL rev = es->bEnableState &&
                                ((es->flags & EF_FOCUSED) ||
                                        (es->style & ES_NOHIDESEL));
-        dc = hdc ? hdc : NtUserBeginPaint(es->hwndSelf, &ps);
+        dc = hdc ? hdc : BeginPaint(es->hwndSelf, &ps);
 
        GetClientRect(es->hwndSelf, &rcClient);
 
@@ -5091,7 +5091,7 @@ static void EDIT_WM_Paint(EDITSTATE *es, HDC hdc)
                SelectObject(dc, old_font);
 
         if (!hdc)
-            NtUserEndPaint(es->hwndSelf, &ps);
+            EndPaint(es->hwndSelf, &ps);
 }
 
 
@@ -5120,7 +5120,7 @@ static void EDIT_WM_Paste(EDITSTATE *es)
              const WCHAR empty_strW[] = { 0 };
              EDIT_EM_ReplaceSel(es, TRUE, empty_strW, TRUE, TRUE);
         }
-       NtUserCloseClipboard();
+       CloseClipboard();
 }
 
 
@@ -5139,12 +5139,12 @@ static void EDIT_WM_SetFocus(EDITSTATE *es)
         /* single line edit updates itself */
         if (!(es->style & ES_MULTILINE))
         {
-            HDC hdc = NtUserGetDC(es->hwndSelf);
+            HDC hdc = GetDC(es->hwndSelf);
             EDIT_WM_Paint(es, hdc);
             ReleaseDC(es->hwndSelf, hdc);
         }
 
-       NtUserCreateCaret(es->hwndSelf, 0, 2, es->line_height);
+       CreateCaret(es->hwndSelf, 0, 2, es->line_height);
        EDIT_SetCaretPos(es, es->selection_end,
                         es->flags & EF_AFTER_WRAP);
        ShowCaret(es->hwndSelf);
@@ -5169,7 +5169,7 @@ static void EDIT_WM_SetFont(EDITSTATE *es, HFONT font, BOOL redraw)
        RECT clientRect;
 
        es->font = font;
-       dc = NtUserGetDC(es->hwndSelf);
+       dc = GetDC(es->hwndSelf);
        if (font)
                old_font = SelectObject(dc, font);
        GetTextMetricsW(dc, &tm);
@@ -5194,7 +5194,7 @@ static void EDIT_WM_SetFont(EDITSTATE *es, HFONT font, BOOL redraw)
                EDIT_UpdateText(es, NULL, TRUE);
        if (es->flags & EF_FOCUSED) {
                DestroyCaret();
-               NtUserCreateCaret(es->hwndSelf, 0, 2, es->line_height);
+               CreateCaret(es->hwndSelf, 0, 2, es->line_height);
                EDIT_SetCaretPos(es, es->selection_end,
                                 es->flags & EF_AFTER_WRAP);
                ShowCaret(es->hwndSelf);
@@ -5506,7 +5506,7 @@ static void EDIT_UpdateTextRegion(EDITSTATE *es, HRGN hrgn, BOOL bErase)
         es->flags &= ~EF_UPDATE;
         EDIT_NOTIFY_PARENT(es, EN_UPDATE);
     }
-    NtUserInvalidateRgn(es->hwndSelf, hrgn, bErase);
+    InvalidateRgn(es->hwndSelf, hrgn, bErase);
 }
 
 
index 9d4ff52..bacb7e8 100644 (file)
@@ -108,7 +108,7 @@ static BOOL ICONTITLE_SetTitlePos( HWND hwnd, HWND owner )
         length = strlenW( str );
     }
 
-    if (!(hDC = NtUserGetDC( hwnd ))) return FALSE;
+    if (!(hDC = GetDC( hwnd ))) return FALSE;
 
     hPrevFont = SelectObject( hDC, hIconTitleFont );
 
@@ -131,7 +131,7 @@ static BOOL ICONTITLE_SetTitlePos( HWND hwnd, HWND owner )
     /* point is relative to owner, make it relative to parent */
     MapWindowPoints( owner, GetParent(hwnd), &pt, 1 );
 
-    NtUserSetWindowPos( hwnd, owner, pt.x, pt.y, cx, cy, SWP_NOACTIVATE );
+    SetWindowPos( hwnd, owner, pt.x, pt.y, cx, cy, SWP_NOACTIVATE );
     return TRUE;
 }
 
@@ -224,7 +224,7 @@ LRESULT WINAPI IconTitleWndProc( HWND hWnd, UINT msg,
        case WM_NCLBUTTONDBLCLK:
             return SendMessageW( owner, msg, wParam, lParam );
        case WM_ACTIVATE:
-            if( wParam ) NtUserSetActiveWindow( owner );
+            if( wParam ) SetActiveWindow( owner );
              return 0;
        case WM_CLOSE:
             return 0;
index 6286e4c..bb91d5d 100644 (file)
@@ -52,6 +52,7 @@ BOOL is_old_app(HWND hwnd)
 #define WS_EX_DRAGDETECT    0x00000002L
 #define WM_BEGINDRAG        0x022C
 
+UINT WINAPI SetSystemTimer(HWND,UINT_PTR,UINT,TIMERPROC);
 BOOL WINAPI KillSystemTimer(HWND,UINT_PTR);
 
 /* End of hack section -------------------------------- */
@@ -459,9 +460,9 @@ static void LISTBOX_UpdateSize( LB_DESCR *descr )
 #endif
             TRACE("[%p]: changing height %d -> %d\n",
                   descr->self, descr->height, descr->height - remaining );
-            NtUserSetWindowPos( descr->self, 0, 0, 0, rect.right - rect.left,
-                                rect.bottom - rect.top - remaining,
-                                SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOMOVE );
+            SetWindowPos( descr->self, 0, 0, 0, rect.right - rect.left,
+                          rect.bottom - rect.top - remaining,
+                          SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOMOVE );
             return;
         }
     }
@@ -735,7 +736,7 @@ static void LISTBOX_RepaintItem( LB_DESCR *descr, INT index, UINT action )
         return;
     }
     if (LISTBOX_GetItemRect( descr, index, &rect ) != 1) return;
-    if (!(hdc = NtUserGetDCEx( descr->self, 0, DCX_CACHE ))) return;
+    if (!(hdc = GetDCEx( descr->self, 0, DCX_CACHE ))) return;
     if (descr->font) oldFont = SelectObject( hdc, descr->font );
     hbrush = (HBRUSH)SendMessageW( descr->owner, WM_CTLCOLORLISTBOX,
                                   (WPARAM)hdc, (LPARAM)descr->self );
@@ -766,7 +767,7 @@ static void LISTBOX_DrawFocusRect( LB_DESCR *descr, BOOL on )
     if (!descr->caret_on || !descr->in_focus) return;
 
     if (LISTBOX_GetItemRect( descr, descr->focus_item, &rect ) != 1) return;
-    if (!(hdc = NtUserGetDCEx( descr->self, 0, DCX_CACHE ))) return;
+    if (!(hdc = GetDCEx( descr->self, 0, DCX_CACHE ))) return;
     if (descr->font) oldFont = SelectObject( hdc, descr->font );
     if (!IsWindowEnabled(descr->self))
         SetTextColor( hdc, GetSysColor( COLOR_GRAYTEXT ) );
@@ -1387,7 +1388,7 @@ static INT LISTBOX_SetFont( LB_DESCR *descr, HFONT font )
 
     descr->font = font;
 
-    if (!(hdc = NtUserGetDCEx( descr->self, 0, DCX_CACHE )))
+    if (!(hdc = GetDCEx( descr->self, 0, DCX_CACHE )))
     {
         ERR("unable to get DC.\n" );
         return 16;
@@ -2130,8 +2131,8 @@ static LRESULT LISTBOX_HandleLButtonDown( LB_DESCR *descr, DWORD keys, INT x, IN
 
     if (!descr->in_focus)
     {
-        if( !descr->lphc ) NtUserSetFocus( descr->self );
-        else NtUserSetFocus( (descr->lphc->hWndEdit) ? descr->lphc->hWndEdit : descr->lphc->self );
+        if( !descr->lphc ) SetFocus( descr->self );
+        else SetFocus( (descr->lphc->hWndEdit) ? descr->lphc->hWndEdit : descr->lphc->self );
     }
 
     if (index == -1) return 0;
@@ -2144,7 +2145,7 @@ static LRESULT LISTBOX_HandleLButtonDown( LB_DESCR *descr, DWORD keys, INT x, IN
     }
 
     descr->captured = TRUE;
-    NtUserSetCapture( descr->self );
+    SetCapture( descr->self );
 
     if (descr->style & (LBS_EXTENDEDSEL | LBS_MULTIPLESEL))
     {
@@ -2293,7 +2294,7 @@ static LRESULT LISTBOX_HandleLButtonDownCombo( LB_DESCR *descr, UINT msg, DWORD
             /* Resume the Capture after scrolling is complete
              */
             if(hWndOldCapture != 0)
-                NtUserSetCapture(hWndOldCapture);
+                SetCapture(hWndOldCapture);
         }
     }
     return 0;
@@ -2412,7 +2413,7 @@ static void LISTBOX_HandleMouseMove( LB_DESCR *descr,
     /* Start/stop the system timer */
 
     if (dir != LB_TIMER_NONE)
-        NtUserSetSystemTimer( descr->self, LB_TIMER_ID, LB_SCROLL_TIMEOUT, NULL);
+        SetSystemTimer( descr->self, LB_TIMER_ID, LB_SCROLL_TIMEOUT, NULL);
     else if (LISTBOX_Timer != LB_TIMER_NONE)
         KillSystemTimer( descr->self, LB_TIMER_ID );
     LISTBOX_Timer = dir;
@@ -3269,9 +3270,9 @@ static LRESULT WINAPI ListBoxWndProc_common( HWND hwnd, UINT msg,
     case WM_PAINT:
         {
             PAINTSTRUCT ps;
-            HDC hdc = ( wParam ) ? ((HDC)wParam) :  NtUserBeginPaint( descr->self, &ps );
+            HDC hdc = ( wParam ) ? ((HDC)wParam) :  BeginPaint( descr->self, &ps );
             ret = LISTBOX_Paint( descr, hdc );
-            if( !wParam ) NtUserEndPaint( hwnd, &ps );
+            if( !wParam ) EndPaint( hwnd, &ps );
         }
         return ret;
     case WM_SIZE:
index f3a50b1..ca3fb1d 100644 (file)
@@ -72,6 +72,7 @@ HBRUSH DefWndControlColor(HDC hDC, UINT ctlType);
 static LRESULT WINAPI ScrollBarWndProcW( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
 static LRESULT WINAPI ScrollBarWndProcA( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
 
+UINT WINAPI SetSystemTimer(HWND,UINT_PTR,UINT,TIMERPROC);
 BOOL WINAPI KillSystemTimer(HWND,UINT_PTR);
 
 /*********************************************************************
@@ -815,7 +816,7 @@ IntScrollHandleScrollEvent(HWND Wnd, INT SBType, UINT Msg, POINT Pt)
         {
           case WM_LBUTTONDOWN:  /* Initialise mouse tracking */
             HideCaret(Wnd);  /* hide caret while holding down LBUTTON */
-            NtUserSetCapture(Wnd);
+            SetCapture(Wnd);
             PrevPt = Pt;
             ScrollTrackHitTest = HitTest = SCROLL_THUMB;
             break;
@@ -838,7 +839,7 @@ IntScrollHandleScrollEvent(HWND Wnd, INT SBType, UINT Msg, POINT Pt)
       return;
     }
 
-  Dc = NtUserGetDCEx(Wnd, 0, DCX_CACHE | ((SB_CTL == SBType) ? 0 : DCX_WINDOW));
+  Dc = GetDCEx(Wnd, 0, DCX_CACHE | ((SB_CTL == SBType) ? 0 : DCX_WINDOW));
   if (SB_VERT == SBType)
     {
       Vertical = TRUE;
@@ -867,9 +868,9 @@ IntScrollHandleScrollEvent(HWND Wnd, INT SBType, UINT Msg, POINT Pt)
         PrevPt = Pt;
         if (SB_CTL == SBType && 0 != (GetWindowLongW(Wnd, GWL_STYLE) & WS_TABSTOP))
           {
-            NtUserSetFocus(Wnd);
+            SetFocus(Wnd);
           }
-        NtUserSetCapture(Wnd);
+        SetCapture(Wnd);
         ScrollBarInfo.rgstate[ScrollTrackHitTest] |= STATE_SYSTEM_PRESSED;
         NewInfo.rgstate[ScrollTrackHitTest] = ScrollBarInfo.rgstate[ScrollTrackHitTest];
         NtUserSetScrollBarInfo(Wnd, IntScrollGetObjectId(SBType), &NewInfo);
@@ -915,9 +916,9 @@ IntScrollHandleScrollEvent(HWND Wnd, INT SBType, UINT Msg, POINT Pt)
                 SendMessageW(WndOwner, Vertical ? WM_VSCROLL : WM_HSCROLL,
                              SB_LINEUP, (LPARAM) WndCtl);
               }
-           NtUserSetSystemTimer(Wnd, SCROLL_TIMER, (WM_LBUTTONDOWN == Msg) ?
-                             SCROLL_FIRST_DELAY : SCROLL_REPEAT_DELAY,
-                             (TIMERPROC) NULL);
+           SetSystemTimer(Wnd, SCROLL_TIMER, (WM_LBUTTONDOWN == Msg) ?
+                           SCROLL_FIRST_DELAY : SCROLL_REPEAT_DELAY,
+                           (TIMERPROC) NULL);
           }
         else
           {
@@ -933,9 +934,9 @@ IntScrollHandleScrollEvent(HWND Wnd, INT SBType, UINT Msg, POINT Pt)
                 SendMessageW(WndOwner, Vertical ? WM_VSCROLL : WM_HSCROLL,
                              SB_PAGEUP, (LPARAM) WndCtl);
               }
-            NtUserSetSystemTimer(Wnd, SCROLL_TIMER, (WM_LBUTTONDOWN == Msg) ?
-                                 SCROLL_FIRST_DELAY : SCROLL_REPEAT_DELAY,
-                                 (TIMERPROC) NULL);
+            SetSystemTimer(Wnd, SCROLL_TIMER, (WM_LBUTTONDOWN == Msg) ?
+                           SCROLL_FIRST_DELAY : SCROLL_REPEAT_DELAY,
+                           (TIMERPROC) NULL);
           }
         else
           {
@@ -999,9 +1000,9 @@ IntScrollHandleScrollEvent(HWND Wnd, INT SBType, UINT Msg, POINT Pt)
                 SendMessageW(WndOwner, Vertical ? WM_VSCROLL : WM_HSCROLL,
                              SB_PAGEDOWN, (LPARAM) WndCtl);
               }
-            NtUserSetSystemTimer(Wnd, SCROLL_TIMER, (WM_LBUTTONDOWN == Msg) ?
-                                 SCROLL_FIRST_DELAY : SCROLL_REPEAT_DELAY,
-                                 (TIMERPROC) NULL);
+            SetSystemTimer(Wnd, SCROLL_TIMER, (WM_LBUTTONDOWN == Msg) ?
+                           SCROLL_FIRST_DELAY : SCROLL_REPEAT_DELAY,
+                           (TIMERPROC) NULL);
           }
         else
           {
@@ -1017,9 +1018,9 @@ IntScrollHandleScrollEvent(HWND Wnd, INT SBType, UINT Msg, POINT Pt)
                 SendMessageW(WndOwner, Vertical ? WM_VSCROLL : WM_HSCROLL,
                              SB_LINEDOWN, (LPARAM) WndCtl);
               }
-           NtUserSetSystemTimer(Wnd, SCROLL_TIMER, (WM_LBUTTONDOWN == Msg) ?
-                             SCROLL_FIRST_DELAY : SCROLL_REPEAT_DELAY,
-                             (TIMERPROC) NULL);
+           SetSystemTimer(Wnd, SCROLL_TIMER, (WM_LBUTTONDOWN == Msg) ?
+                           SCROLL_FIRST_DELAY : SCROLL_REPEAT_DELAY,
+                           (TIMERPROC) NULL);
           }
         else
           {
@@ -1093,45 +1094,45 @@ static void IntScrollCreateScrollBar(
     {
       if (0 != (lpCreate->style & SBS_SIZEBOXTOPLEFTALIGN))
         {
-          NtUserMoveWindow(Wnd, lpCreate->x, lpCreate->y, GetSystemMetrics(SM_CXVSCROLL) + 1,
-                           GetSystemMetrics(SM_CYHSCROLL) + 1, FALSE);
+          MoveWindow(Wnd, lpCreate->x, lpCreate->y, GetSystemMetrics(SM_CXVSCROLL) + 1,
+                     GetSystemMetrics(SM_CYHSCROLL) + 1, FALSE);
         }
       else if (0 != (lpCreate->style & SBS_SIZEBOXBOTTOMRIGHTALIGN))
         {
-          NtUserMoveWindow(Wnd, lpCreate->x + lpCreate->cx - GetSystemMetrics(SM_CXVSCROLL) - 1,
-                           lpCreate->y + lpCreate->cy - GetSystemMetrics(SM_CYHSCROLL) - 1,
-                           GetSystemMetrics(SM_CXVSCROLL) + 1,
-                           GetSystemMetrics(SM_CYHSCROLL) + 1, FALSE);
+          MoveWindow(Wnd, lpCreate->x + lpCreate->cx - GetSystemMetrics(SM_CXVSCROLL) - 1,
+                     lpCreate->y + lpCreate->cy - GetSystemMetrics(SM_CYHSCROLL) - 1,
+                     GetSystemMetrics(SM_CXVSCROLL) + 1,
+                     GetSystemMetrics(SM_CYHSCROLL) + 1, FALSE);
         }
     }
   else if (0 != (lpCreate->style & SBS_VERT))
     {
       if (0 != (lpCreate->style & SBS_LEFTALIGN))
         {
-          NtUserMoveWindow(Wnd, lpCreate->x, lpCreate->y,
-                           GetSystemMetrics(SM_CXVSCROLL) + 1, lpCreate->cy, FALSE);
+          MoveWindow(Wnd, lpCreate->x, lpCreate->y,
+                     GetSystemMetrics(SM_CXVSCROLL) + 1, lpCreate->cy, FALSE);
         }
       else if (0 != (lpCreate->style & SBS_RIGHTALIGN))
         {
-          NtUserMoveWindow(Wnd,
-                           lpCreate->x + lpCreate->cx - GetSystemMetrics(SM_CXVSCROLL) - 1,
-                           lpCreate->y,
-                           GetSystemMetrics(SM_CXVSCROLL) + 1, lpCreate->cy, FALSE);
+          MoveWindow(Wnd,
+                     lpCreate->x + lpCreate->cx - GetSystemMetrics(SM_CXVSCROLL) - 1,
+                     lpCreate->y,
+                      GetSystemMetrics(SM_CXVSCROLL) + 1, lpCreate->cy, FALSE);
         }
     }
   else  /* SBS_HORZ */
     {
       if (0 != (lpCreate->style & SBS_TOPALIGN))
         {
-          NtUserMoveWindow(Wnd, lpCreate->x, lpCreate->y,
-                           lpCreate->cx, GetSystemMetrics(SM_CYHSCROLL) + 1, FALSE);
+          MoveWindow(Wnd, lpCreate->x, lpCreate->y,
+                     lpCreate->cx, GetSystemMetrics(SM_CYHSCROLL) + 1, FALSE);
         }
       else if (0 != (lpCreate->style & SBS_BOTTOMALIGN))
         {
-          NtUserMoveWindow(Wnd,
-                           lpCreate->x,
-                           lpCreate->y + lpCreate->cy - GetSystemMetrics(SM_CYHSCROLL) - 1,
-                           lpCreate->cx, GetSystemMetrics(SM_CYHSCROLL) + 1, FALSE);
+          MoveWindow(Wnd,
+                     lpCreate->x,
+                     lpCreate->y + lpCreate->cy - GetSystemMetrics(SM_CYHSCROLL) - 1,
+                     lpCreate->cx, GetSystemMetrics(SM_CYHSCROLL) + 1, FALSE);
         }
     }
 }
@@ -1278,7 +1279,7 @@ ScrollBarWndProc(WNDPROC DefWindowProc, HWND Wnd, UINT Msg, WPARAM wParam, LPARA
           DbgPrint("ScrollBarWndProc WM_ENABLE\n");
           NtUserEnableScrollBar(Wnd,SB_CTL,(wParam ? ESB_ENABLE_BOTH : ESB_DISABLE_BOTH));
           /* Refresh Scrollbars. */
-          hdc = NtUserGetDCEx( Wnd, 0, DCX_CACHE );
+          hdc = GetDCEx( Wnd, 0, DCX_CACHE );
           if (!hdc) return 1;
           IntDrawScrollBar( Wnd, hdc, SB_CTL);
           ReleaseDC( Wnd, hdc );
@@ -1327,12 +1328,12 @@ ScrollBarWndProc(WNDPROC DefWindowProc, HWND Wnd, UINT Msg, WPARAM wParam, LPARA
                                                &ArrowSize, &ThumbSize, &ThumbPos);
           if (! Vertical)
             {
-              NtUserCreateCaret(Wnd, (HBITMAP) 1, ThumbSize - 2, Rect.bottom - Rect.top - 2);
+              CreateCaret(Wnd, (HBITMAP) 1, ThumbSize - 2, Rect.bottom - Rect.top - 2);
               SetCaretPos(ThumbPos + 1, Rect.top + 1);
             }
           else
             {
-              NtUserCreateCaret(Wnd, (HBITMAP) 1, Rect.right - Rect.left - 2, ThumbSize - 2);
+              CreateCaret(Wnd, (HBITMAP) 1, Rect.right - Rect.left - 2, ThumbSize - 2);
               SetCaretPos(Rect.top + 1, ThumbPos + 1);
             }
           ShowCaret(Wnd);
@@ -1373,7 +1374,7 @@ ScrollBarWndProc(WNDPROC DefWindowProc, HWND Wnd, UINT Msg, WPARAM wParam, LPARA
           PAINTSTRUCT Ps;
           HDC Dc;
 
-          Dc = (0 != wParam ? (HDC) wParam : NtUserBeginPaint(Wnd, &Ps));
+          Dc = (0 != wParam ? (HDC) wParam : BeginPaint(Wnd, &Ps));
 
           if (GetWindowLongW(Wnd, GWL_STYLE) & SBS_SIZEGRIP)
             {
@@ -1392,7 +1393,7 @@ ScrollBarWndProc(WNDPROC DefWindowProc, HWND Wnd, UINT Msg, WPARAM wParam, LPARA
 
           if (0 == wParam)
             {
-              NtUserEndPaint(Wnd, &Ps);
+              EndPaint(Wnd, &Ps);
             }
         }
         break;
@@ -1418,7 +1419,7 @@ ScrollBarWndProc(WNDPROC DefWindowProc, HWND Wnd, UINT Msg, WPARAM wParam, LPARA
         return IntScrollGetScrollRange(Wnd, SB_CTL, (LPINT) wParam, (LPINT) lParam);
 
       case SBM_ENABLE_ARROWS:
-        return NtUserEnableScrollBar(Wnd, SB_CTL, wParam);
+        return EnableScrollBar(Wnd, SB_CTL, wParam);
 
       case SBM_SETRANGEREDRAW:
         {
index 57611be..5433d9b 100644 (file)
@@ -211,8 +211,8 @@ static HICON STATIC_SetIcon( HWND hwnd, HICON hicon, DWORD style )
         }
         else */
         {
-             NtUserSetWindowPos( hwnd, 0, 0, 0, bm.bmWidth, bm.bmHeight,
-                                 SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER );
+             SetWindowPos( hwnd, 0, 0, 0, bm.bmWidth, bm.bmHeight,
+                           SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER );
         }
     }
     return prevIcon;
@@ -248,8 +248,8 @@ static HBITMAP STATIC_SetBitmap( HWND hwnd, HBITMAP hBitmap, DWORD style )
         }
         else */
         {
-            NtUserSetWindowPos( hwnd, 0, 0, 0, bm.bmWidth, bm.bmHeight,
-                                SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER );
+            SetWindowPos( hwnd, 0, 0, 0, bm.bmWidth, bm.bmHeight,
+                          SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER );
         }
     }
     return hOldBitmap;
@@ -384,7 +384,7 @@ static VOID STATIC_TryPaintFcn(HWND hwnd, LONG full_style)
        HDC hdc;
         HRGN hOrigClipping;
          
-       hdc = NtUserGetDC( hwnd );
+       hdc = GetDC( hwnd );
         setup_clipping(hwnd, hdc, &hOrigClipping);
        (staticPaintFunc[style])( hwnd, hdc, full_style );
        restore_clipping(hdc, hOrigClipping);
@@ -483,7 +483,7 @@ static LRESULT StaticWndProc_common( HWND hwnd, UINT uMsg, WPARAM wParam,
     case WM_PAINT:
         {
             PAINTSTRUCT ps;
-            HDC hdc = wParam ? (HDC)wParam : NtUserBeginPaint(hwnd, &ps);
+            HDC hdc = wParam ? (HDC)wParam : BeginPaint(hwnd, &ps);
             if (staticPaintFunc[style])
             {
                 HRGN hOrigClipping;
@@ -491,7 +491,7 @@ static LRESULT StaticWndProc_common( HWND hwnd, UINT uMsg, WPARAM wParam,
                 (staticPaintFunc[style])( hwnd, hdc, full_style );
                 restore_clipping(hdc, hOrigClipping);
             }
-            if (!wParam) NtUserEndPaint(hwnd, &ps);
+            if (!wParam) EndPaint(hwnd, &ps);
         }
         break;
 
@@ -581,7 +581,7 @@ static LRESULT StaticWndProc_common( HWND hwnd, UINT uMsg, WPARAM wParam,
         {
             SetWindowLongPtrW( hwnd, HFONT_GWL_OFFSET, wParam );
         if (LOWORD(lParam))
-            NtUserRedrawWindow( hwnd, NULL, 0, RDW_INVALIDATE | RDW_ERASE | RDW_UPDATENOW | RDW_ALLCHILDREN );
+            RedrawWindow( hwnd, NULL, 0, RDW_INVALIDATE | RDW_ERASE | RDW_UPDATENOW | RDW_ALLCHILDREN );
         }
         break;
 
@@ -654,7 +654,7 @@ static LRESULT StaticWndProc_common( HWND hwnd, UINT uMsg, WPARAM wParam,
 
         if (STATIC_update_uistate(hwnd, unicode) && hasTextStyle( full_style ))
         {
-            NtUserRedrawWindow( hwnd, NULL, 0, RDW_INVALIDATE | RDW_ERASE | RDW_UPDATENOW | RDW_ALLCHILDREN );
+            RedrawWindow( hwnd, NULL, 0, RDW_INVALIDATE | RDW_ERASE | RDW_UPDATENOW | RDW_ALLCHILDREN );
         }
         break;
 
index ac75990..0d42af6 100644 (file)
@@ -437,3 +437,64 @@ SetActiveWindow(HWND hWnd)
 {
     return NtUserSetActiveWindow(hWnd);
 }
+
+EXTINLINE DWORD WINAPI
+GetListBoxInfo(HWND hwnd)
+{
+    return NtUserGetListBoxInfo(hwnd); // Do it right! Have the message org from kmode!
+}
+
+EXTINLINE BOOL WINAPI
+DeleteMenu(HMENU hMenu, UINT uPosition, UINT uFlags)
+{
+    return NtUserDeleteMenu(hMenu, uPosition, uFlags);
+}
+
+EXTINLINE BOOL WINAPI
+DestroyMenu(HMENU hMenu)
+{
+    return NtUserDestroyMenu(hMenu);
+}
+
+EXTINLINE BOOL WINAPI
+GetMenuBarInfo(HWND hwnd, LONG idObject, LONG idItem, PMENUBARINFO pmbi)
+{
+    return NtUserGetMenuBarInfo(hwnd, idObject, idItem, pmbi);
+}
+
+EXTINLINE BOOL WINAPI
+GetMenuItemRect(HWND hWnd, HMENU hMenu, UINT uItem, LPRECT lprcItem)
+{
+    return NtUserGetMenuItemRect(hWnd, hMenu, uItem, lprcItem);
+}
+
+EXTINLINE BOOL WINAPI
+HiliteMenuItem(HWND hwnd, HMENU hmenu, UINT uItemHilite, UINT uHilite)
+{
+    return NtUserHiliteMenuItem(hwnd, hmenu, uItemHilite, uHilite);
+}
+
+EXTINLINE BOOL WINAPI
+RemoveMenu(HMENU hMenu, UINT uPosition, UINT uFlags)
+{
+    return NtUserRemoveMenu(hMenu, uPosition, uFlags);
+}
+
+EXTINLINE BOOL WINAPI
+SetMenuDefaultItem(HMENU hMenu, UINT uItem, UINT fByPos)
+{
+  return NtUserSetMenuDefaultItem(hMenu, uItem, fByPos);
+}
+
+EXTINLINE BOOL WINAPI
+SetMenuContextHelpId(HMENU hmenu, DWORD dwContextHelpId)
+{
+    return NtUserSetMenuContextHelpId(hmenu, dwContextHelpId);
+}
+
+EXTINLINE HWND WINAPI
+SetCapture(HWND hWnd)
+{
+    return(NtUserSetCapture(hWnd));
+}
+
index 7b93c2f..1d53d24 100644 (file)
@@ -25,6 +25,7 @@
 #include "window.h"
 #include "winpos.h"
 #include "winsta.h"
+#include "ntwrapper.h"
 
 /* One/Two Param Functions */
 #define NtUserMsqSetWakeMask(dwWaitMask) \
index e6851ee..37d3e99 100644 (file)
@@ -651,7 +651,7 @@ BOOL WINAPI DdeUninitialize(DWORD idInst)
      */
     WDML_FreeAllHSZ(pInstance);
 
-    NtUserDestroyWindow(pInstance->hwndEvent);
+    DestroyWindow(pInstance->hwndEvent);
 
     /* OK now delete the instance handle itself */
 
@@ -1652,7 +1652,7 @@ void WDML_RemoveServer(WDML_INSTANCE* pInstance, HSZ hszService, HSZ hszTopic)
                pPrev->next = pServer->next;
            }
 
-           NtUserDestroyWindow(pServer->hwndServer);
+           DestroyWindow(pServer->hwndServer);
            WDML_DecHSZ(pInstance, pServer->hszServiceSpec);
            WDML_DecHSZ(pInstance, pServer->hszService);
 
@@ -1793,7 +1793,7 @@ void WDML_RemoveConv(WDML_CONV* pRef, WDML_SIDE side)
     hWnd = (side == WDML_CLIENT_SIDE) ? pRef->hwndClient : pRef->hwndServer;
     SetWindowLongPtrW(hWnd, GWL_WDML_CONVERSATION, 0);
 
-    NtUserDestroyWindow((side == WDML_CLIENT_SIDE) ? pRef->hwndClient : pRef->hwndServer);
+    DestroyWindow((side == WDML_CLIENT_SIDE) ? pRef->hwndClient : pRef->hwndServer);
 
     WDML_DecHSZ(pRef->instance, pRef->hszService);
     WDML_DecHSZ(pRef->instance, pRef->hszTopic);
index a8d18dc..31db147 100644 (file)
@@ -370,7 +370,7 @@ static WDML_CONV* WDML_CreateServerConv(WDML_INSTANCE* pInstance, HWND hwndClien
     }
     else
     {
-       NtUserDestroyWindow(hwndServerConv);
+       DestroyWindow(hwndServerConv);
     }
     return pConv;
 }
index d479f50..c3eb826 100644 (file)
@@ -327,7 +327,7 @@ SystemParametersInfoA(UINT uiAction,
           }
         }
 
-        NtUserRedrawWindow(GetShellWindow(), NULL, NULL, RDW_INVALIDATE | RDW_ERASE);
+        RedrawWindow(GetShellWindow(), NULL, NULL, RDW_INVALIDATE | RDW_ERASE);
 
         return Ret;
       }
@@ -434,7 +434,7 @@ SystemParametersInfoW(UINT uiAction,
         }
       }
 
-      NtUserRedrawWindow(GetShellWindow(), NULL, NULL, RDW_INVALIDATE | RDW_ERASE);
+      RedrawWindow(GetShellWindow(), NULL, NULL, RDW_INVALIDATE | RDW_ERASE);
 
       return Ret;
     }
@@ -618,7 +618,7 @@ OpenDesktopW(
 BOOL WINAPI
 SetShellWindow(HWND hwndShell)
 {
-       return NtUserSetShellWindowEx(hwndShell, hwndShell);
+       return SetShellWindowEx(hwndShell, hwndShell);
 }
 
 
index 4b5c04e..b849380 100644 (file)
@@ -249,7 +249,7 @@ EndTask(
     if (IsWindow(hWnd))
     {
         if (fForce)
-            return NtUserDestroyWindow(hWnd);
+            return DestroyWindow(hWnd);
         else
             return FALSE;
     }
index 0b3bc5d..5c97e0a 100644 (file)
@@ -54,7 +54,7 @@ GetUserObjectInformationA(
          pvInfo, nLength, lpnLengthNeeded);
 
   if (nIndex != UOI_NAME && nIndex != UOI_TYPE)
-    return NtUserGetObjectInformation(hObj, nIndex, pvInfo, nLength, lpnLengthNeeded);
+    return GetUserObjectInformationW(hObj, nIndex, pvInfo, nLength, lpnLengthNeeded);
 
   /* allocate unicode buffer */
   buffer = HeapAlloc(GetProcessHeap(), 0, nLength*2);
@@ -65,7 +65,7 @@ GetUserObjectInformationA(
   }
 
   /* get unicode string */
-  if (!NtUserGetObjectInformation(hObj, nIndex, buffer, nLength*2, lpnLengthNeeded))
+  if (!GetUserObjectInformationW(hObj, nIndex, buffer, nLength*2, lpnLengthNeeded))
     ret = FALSE;
   *lpnLengthNeeded /= 2;
 
index d627f26..0f68200 100644 (file)
@@ -113,7 +113,7 @@ GetInternalWindowPos(
 {
     WINDOWPLACEMENT wndpl;
 
-    if (NtUserGetWindowPlacement(hwnd, &wndpl))
+    if (GetWindowPlacement(hwnd, &wndpl))
     {
                if (rectWnd) *rectWnd = wndpl.rcNormalPosition;
                if (ptIcon)  *ptIcon = wndpl.ptMinPosition;
index 031d588..9bb4f63 100644 (file)
@@ -280,7 +280,7 @@ int WINAPI CopyAcceleratorTableA
 {
    int i;
 
-   cAccelEntries = NtUserCopyAcceleratorTable(hAccelSrc, lpAccelDst, cAccelEntries);
+   cAccelEntries = CopyAcceleratorTableW(hAccelSrc, lpAccelDst, cAccelEntries);
 
    if (lpAccelDst == NULL) return cAccelEntries;
 
@@ -326,7 +326,7 @@ HACCEL WINAPI CreateAcceleratorTableA(LPACCEL lpaccl, int cEntries)
    if(!NT_SUCCESS(nErrCode)) lpaccl[i].key = -1;
   }
 
- return NtUserCreateAcceleratorTable(lpaccl, cEntries);
+ return CreateAcceleratorTableW(lpaccl, cEntries);
 }
 
 
index 30540eb..6ac37cb 100644 (file)
@@ -699,7 +699,7 @@ CopyBmp(HANDLE hnd,
         }
         else
         {
-            HDC screenDC = NtUserGetDC(NULL);
+            HDC screenDC = GetDC(NULL);
             res = CreateCompatibleBitmap(screenDC, desiredx, desiredy);
             ReleaseDC(NULL, screenDC);
         }
@@ -717,7 +717,7 @@ CopyBmp(HANDLE hnd,
         }
         else
         {
-            HDC screenDC = NtUserGetDC(NULL);
+            HDC screenDC = GetDC(NULL);
             int screen_depth = GetDeviceCaps(screenDC, BITSPIXEL);
             ReleaseDC(NULL, screenDC);
 
index b82439b..98f4ff6 100644 (file)
@@ -39,7 +39,7 @@ DrawCaret(HWND hWnd,
 {
     HDC hDC, hComp;
 
-    hDC = NtUserGetDC(hWnd);
+    hDC = GetDC(hWnd);
     if(hDC)
     {
         if(CaretInfo->Bitmap && GetBitmapDimensionEx(CaretInfo->Bitmap, &CaretInfo->Size))
index c392b2e..6e804e3 100644 (file)
@@ -53,13 +53,13 @@ User32SetupDefaultCursors(PVOID Arguments,
     if(*DefaultCursor)
     {
         /* set default cursor */
-        NtUserSetCursor(LoadCursorW(0, (LPCWSTR)IDC_ARROW));
+        SetCursor(LoadCursorW(0, (LPCWSTR)IDC_ARROW));
     }
     else
     {
         /* FIXME load system cursor scheme */
-        NtUserSetCursor(0);
-        NtUserSetCursor(LoadCursorW(0, (LPCWSTR)IDC_ARROW));
+        SetCursor(0);
+        SetCursor(LoadCursorW(0, (LPCWSTR)IDC_ARROW));
     }
 
     return(ZwCallbackReturn(&Result, sizeof(LRESULT), STATUS_SUCCESS));
index 14508e2..a868067 100644 (file)
@@ -191,7 +191,7 @@ DefWndSetRedraw(HWND hWnd, WPARAM wParam)
     {
        if (Style & WS_VISIBLE) /* Visible */
        {
-            NtUserRedrawWindow( hWnd, NULL, 0, RDW_ALLCHILDREN | RDW_VALIDATE );
+            RedrawWindow( hWnd, NULL, 0, RDW_ALLCHILDREN | RDW_VALIDATE );
             Style &= ~WS_VISIBLE;
             SetWindowLong(hWnd, GWL_STYLE, Style); /* clear bits */
        }
@@ -227,7 +227,7 @@ DefWndHandleSetCursor(HWND hWnd, WPARAM wParam, LPARAM lParam, ULONG Style)
        HICON hCursor = (HICON)GetClassLongW(hWnd, GCL_HCURSOR);
        if (hCursor)
          {
-           NtUserSetCursor(hCursor);
+           SetCursor(hCursor);
            return(TRUE);
          }
        return(FALSE);
@@ -240,7 +240,7 @@ DefWndHandleSetCursor(HWND hWnd, WPARAM wParam, LPARAM lParam, ULONG Style)
         {
           break;
         }
-       return((LRESULT)NtUserSetCursor(LoadCursorW(0, IDC_SIZEWE)));
+       return((LRESULT)SetCursor(LoadCursorW(0, IDC_SIZEWE)));
       }
 
     case HTTOP:
@@ -250,7 +250,7 @@ DefWndHandleSetCursor(HWND hWnd, WPARAM wParam, LPARAM lParam, ULONG Style)
         {
           break;
         }
-       return((LRESULT)NtUserSetCursor(LoadCursorW(0, IDC_SIZENS)));
+       return((LRESULT)SetCursor(LoadCursorW(0, IDC_SIZENS)));
       }
 
     case HTTOPLEFT:
@@ -260,7 +260,7 @@ DefWndHandleSetCursor(HWND hWnd, WPARAM wParam, LPARAM lParam, ULONG Style)
         {
           break;
         }
-       return((LRESULT)NtUserSetCursor(LoadCursorW(0, IDC_SIZENWSE)));
+       return((LRESULT)SetCursor(LoadCursorW(0, IDC_SIZENWSE)));
       }
 
     case HTBOTTOMLEFT:
@@ -270,10 +270,10 @@ DefWndHandleSetCursor(HWND hWnd, WPARAM wParam, LPARAM lParam, ULONG Style)
         {
           break;
         }
-       return((LRESULT)NtUserSetCursor(LoadCursorW(0, IDC_SIZENESW)));
+       return((LRESULT)SetCursor(LoadCursorW(0, IDC_SIZENESW)));
       }
     }
-  return((LRESULT)NtUserSetCursor(LoadCursorW(0, IDC_ARROW)));
+  return((LRESULT)SetCursor(LoadCursorW(0, IDC_ARROW)));
 }
 
 static LONG
@@ -469,7 +469,7 @@ DefWndDoSizeMove(HWND hwnd, WORD wParam)
        }
       else
        {
-         NtUserSetCapture(hwnd);
+         SetCapture(hwnd);
          hittest = DefWndStartSizeMove(hwnd, Wnd, wParam, &capturePoint);
          if (!hittest)
            {
@@ -506,7 +506,7 @@ DefWndDoSizeMove(HWND hwnd, WORD wParam)
       }
       unmodRect = sizingRect;
     }
-  NtUserClipCursor(&clipRect);
+  ClipCursor(&clipRect);
 
   origRect = sizingRect;
   if (ON_LEFT_BORDER(hittest))
@@ -536,17 +536,17 @@ DefWndDoSizeMove(HWND hwnd, WORD wParam)
 
   SendMessageA( hwnd, WM_ENTERSIZEMOVE, 0, 0 );
   (void)NtUserSetGUIThreadHandle(MSQ_STATE_MOVESIZE, hwnd);
-  if (GetCapture() != hwnd) NtUserSetCapture( hwnd );
+  if (GetCapture() != hwnd) SetCapture( hwnd );
 
   if (Style & WS_CHILD)
     {
       /* Retrieve a default cache DC (without using the window style) */
-      hdc = NtUserGetDCEx(hWndParent, 0, DCX_CACHE);
+      hdc = GetDCEx(hWndParent, 0, DCX_CACHE);
       DesktopRgn = NULL;
     }
   else
     {
-      hdc = NtUserGetDC( 0 );
+      hdc = GetDC( 0 );
       DesktopRgn = CreateRectRgnIndirect(&clipRect);
     }
 
@@ -615,7 +615,7 @@ DefWndDoSizeMove(HWND hwnd, WORD wParam)
 
                if( iconic ) /* ok, no system popup tracking */
                  {
-                   hOldCursor = NtUserSetCursor(hDragCursor);
+                   hOldCursor = SetCursor(hDragCursor);
                    ShowCursor( TRUE );
                  }
            }
@@ -647,7 +647,7 @@ DefWndDoSizeMove(HWND hwnd, WORD wParam)
                  else {
                    /* To avoid any deadlocks, all the locks on the windows
                       structures must be suspended before the SetWindowPos */
-                   NtUserSetWindowPos( hwnd, 0, newRect.left, newRect.top,
+                   SetWindowPos( hwnd, 0, newRect.left, newRect.top,
                                  newRect.right - newRect.left,
                                  newRect.bottom - newRect.top,
                                  ( hittest == HTCAPTION ) ? SWP_NOSIZE : 0 );
@@ -659,13 +659,13 @@ DefWndDoSizeMove(HWND hwnd, WORD wParam)
     }
 
   ReleaseCapture();
-  NtUserClipCursor(NULL);
+  ClipCursor(NULL);
   if( iconic )
     {
       if( moved ) /* restore cursors, show icon title later on */
        {
          ShowCursor( FALSE );
-         NtUserSetCursor( hOldCursor );
+         SetCursor( hOldCursor );
        }
       DestroyCursor( hDragCursor );
     }
@@ -703,14 +703,14 @@ DefWndDoSizeMove(HWND hwnd, WORD wParam)
         {
          /* NOTE: SWP_NOACTIVATE prevents document window activation in Word 6 */
          if(!DragFullWindows)
-           NtUserSetWindowPos( hwnd, 0, sizingRect.left, sizingRect.top,
+           SetWindowPos( hwnd, 0, sizingRect.left, sizingRect.top,
                          sizingRect.right - sizingRect.left,
                          sizingRect.bottom - sizingRect.top,
                          ( hittest == HTCAPTION ) ? SWP_NOSIZE : 0 );
         }
       else { /* restore previous size/position */
        if(DragFullWindows)
-         NtUserSetWindowPos( hwnd, 0, origRect.left, origRect.top,
+         SetWindowPos( hwnd, 0, origRect.left, origRect.top,
                        origRect.right - origRect.left,
                        origRect.bottom - origRect.top,
                        ( hittest == HTCAPTION ) ? SWP_NOSIZE : 0 );
@@ -783,26 +783,26 @@ DefWndHandleSysCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
        break;
       case SC_MINIMIZE:
         wp.length = sizeof(WINDOWPLACEMENT);
-        if(NtUserGetWindowPlacement(hWnd, &wp))
+        if(GetWindowPlacement(hWnd, &wp))
         {
           wp.showCmd = SW_MINIMIZE;
-          NtUserSetWindowPlacement(hWnd, &wp);
+          SetWindowPlacement(hWnd, &wp);
         }
         break;
       case SC_MAXIMIZE:
         wp.length = sizeof(WINDOWPLACEMENT);
-        if(NtUserGetWindowPlacement(hWnd, &wp))
+        if(GetWindowPlacement(hWnd, &wp))
         {
           wp.showCmd = SW_MAXIMIZE;
-          NtUserSetWindowPlacement(hWnd, &wp);
+          SetWindowPlacement(hWnd, &wp);
         }
         break;
       case SC_RESTORE:
         wp.length = sizeof(WINDOWPLACEMENT);
-        if(NtUserGetWindowPlacement(hWnd, &wp))
+        if(GetWindowPlacement(hWnd, &wp))
         {
           wp.showCmd = SW_RESTORE;
-          NtUserSetWindowPlacement(hWnd, &wp);
+          SetWindowPlacement(hWnd, &wp);
         }
         break;
       case SC_CLOSE:
@@ -1003,9 +1003,9 @@ DefWndScreenshot(HWND hWnd)
     HDC hdc2;
 
     OpenClipboard(hWnd);
-    NtUserEmptyClipboard();
+    EmptyClipboard();
 
-    hdc = NtUserGetWindowDC(hWnd);
+    hdc = GetWindowDC(hWnd);
     GetWindowRect(hWnd, &rect);
     w = rect.right - rect.left;
     h = rect.bottom - rect.top;
@@ -1023,7 +1023,7 @@ DefWndScreenshot(HWND hWnd)
     ReleaseDC(hWnd, hdc);
     ReleaseDC(hWnd, hdc2);
 
-    NtUserCloseClipboard();
+    CloseClipboard();
 
 }
 
@@ -1107,7 +1107,7 @@ User32DefWindowProc(HWND hWnd,
             /* in Windows, capture is taken when right-clicking on the caption bar */
             if (wParam == HTCAPTION)
             {
-                NtUserSetCapture(hWnd);
+                SetCapture(hWnd);
             }
             break;
         }
@@ -1206,7 +1206,7 @@ User32DefWindowProc(HWND hWnd,
         case WM_PAINT:
         {
             PAINTSTRUCT Ps;
-            HDC hDC = NtUserBeginPaint(hWnd, &Ps);
+            HDC hDC = BeginPaint(hWnd, &Ps);
             if (hDC)
             {
                 HICON hIcon;
@@ -1223,7 +1223,7 @@ User32DefWindowProc(HWND hWnd,
                          GetSystemMetrics(SM_CYICON)) / 2;
                     DrawIcon(hDC, x, y, hIcon);
                 }
-                NtUserEndPaint(hWnd, &Ps);
+                EndPaint(hWnd, &Ps);
             }
             return (0);
         }
@@ -1234,7 +1234,7 @@ User32DefWindowProc(HWND hWnd,
             hRgn = CreateRectRgn(0, 0, 0, 0);
             if (GetUpdateRgn(hWnd, hRgn, FALSE) != NULLREGION)
             {
-                NtUserRedrawWindow(hWnd, NULL, hRgn,
+                RedrawWindow(hWnd, NULL, hRgn,
                                RDW_ERASENOW | RDW_ERASE | RDW_FRAME |
                     RDW_ALLCHILDREN);
             }
@@ -1250,7 +1250,7 @@ User32DefWindowProc(HWND hWnd,
 
         case WM_CLOSE:
         {
-            NtUserDestroyWindow(hWnd);
+            DestroyWindow(hWnd);
             return (0);
         }
 
@@ -1283,7 +1283,7 @@ User32DefWindowProc(HWND hWnd,
             if (LOWORD(wParam) != WA_INACTIVE &&
                 !(GetWindowLongW(hWnd, GWL_STYLE) & WS_MINIMIZE))
             {
-                NtUserSetFocus(hWnd);
+                SetFocus(hWnd);
             }
             break;
         }
@@ -1520,7 +1520,7 @@ User32DefWindowProc(HWND hWnd,
            INT Index = (wParam != 0) ? GCL_HICON : GCL_HICONSM;
            HICON hOldIcon = (HICON)GetClassLongW(hWnd, Index);
            SetClassLongW(hWnd, Index, lParam);
-           NtUserSetWindowPos(hWnd, 0, 0, 0, 0, 0,
+           SetWindowPos(hWnd, 0, 0, 0, 0, 0,
                       SWP_FRAMECHANGED | SWP_NOSIZE | SWP_NOMOVE |
                       SWP_NOACTIVATE | SWP_NOZORDER);
            return ((LRESULT)hOldIcon);
index 00d9d9c..2932d4f 100644 (file)
@@ -536,7 +536,7 @@ INT DIALOG_DoDialogBox( HWND hwnd, HWND owner )
                 if (bFirstEmpty)
                 {
                     /* ShowWindow the first time the queue goes empty */
-                    NtUserShowWindow( hwnd, SW_SHOWNORMAL );
+                    ShowWindow( hwnd, SW_SHOWNORMAL );
                     bFirstEmpty = FALSE;
                 }
                 if (!(GetWindowLongW( hwnd, GWL_STYLE ) & DS_NOIDLEMSG))
@@ -558,7 +558,7 @@ INT DIALOG_DoDialogBox( HWND hwnd, HWND owner )
     }
     if (dlgInfo->flags & DF_OWNERENABLED) DIALOG_EnableOwner( owner );
     retval = dlgInfo->idResult;
-    NtUserDestroyWindow( hwnd );
+    DestroyWindow( hwnd );
     return retval;
 }
 
@@ -703,7 +703,7 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate,
            * for both +ve and -ve template.pointSize */
         HDC dc;
         int pixels;
-        dc = NtUserGetDC(0);
+        dc = GetDC(0);
         pixels = MulDiv(template.pointSize, GetDeviceCaps(dc , LOGPIXELSY), 72);
         hUserFont = CreateFontW( -pixels, 0, 0, 0, template.weight,
                                           template.italic, FALSE, FALSE, DEFAULT_CHARSET, 0, 0,
@@ -824,7 +824,7 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate,
     if (!hwnd)
     {
         if (hUserFont) DeleteObject( hUserFont );
-        if (hMenu) NtUserDestroyMenu( hMenu );
+        if (hMenu) DestroyMenu( hMenu );
         if (modal && (flags & DF_OWNERENABLED)) DIALOG_EnableOwner(owner);
         return 0;
     }
@@ -837,7 +837,7 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate,
     if (dlgInfo == NULL)
     {
         if (hUserFont) DeleteObject( hUserFont );
-        if (hMenu) NtUserDestroyMenu( hMenu );
+        if (hMenu) DestroyMenu( hMenu );
         if (modal && (flags & DF_OWNERENABLED)) DIALOG_EnableOwner(owner);
         return 0;
     }
@@ -872,7 +872,7 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate,
                 /* By returning TRUE, app has requested a default focus assignment */
                 dlgInfo->hwndFocus = GetNextDlgTabItem( hwnd, 0, FALSE);
                 if( dlgInfo->hwndFocus )
-                    NtUserSetFocus( dlgInfo->hwndFocus );
+                    SetFocus( dlgInfo->hwndFocus );
             }
         }
         if (!(GetWindowLongW( hwnd, GWL_STYLE ) & WS_CHILD))
@@ -880,12 +880,12 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate,
 
         if (template.style & WS_VISIBLE && !(GetWindowLongW( hwnd, GWL_STYLE ) & WS_VISIBLE))
         {
-           NtUserShowWindow( hwnd, SW_SHOWNORMAL );   /* SW_SHOW doesn't always work */
+           ShowWindow( hwnd, SW_SHOWNORMAL );   /* SW_SHOW doesn't always work */
         }
         return hwnd;
     }
     if (modal && ownerEnabled) DIALOG_EnableOwner(owner);
-    if( IsWindow(hwnd) ) NtUserDestroyWindow( hwnd );
+    if( IsWindow(hwnd) ) DestroyWindow( hwnd );
     return 0;
 }
 
@@ -906,7 +906,7 @@ static void DEFDLG_SetFocus( HWND hwndDlg, HWND hwndCtrl )
     }
     if (SendMessageW( hwndCtrl, WM_GETDLGCODE, 0, 0 ) & DLGC_HASSETSEL)
         SendMessageW( hwndCtrl, EM_SETSEL, 0, -1 );
-    NtUserSetFocus( hwndCtrl );
+    SetFocus( hwndCtrl );
 }
 
 /***********************************************************************
@@ -940,7 +940,7 @@ static void DEFDLG_RestoreFocus( HWND hwnd )
         infoPtr->hwndFocus = GetNextDlgTabItem( hwnd, 0, FALSE );
        if (!IsWindow( infoPtr->hwndFocus )) return;
     }
-    NtUserSetFocus( infoPtr->hwndFocus );
+    SetFocus( infoPtr->hwndFocus );
 
     /* This used to set infoPtr->hwndFocus to NULL for no apparent reason,
        sometimes losing focus when receiving WM_SETFOCUS messages. */
@@ -1078,7 +1078,7 @@ static LRESULT DEFDLG_Proc( HWND hwnd, UINT msg, WPARAM wParam,
                     GlobalFree16(dlgInfo->hDialogHeap);
                 }*/
                 if (dlgInfo->hUserFont) DeleteObject( dlgInfo->hUserFont );
-                if (dlgInfo->hMenu) NtUserDestroyMenu( dlgInfo->hMenu );
+                if (dlgInfo->hMenu) DestroyMenu( dlgInfo->hMenu );
                 HeapFree( GetProcessHeap(), 0, dlgInfo );
             }
              /* Window clean-up */
@@ -1912,13 +1912,13 @@ EndDialog(
     /* Windows sets the focus to the dialog itself in EndDialog */
 
     if (IsChild(hDlg, GetFocus()))
-       NtUserSetFocus( hDlg );
+       SetFocus( hDlg );
 
     /* Don't have to send a ShowWindow(SW_HIDE), just do
        SetWindowPos with SWP_HIDEWINDOW as done in Windows */
 
-    NtUserSetWindowPos(hDlg, NULL, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE
-                       | SWP_NOZORDER | SWP_NOACTIVATE | SWP_HIDEWINDOW);
+    SetWindowPos(hDlg, NULL, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE
+                 | SWP_NOZORDER | SWP_NOACTIVATE | SWP_HIDEWINDOW);
 
     if (hDlg == GetActiveWindow()) WinPosActivateOtherWindow( hDlg );
 
@@ -1942,7 +1942,7 @@ GetDialogBaseUnits(VOID)
         HDC hdc;
         SIZE size;
 
-        if ((hdc = NtUserGetDC(0)))
+        if ((hdc = GetDC(0)))
         {
             size.cx = GdiGetCharDimensions( hdc, NULL, &size.cy );
             if (size.cx) units = MAKELONG( size.cx, size.cy );
@@ -2338,7 +2338,7 @@ IsDialogMessageW(
                                 SendMessageW (hwndNext, EM_SETSEL, 0, length);
                             }
                         }
-                        NtUserSetFocus (hwndNext);
+                        SetFocus (hwndNext);
                         DIALOG_FixChildrenOnChangeFocus (hDlg, hwndNext);
                     }
                     else
index 1b3b202..49c8a60 100644 (file)
@@ -63,7 +63,7 @@ DragDetect(
   rect.top = pt.y - dy;
   rect.bottom = pt.y + dy;
 
-  NtUserSetCapture(hWnd);
+  SetCapture(hWnd);
 
   for (;;)
   {
@@ -96,7 +96,7 @@ DragDetect(
          }
       }
     }
-    NtUserWaitMessage();
+    WaitMessage();
   }
   return 0;
 #endif
@@ -125,7 +125,7 @@ EnableWindow(HWND hWnd,
             /* Remove keyboard focus from that window if it had focus */
             if (hWnd == GetFocus())
             {
-               NtUserSetFocus(NULL);
+               SetFocus(NULL);
             }
         }
         NtUserSetWindowLong(hWnd, GWL_STYLE, Style, FALSE);
@@ -680,7 +680,7 @@ static void CALLBACK TrackMouseEventProc(HWND hwndUnused, UINT uMsg, UINT_PTR id
     /* stop the timer if the tracking list is empty */
     if (!(ptracking_info->tme.dwFlags & (TME_HOVER | TME_LEAVE)))
     {
-        NtUserKillTimer(0, ptracking_info->timer);
+        KillTimer(0, ptracking_info->timer);
         RtlZeroMemory(ptracking_info,sizeof(USER32_TRACKINGLIST));
     }
 }
@@ -770,7 +770,7 @@ TrackMouseEvent(
             /* if we aren't tracking on hover or leave remove this entry */
             if (!(ptracking_info->tme.dwFlags & (TME_HOVER | TME_LEAVE)))
             {
-                NtUserKillTimer(0, ptracking_info->timer);
+                KillTimer(0, ptracking_info->timer);
                 RtlZeroMemory(ptracking_info,sizeof(USER32_TRACKINGLIST));
             }
         }
@@ -786,7 +786,7 @@ TrackMouseEvent(
 
             if (!ptracking_info->timer)
             {
-                ptracking_info->timer = NtUserSetTimer(0, 0, hover_time, TrackMouseEventProc);
+                ptracking_info->timer = SetTimer(0, 0, hover_time, TrackMouseEventProc);
             }
         }
     }
index 8ce24e9..41f6ae9 100644 (file)
@@ -447,7 +447,7 @@ static LRESULT MDI_RefreshMenu(MDICLIENTINFO *ci)
                     if (mii.wID == ci->idFirstChild)
                     {
                         TRACE("removing %u items including separator\n", count - i);
-                        while (NtUserRemoveMenu(ci->hWindowMenu, i, MF_BYPOSITION))
+                        while (RemoveMenu(ci->hWindowMenu, i, MF_BYPOSITION))
                             /* nothing */;
 
                         break;
@@ -545,16 +545,16 @@ static void MDI_SwitchActiveChild( MDICLIENTINFO *ci, HWND hwndTo, BOOL activate
         {
             /* restore old MDI child */
             SendMessageW( hwndPrev, WM_SETREDRAW, FALSE, 0 );
-            NtUserShowWindow( hwndPrev, SW_RESTORE );
+            ShowWindow( hwndPrev, SW_RESTORE );
             SendMessageW( hwndPrev, WM_SETREDRAW, TRUE, 0 );
 
             /* activate new MDI child */
-            NtUserSetWindowPos( hwndTo, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE );
+            SetWindowPos( hwndTo, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE );
             /* maximize new MDI child */
-            NtUserShowWindow( hwndTo, SW_MAXIMIZE );
+            ShowWindow( hwndTo, SW_MAXIMIZE );
         }
         /* activate new MDI child */
-        NtUserSetWindowPos( hwndTo, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | (activate ? 0 : SWP_NOACTIVATE) );
+        SetWindowPos( hwndTo, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | (activate ? 0 : SWP_NOACTIVATE) );
     }
 }
 
@@ -576,7 +576,7 @@ static LRESULT MDIDestroyChild( HWND client, MDICLIENTINFO *ci,
             MDI_SwitchActiveChild(ci, next, TRUE);
         else
         {
-            NtUserShowWindow(child, SW_HIDE);
+            ShowWindow(child, SW_HIDE);
             if (IsZoomed(child))
             {
                 MDI_RestoreFrameMenu(GetParent(client), child, ci->hBmpClose);
@@ -618,7 +618,7 @@ static LRESULT MDIDestroyChild( HWND client, MDICLIENTINFO *ci,
     if (flagDestroy)
     {
         MDI_PostUpdate(GetParent(child), ci, SB_BOTH+1);
-        NtUserDestroyWindow(child);
+        DestroyWindow(child);
     }
 
     TRACE("child destroyed - %p\n", child);
@@ -663,7 +663,7 @@ static LONG MDI_ChildActivate( HWND client, HWND child )
     if( isActiveFrameWnd )
     {
         SendMessageW( child, WM_NCACTIVATE, TRUE, 0L);
-        NtUserSetFocus( client );
+        SetFocus( client );
     }
 
     SendMessageW( child, WM_MDIACTIVATE, (WPARAM)prevActiveWnd, (LPARAM)child );
@@ -750,8 +750,8 @@ static LONG MDICascade( HWND client, MDICLIENTINFO *ci )
             TRACE("move %p to (%ld,%ld) size [%ld,%ld]\n",
                   win_array[i], pos[0].x, pos[0].y, pos[1].x, pos[1].y);
 
-            NtUserSetWindowPos( win_array[i], 0, pos[0].x, pos[0].y, pos[1].x, pos[1].y,
-                                SWP_DRAWFRAME | SWP_NOACTIVATE | SWP_NOZORDER);
+            SetWindowPos( win_array[i], 0, pos[0].x, pos[0].y, pos[1].x, pos[1].y,
+                          SWP_DRAWFRAME | SWP_NOACTIVATE | SWP_NOZORDER);
         }
     }
     HeapFree( GetProcessHeap(), 0, win_array );
@@ -831,8 +831,8 @@ static void MDITile( HWND client, MDICLIENTINFO *ci, WPARAM wParam )
             y = 0;
             for (r = 1; r <= rows && *pWnd; r++, i++)
             {
-                NtUserSetWindowPos(*pWnd, 0, x, y, xsize, ysize,
-                                   SWP_DRAWFRAME | SWP_NOACTIVATE | SWP_NOZORDER);
+                SetWindowPos(*pWnd, 0, x, y, xsize, ysize,
+                             SWP_DRAWFRAME | SWP_NOACTIVATE | SWP_NOZORDER);
                 y += ysize;
                 pWnd++;
             }
@@ -891,7 +891,7 @@ static BOOL MDI_AugmentFrameMenu( HWND frame, HWND hChild )
       HDC hMemDC;
       HBITMAP hBitmap, hOldBitmap;
       HBRUSH hBrush;
-      HDC hdc = NtUserGetDC(hChild);
+      HDC hdc = GetDC(hChild);
 
       if (hdc)
       {
@@ -916,14 +916,14 @@ static BOOL MDI_AugmentFrameMenu( HWND frame, HWND hChild )
                      (UINT_PTR)hSysPopup, (LPSTR)hSysMenuBitmap))
     {
         TRACE("not inserted\n");
-       NtUserDestroyMenu(hSysPopup);
+       DestroyMenu(hSysPopup);
        return 0;
     }
 
     EnableMenuItem(hSysPopup, SC_SIZE, MF_BYCOMMAND | MF_GRAYED);
     EnableMenuItem(hSysPopup, SC_MOVE, MF_BYCOMMAND | MF_GRAYED);
     EnableMenuItem(hSysPopup, SC_MAXIMIZE, MF_BYCOMMAND | MF_GRAYED);
-    NtUserSetMenuDefaultItem(hSysPopup, SC_CLOSE, FALSE);
+    SetMenuDefaultItem(hSysPopup, SC_CLOSE, FALSE);
 
     /* redraw menu */
     DrawMenuBar(frame);
@@ -962,7 +962,7 @@ static BOOL MDI_RestoreFrameMenu( HWND frame, HWND hChild, HBITMAP hBmpClose )
                     TRUE,
                     &menuInfo);
 
-    NtUserRemoveMenu(menu,0,MF_BYPOSITION);
+    RemoveMenu(menu,0,MF_BYPOSITION);
 
     if ( (menuInfo.fType & MFT_BITMAP) &&
         (menuInfo.dwTypeData != 0) &&
@@ -975,11 +975,11 @@ static BOOL MDI_RestoreFrameMenu( HWND frame, HWND hChild, HBITMAP hBmpClose )
          DeleteObject(menuInfo.hbmpItem);
 
     /* close */
-    NtUserDeleteMenu(menu, SC_CLOSE, MF_BYCOMMAND);
+    DeleteMenu(menu, SC_CLOSE, MF_BYCOMMAND);
     /* restore */
-    NtUserDeleteMenu(menu, SC_RESTORE, MF_BYCOMMAND);
+    DeleteMenu(menu, SC_RESTORE, MF_BYCOMMAND);
     /* minimize */
-    NtUserDeleteMenu(menu, SC_MINIMIZE, MF_BYCOMMAND);
+    DeleteMenu(menu, SC_MINIMIZE, MF_BYCOMMAND);
 
     DrawMenuBar(frame);
 
@@ -1205,7 +1205,7 @@ static LRESULT MDIClientWndProc_common( HWND hwnd, UINT message,
         return 0;
 
       case WM_MDIMAXIMIZE:
-       NtUserShowWindow( (HWND)wParam, SW_MAXIMIZE );
+       ShowWindow( (HWND)wParam, SW_MAXIMIZE );
         return 0;
 
       case WM_MDINEXT: /* lParam != 0 means previous window */
@@ -1231,7 +1231,7 @@ static LRESULT MDIClientWndProc_common( HWND hwnd, UINT message,
 
       case WM_MDITILE:
        ci->mdiFlags |= MDIF_NEEDUPDATE;
-        NtUserShowScrollBar( hwnd, SB_BOTH, FALSE );
+        ShowScrollBar( hwnd, SB_BOTH, FALSE );
         MDITile( hwnd, ci, wParam );
         ci->mdiFlags &= ~MDIF_NEEDUPDATE;
         return 0;
@@ -1245,7 +1245,7 @@ static LRESULT MDIClientWndProc_common( HWND hwnd, UINT message,
 
       case WM_SETFOCUS:
           if (ci->hwndActiveChild && !IsIconic( ci->hwndActiveChild ))
-              NtUserSetFocus( ci->hwndActiveChild );
+              SetFocus( ci->hwndActiveChild );
           return 0;
 
       case WM_NCACTIVATE:
@@ -1284,7 +1284,7 @@ static LRESULT MDIClientWndProc_common( HWND hwnd, UINT message,
            TRACE("notification from %p (%li,%li)\n",child,pt.x,pt.y);
 
             if( child && child != hwnd && child != ci->hwndActiveChild )
-                NtUserSetWindowPos(child, 0,0,0,0,0, SWP_NOSIZE | SWP_NOMOVE );
+                SetWindowPos(child, 0,0,0,0,0, SWP_NOSIZE | SWP_NOMOVE );
             break;
             }
         }
@@ -1303,7 +1303,7 @@ static LRESULT MDIClientWndProc_common( HWND hwnd, UINT message,
 
            AdjustWindowRectEx(&rect, GetWindowLongA(ci->hwndActiveChild, GWL_STYLE),
                                0, GetWindowLongA(ci->hwndActiveChild, GWL_EXSTYLE) );
-           NtUserMoveWindow(ci->hwndActiveChild, rect.left, rect.top,
+           MoveWindow(ci->hwndActiveChild, rect.left, rect.top,
                         rect.right - rect.left, rect.bottom - rect.top, 1);
        }
        else
@@ -1438,11 +1438,11 @@ LRESULT WINAPI DefFrameProcW( HWND hwnd, HWND hwndMDIClient,
            return 1; /* success. FIXME: check text length */
 
         case WM_SETFOCUS:
-           NtUserSetFocus(hwndMDIClient);
+           SetFocus(hwndMDIClient);
            break;
 
         case WM_SIZE:
-            NtUserMoveWindow(hwndMDIClient, 0, 0, LOWORD(lParam), HIWORD(lParam), TRUE);
+            MoveWindow(hwndMDIClient, 0, 0, LOWORD(lParam), HIWORD(lParam), TRUE);
             break;
 
         case WM_NEXTMENU:
@@ -1771,7 +1771,7 @@ void WINAPI CalcChildScroll( HWND hwnd, INT scroll )
             if (style & WS_MAXIMIZE)
             {
                 HeapFree( GetProcessHeap(), 0, list );
-                NtUserShowScrollBar( hwnd, SB_BOTH, FALSE );
+                ShowScrollBar( hwnd, SB_BOTH, FALSE );
                 return;
             }
             if (style & WS_VISIBLE)
index bf29b15..02d2509 100644 (file)
@@ -957,9 +957,9 @@ PopupMenuWndProcW(HWND Wnd, UINT Message, WPARAM wParam, LPARAM lParam)
     case WM_PAINT:
       {
         PAINTSTRUCT ps;
-        NtUserBeginPaint(Wnd, &ps);
+        BeginPaint(Wnd, &ps);
         MenuDrawPopupMenu(Wnd, ps.hdc, (HMENU)GetWindowLongPtrW(Wnd, 0));
-        NtUserEndPaint(Wnd, &ps);
+        EndPaint(Wnd, &ps);
         return 0;
       }
 
@@ -1044,7 +1044,7 @@ static LPCSTR MENUEX_ParseResource( LPCSTR res, HMENU hMenu)
              return NULL;
          if (!(res = MENUEX_ParseResource(res, mii.hSubMenu)))
          {
-             NtUserDestroyMenu(mii.hSubMenu);
+             DestroyMenu(mii.hSubMenu);
              return NULL;
          }
          mii.fMask |= MIIM_SUBMENU;
@@ -1388,7 +1388,7 @@ MenuPopupMenuCalcSize(PROSMENUINFO MenuInfo, HWND WndOwner)
       return;
     }
 
-  Dc = NtUserGetDC(NULL);
+  Dc = GetDC(NULL);
   SelectObject(Dc, hMenuFont);
 
   Start = 0;
@@ -1766,8 +1766,8 @@ MenuInitTracking(HWND Wnd, HMENU Menu, BOOL Popup, UINT Flags)
         {
           /* app changed/recreated menu bar entries in WM_INITMENU
              Recalculate menu sizes else clicks will not work */
-          NtUserSetWindowPos(Wnd, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE |
-                             SWP_NOACTIVATE | SWP_NOZORDER | SWP_FRAMECHANGED );
+          SetWindowPos(Wnd, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE |
+                       SWP_NOACTIVATE | SWP_NOZORDER | SWP_FRAMECHANGED );
 
         }
     /* This makes the menus of applications built with Delphi work.
@@ -1878,8 +1878,8 @@ MenuShowPopup(HWND WndOwner, HMENU Menu, UINT Id,
     }
 
   /* Display the window */
-  NtUserSetWindowPos(MenuInfo.Wnd, HWND_TOPMOST, 0, 0, 0, 0,
-                     SWP_SHOWWINDOW | SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);
+  SetWindowPos(MenuInfo.Wnd, HWND_TOPMOST, 0, 0, 0, 0,
+               SWP_SHOWWINDOW | SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE);
   UpdateWindow(MenuInfo.Wnd);
 
   return TRUE;
@@ -1963,11 +1963,11 @@ MenuSelectItem(HWND WndOwner, PROSMENUINFO MenuInfo, UINT Index,
 
   if (0 != (MenuInfo->Flags & MF_POPUP))
     {
-      Dc = NtUserGetDC(MenuInfo->Wnd);
+      Dc = GetDC(MenuInfo->Wnd);
     }
   else
     {
-      Dc = NtUserGetDCEx(MenuInfo->Wnd, 0, DCX_CACHE | DCX_WINDOW);
+      Dc = GetDCEx(MenuInfo->Wnd, 0, DCX_CACHE | DCX_WINDOW);
     }
 
   if (NULL == TopPopup)
@@ -2160,7 +2160,7 @@ MenuInitSysMenuPopup(HMENU Menu, DWORD Style, DWORD ClsStyle, LONG HitTest )
     DefItem = SC_CLOSE;
   }
   #endif
-  NtUserSetMenuDefaultItem(Menu, DefItem, MF_BYCOMMAND);
+  SetMenuDefaultItem(Menu, DefItem, MF_BYCOMMAND);
 }
 
 /***********************************************************************
@@ -2220,11 +2220,11 @@ MenuShowSubPopup(HWND WndOwner, PROSMENUINFO MenuInfo, BOOL SelectFirst, UINT Fl
     {
       if (0 != (MenuInfo->Flags & MF_POPUP))
         {
-          Dc = NtUserGetDC(MenuInfo->Wnd);
+          Dc = GetDC(MenuInfo->Wnd);
         }
       else
         {
-          Dc = NtUserGetDCEx(MenuInfo->Wnd, 0, DCX_CACHE | DCX_WINDOW);
+          Dc = GetDCEx(MenuInfo->Wnd, 0, DCX_CACHE | DCX_WINDOW);
         }
 
       SelectObject(Dc, hMenuFont);
@@ -2320,7 +2320,7 @@ MenuHideSubPopups(HWND WndOwner, PROSMENUINFO MenuInfo, BOOL SendMenuSelect)
         {
           MenuHideSubPopups(WndOwner, &SubMenuInfo, FALSE);
           MenuSelectItem(WndOwner, &SubMenuInfo, NO_SELECTED_ITEM, SendMenuSelect, NULL);
-          NtUserDestroyWindow(SubMenuInfo.Wnd);
+          DestroyWindow(SubMenuInfo.Wnd);
           SubMenuInfo.Wnd = NULL;
           MenuSetRosMenuInfo(&SubMenuInfo);
         }
@@ -2880,7 +2880,7 @@ MenuDoNextMenu(MTRACKER* Mt, UINT Vk)
       if (NewWnd != Mt->OwnerWnd)
         {
           Mt->OwnerWnd = NewWnd;
-          NtUserSetCapture(Mt->OwnerWnd);
+          SetCapture(Mt->OwnerWnd);
           (void)NtUserSetGUIThreadHandle(MSQ_STATE_MENUOWNER, Mt->OwnerWnd);
         }
 
@@ -3243,7 +3243,7 @@ MenuTrackMenu(HMENU Menu, UINT Flags, INT x, INT y,
       fEndMenu = ! fRemove;
     }
 
-  NtUserSetCapture(Mt.OwnerWnd);
+  SetCapture(Mt.OwnerWnd);
   (void)NtUserSetGUIThreadHandle(MSQ_STATE_MENUOWNER, Mt.OwnerWnd);
 
   while (! fEndMenu)
@@ -3271,7 +3271,7 @@ MenuTrackMenu(HMENU Menu, UINT Flags, INT x, INT y,
                   EnterIdleSent = TRUE;
                   SendMessageW(Mt.OwnerWnd, WM_ENTERIDLE, MSGF_MENU, (LPARAM) Win);
                 }
-              NtUserWaitMessage();
+              WaitMessage();
             }
         }
 
@@ -3529,7 +3529,7 @@ MenuTrackMenu(HMENU Menu, UINT Flags, INT x, INT y,
     }
 
   (void)NtUserSetGUIThreadHandle(MSQ_STATE_MENUOWNER, NULL);
-  NtUserSetCapture(NULL);  /* release the capture */
+  SetCapture(NULL);  /* release the capture */
 
   /* If dropdown is still painted and the close box is clicked on
      then the menu will be destroyed as part of the DispatchMessage above.
@@ -3545,7 +3545,7 @@ MenuTrackMenu(HMENU Menu, UINT Flags, INT x, INT y,
 
               if (0 != (MenuInfo.Flags & MF_POPUP))
                 {
-                  NtUserDestroyWindow(MenuInfo.Wnd);
+                  DestroyWindow(MenuInfo.Wnd);
                   MenuInfo.Wnd = NULL;
                 }
               MenuSelectItem(Mt.OwnerWnd, &MenuInfo, NO_SELECTED_ITEM, FALSE, NULL);
@@ -4056,7 +4056,7 @@ EndMenu(VOID)
 {
   GUITHREADINFO guii;
   guii.cbSize = sizeof(GUITHREADINFO);
-  if(NtUserGetGUIThreadInfo(GetCurrentThreadId(), &guii) && guii.hwndMenuOwner)
+  if(GetGUIThreadInfo(GetCurrentThreadId(), &guii) && guii.hwndMenuOwner)
   {
     PostMessageW(guii.hwndMenuOwner, WM_CANCELMODE, 0, 0);
   }
@@ -4660,7 +4660,7 @@ LoadMenuIndirectW(CONST MENUTEMPLATE *lpMenuTemplate)
       if (!(hMenu = CreateMenu())) return 0;
       if (!MENU_ParseResource(p, hMenu, TRUE))
       {
-        NtUserDestroyMenu(hMenu);
+        DestroyMenu(hMenu);
         return 0;
       }
       return hMenu;
@@ -4670,7 +4670,7 @@ LoadMenuIndirectW(CONST MENUTEMPLATE *lpMenuTemplate)
       if (!(hMenu = CreateMenu())) return 0;
       if (!MENUEX_ParseResource(p, hMenu))
       {
-        NtUserDestroyMenu( hMenu );
+        DestroyMenu( hMenu );
         return 0;
       }
       return hMenu;
@@ -5142,14 +5142,14 @@ ChangeMenuW(
             return AppendMenuW(hMenu, flags &~ MF_APPEND, cmdInsert, lpszNewItem);
 
         case MF_DELETE :
-            return NtUserDeleteMenu(hMenu, cmd, flags &~ MF_DELETE);
+            return DeleteMenu(hMenu, cmd, flags &~ MF_DELETE);
 
         case MF_CHANGE :
             return ModifyMenuW(hMenu, cmd, flags &~ MF_CHANGE, cmdInsert, lpszNewItem);
 
         case MF_REMOVE :
-            return NtUserRemoveMenu(hMenu, flags & MF_BYPOSITION ? cmd : cmdInsert,
-                                    flags &~ MF_REMOVE);
+            return RemoveMenu(hMenu, flags & MF_BYPOSITION ? cmd : cmdInsert,
+                                flags &~ MF_REMOVE);
 
         default :   /* MF_INSERT */
             return InsertMenuW(hMenu, cmd, flags, cmdInsert, lpszNewItem);
@@ -5180,14 +5180,14 @@ ChangeMenuA(
             return AppendMenuA(hMenu, flags &~ MF_APPEND, cmdInsert, lpszNewItem);
 
         case MF_DELETE :
-            return NtUserDeleteMenu(hMenu, cmd, flags &~ MF_DELETE);
+            return DeleteMenu(hMenu, cmd, flags &~ MF_DELETE);
 
         case MF_CHANGE :
             return ModifyMenuA(hMenu, cmd, flags &~ MF_CHANGE, cmdInsert, lpszNewItem);
 
         case MF_REMOVE :
-            return NtUserRemoveMenu(hMenu, flags & MF_BYPOSITION ? cmd : cmdInsert,
-                                    flags &~ MF_REMOVE);
+            return RemoveMenu(hMenu, flags & MF_BYPOSITION ? cmd : cmdInsert,
+                                flags &~ MF_REMOVE);
 
         default :   /* MF_INSERT */
             return InsertMenuA(hMenu, cmd, flags, cmdInsert, lpszNewItem);
index 04658dc..598eabe 100644 (file)
@@ -104,12 +104,12 @@ static INT_PTR CALLBACK MessageBoxProc( HWND hwnd, UINT message,
         {
           case MB_ABORTRETRYIGNORE:
           case MB_YESNO:
-            NtUserRemoveMenu(GetSystemMenu(hwnd, FALSE), SC_CLOSE, MF_BYCOMMAND);
+            RemoveMenu(GetSystemMenu(hwnd, FALSE), SC_CLOSE, MF_BYCOMMAND);
             break;
         }
-        NtUserSetFocus(GetDlgItem(hwnd, mbi->DefBtn));
+        SetFocus(GetDlgItem(hwnd, mbi->DefBtn));
         if(mbi->Timeout && (mbi->Timeout != (UINT)-1))
-          NtUserSetTimer(hwnd, 0, mbi->Timeout, NULL);
+          SetTimer(hwnd, 0, mbi->Timeout, NULL);
       }
       return 0;
 
index 9db1f60..9f6caf3 100644 (file)
@@ -285,7 +285,7 @@ DefWndNCPaint(HWND hWnd, HRGN hRgn, BOOL Active)
 
    Style = GetWindowLongW(hWnd, GWL_STYLE);
 
-   hDC = NtUserGetDCEx(hWnd, hRgn, DCX_WINDOW | DCX_INTERSECTRGN | DCX_USESTYLE | DCX_KEEPCLIPRGN);
+   hDC = GetDCEx(hWnd, hRgn, DCX_WINDOW | DCX_INTERSECTRGN | DCX_USESTYLE | DCX_KEEPCLIPRGN);
    if (hDC == 0)
    {
       return 0;
@@ -297,13 +297,13 @@ DefWndNCPaint(HWND hWnd, HRGN hRgn, BOOL Active)
    {
       if (ExStyle & WS_EX_MDICHILD)
       {
-         Active = IsChild(NtUserGetForegroundWindow(), hWnd);
+         Active = IsChild(GetForegroundWindow(), hWnd);
          if (Active)
             Active = (hWnd == (HWND)SendMessageW(Parent, WM_MDIGETACTIVE, 0, 0));
       }
       else
       {
-         Active = (NtUserGetForegroundWindow() == hWnd);
+         Active = (GetForegroundWindow() == hWnd);
       }
    }
    GetWindowRect(hWnd, &WindowRect);
@@ -546,7 +546,7 @@ DefWndNCCalcSize(HWND hWnd, BOOL CalcSizeStruct, RECT *Rect)
 
       if (menu && !(Style & WS_CHILD))
       {
-         HDC hDC = NtUserGetWindowDC(hWnd);
+         HDC hDC = GetWindowDC(hWnd);
          if(hDC)
          {
            RECT CliRect = *Rect;
@@ -911,10 +911,10 @@ DefWndDoButton(HWND hWnd, WPARAM wParam)
     */
    UpdateWindow(hWnd);
 
-   WindowDC = NtUserGetWindowDC(hWnd);
+   WindowDC = GetWindowDC(hWnd);
    UserDrawCaptionButtonWnd(hWnd, WindowDC, TRUE, ButtonType);
 
-   NtUserSetCapture(hWnd);
+   SetCapture(hWnd);
 
    for (;;)
    {
@@ -950,7 +950,7 @@ DefWndNCLButtonDown(HWND hWnd, WPARAM wParam, LPARAM lParam)
         case HTCAPTION:
         {
                HWND hTopWnd = GetAncestor(hWnd, GA_ROOT);
-               if (NtUserSetActiveWindow(hTopWnd) || GetActiveWindow() == hTopWnd)
+               if (SetActiveWindow(hTopWnd) || GetActiveWindow() == hTopWnd)
                {
                    SendMessageW(hWnd, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, lParam);
                }
index 597ebdd..820bcfa 100644 (file)
@@ -154,7 +154,7 @@ WINAPI
 UpdateWindow(
   HWND hWnd)
 {
-  return NtUserRedrawWindow( hWnd, NULL, 0, RDW_UPDATENOW | RDW_ALLCHILDREN );
+  return RedrawWindow( hWnd, NULL, 0, RDW_UPDATENOW | RDW_ALLCHILDREN );
 }
 
 
@@ -169,7 +169,7 @@ ValidateRect(
 {
   /* FIXME: should RDW_NOCHILDREN be included too? Ros used to,
      but Wine dont so i removed it... */
-  return NtUserRedrawWindow(hWnd, lpRect, 0, RDW_VALIDATE);
+  return RedrawWindow(hWnd, lpRect, 0, RDW_VALIDATE);
 }
 
 
@@ -184,7 +184,7 @@ ValidateRgn(
 {
   /* FIXME: should RDW_NOCHILDREN be included too? Ros used to,
      but Wine dont so i removed it... */
-  return NtUserRedrawWindow( hWnd, NULL, hRgn, RDW_VALIDATE );
+  return RedrawWindow( hWnd, NULL, hRgn, RDW_VALIDATE );
 }
 
 
index 9cecd82..bdd0dc6 100644 (file)
@@ -99,7 +99,7 @@ BringWindowToTop(HWND hWnd)
 VOID WINAPI
 SwitchToThisWindow(HWND hwnd, BOOL fUnknown)
 {
-    NtUserShowWindow(hwnd, SW_SHOW);
+    ShowWindow(hwnd, SW_SHOW);
 }
 
 
@@ -327,7 +327,7 @@ CreateWindowExA(DWORD dwExStyle,
             {
                 TRACE("Restoring current maximized child %p\n", top_child);
                 SendMessageW( top_child, WM_SETREDRAW, FALSE, 0 );
-                NtUserShowWindow(top_child, SW_RESTORE);
+                ShowWindow(top_child, SW_RESTORE);
                 SendMessageW( top_child, WM_SETREDRAW, TRUE, 0 );
             }
         }
@@ -433,7 +433,7 @@ CreateWindowExW(DWORD dwExStyle,
             {
                 TRACE("Restoring current maximized child %p\n", top_child);
                 SendMessageW( top_child, WM_SETREDRAW, FALSE, 0 );
-                NtUserShowWindow(top_child, SW_RESTORE);
+                ShowWindow(top_child, SW_RESTORE);
                 SendMessageW( top_child, WM_SETREDRAW, TRUE, 0 );
             }
         }
@@ -488,7 +488,7 @@ DeferWindowPos(HDWP hWinPosInfo,
 #if 0
     return NtUserDeferWindowPos(hWinPosInfo, hWnd, hWndInsertAfter, x, y, cx, cy, uFlags);
 #else
-    NtUserSetWindowPos(hWnd, hWndInsertAfter, x, y, cx, cy, uFlags);
+    SetWindowPos(hWnd, hWndInsertAfter, x, y, cx, cy, uFlags);
     return hWinPosInfo;
 #endif
 }
@@ -1482,7 +1482,7 @@ AnimateWindow(HWND hwnd,
         return FALSE;
     }
 
-    NtUserShowWindow(hwnd, (dwFlags & AW_HIDE) ? SW_HIDE : ((dwFlags & AW_ACTIVATE) ? SW_SHOW : SW_SHOWNA));
+    ShowWindow(hwnd, (dwFlags & AW_HIDE) ? SW_HIDE : ((dwFlags & AW_ACTIVATE) ? SW_SHOW : SW_SHOWNA));
 
     return TRUE;
 }
@@ -1497,7 +1497,7 @@ OpenIcon(HWND hWnd)
     if (!(GetWindowLongW(hWnd, GWL_STYLE) & WS_MINIMIZE))
         return FALSE;
 
-    NtUserShowWindow(hWnd,SW_RESTORE);
+    ShowWindow(hWnd,SW_RESTORE);
     return TRUE;
 }
 
index e86ad18..4615077 100644 (file)
@@ -60,13 +60,13 @@ WinPosActivateOtherWindow(HWND hwnd)
     }
 
  done:
-    fg = NtUserGetForegroundWindow();
+    fg = GetForegroundWindow();
     TRACE("win = %p fg = %p\n", hwndTo, fg);
     if (!fg || (hwnd == fg))
     {
         if (SetForegroundWindow( hwndTo )) return;
     }
-    if (!NtUserSetActiveWindow( hwndTo )) NtUserSetActiveWindow(0);
+    if (!SetActiveWindow( hwndTo )) SetActiveWindow(0);
 }