Changeset 5406 for trunk/src/user32


Ignore:
Timestamp:
Mar 31, 2001, 12:08:20 AM (24 years ago)
Author:
sandervl
Message:

syscolor change + iconsm creation in RegisterClassA/W

Location:
trunk/src/user32
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/syscolor.cpp

    r4856 r5406  
    1 /* $Id: syscolor.cpp,v 1.25 2000-12-30 13:27:55 sandervl Exp $ */
     1/* $Id: syscolor.cpp,v 1.26 2001-03-30 22:08:19 sandervl Exp $ */
    22
    33/*
     
    5353  RGB(198,195,198), //COLOR_ACTIVEBORDER
    5454  RGB(198,195,198), //COLOR_INACTIVEBORDER
    55   RGB(198,195,198), //COLOR_APPWORKSPACE
     55  RGB(128,128,128), //COLOR_APPWORKSPACE
    5656  RGB(0,0,128),     //COLOR_HIGHLIGHT
    5757  RGB(255,255,255), //COLOR_HIGHLIGHTTEXT
  • trunk/src/user32/user32.cpp

    r5385 r5406  
    1 /* $Id: user32.cpp,v 1.94 2001-03-27 16:17:52 sandervl Exp $ */
     1/* $Id: user32.cpp,v 1.95 2001-03-30 22:08:19 sandervl Exp $ */
    22
    33/*
     
    15261526BOOL WIN32API InvertRect( HDC hDC, const RECT * lprc)
    15271527{
    1528     dprintf(("USER32: InvertRect %x", hDC));
     1528    if(lprc) {
     1529         dprintf(("USER32: InvertRect %x (%d,%d)(%d,%d)", hDC, lprc->left, lprc->top, lprc->right, lprc->bottom));
     1530    }
     1531    else dprintf(("USER32: InvertRect %x NULL", hDC));
    15291532    return O32_InvertRect(hDC,lprc);
    15301533}
  • trunk/src/user32/window.cpp

    r5404 r5406  
    1 /* $Id: window.cpp,v 1.90 2001-03-30 11:14:36 sandervl Exp $ */
     1/* $Id: window.cpp,v 1.91 2001-03-30 22:08:20 sandervl Exp $ */
    22/*
    33 * Win32 window apis for OS/2
     
    155155           dprintf(("CreateWindowEx32W: bad class name %04x",LOWORD(className)));
    156156       else
    157            dprintf(("CreateWindowEx32W: bad class name '%x'", className));
     157           dprintf(("CreateWindowEx32W: bad class name '%ls'", className));
    158158
    159159       SetLastError(ERROR_INVALID_PARAMETER);
     
    290290    }
    291291
    292     dprintf(("USER32:  CreateMDIWindowW\n"));
    293292    cs.szClass        = lpszClassName;
    294293    cs.szTitle        = lpszWindowName;
     
    300299    cs.style          = dwStyle;
    301300    cs.lParam         = lParam;
     301
     302    if(HIWORD(lpszClassName)) {
     303         dprintf(("CreateMDIWindowW: class %ls parent %x (%d,%d) (%d,%d), %x %x lParam=%x", lpszClassName, hwndParent, x, y, nWidth, nHeight, dwStyle, lParam));
     304    }
     305    else dprintf(("CreateMDIWindowW: class %d parent %x (%d,%d) (%d,%d), %x %x lParam=%x", lpszClassName, hwndParent, x, y, nWidth, nHeight, dwStyle, lParam));
    302306
    303307    return window->SendMessageW(WM_MDICREATE, 0, (LPARAM)&cs);
     
    839843#ifdef DEBUG
    840844    int rc = window->GetWindowTextW(lpsz, cch);
    841     if(rc) {
    842         LPSTR astring = UnicodeToAsciiString(lpsz);
    843         dprintf(("GetWindowTextW %x %s", hwnd, lpsz));
    844         free(astring);
    845     }
    846     else dprintf(("GetWindowTextW %x returned %d", hwnd, rc));
     845    dprintf(("GetWindowTextW %x %ls", hwnd, lpsz));
    847846    return rc;
    848847#else
     
    877876        return 0;
    878877    }
    879 #ifdef DEBUG
    880     LPSTR astring = UnicodeToAsciiString(lpsz);
    881     dprintf(("SetWindowTextW %x %s", hwnd, astring));
    882     free(astring);
    883 #endif
     878    dprintf(("SetWindowTextW %x %ls", hwnd, lpsz));
    884879    return window->SetWindowTextW((LPWSTR)lpsz);
    885880}
  • trunk/src/user32/windowclass.cpp

    r5242 r5406  
    1 /* $Id: windowclass.cpp,v 1.16 2001-02-22 10:37:31 sandervl Exp $ */
     1/* $Id: windowclass.cpp,v 1.17 2001-03-30 22:08:20 sandervl Exp $ */
    22/*
    33 * Win32 Window Class Code for OS/2
     
    5151    memcpy(&wc.style, lpWndClass, sizeof(WNDCLASSA));
    5252    wc.hIconSm = 0;
     53 
     54    //TODO: not destroyed when class is unregistered (neither does Wine, but that might be a bug)
     55    int iSmIconWidth  = GetSystemMetrics(SM_CXSMICON);
     56    int iSmIconHeight = GetSystemMetrics(SM_CYSMICON);
     57
     58    wc.hIconSm = CopyImage(wc.hIcon, IMAGE_ICON, iSmIconWidth, iSmIconHeight,
     59                           LR_COPYFROMRESOURCE);
    5360
    5461    if(Win32WndClass::FindClass(wc.hInstance, (LPSTR)wc.lpszClassName)) {
     
    103110 Win32WndClass *winclass;
    104111
    105     dprintf(("RegisterClassW\n"));
    106112    //CB: size new in ex structure
    107113    wc.cbSize = sizeof(wc);
    108114    memcpy(&wc.style, lpwc, sizeof(WNDCLASSA));
    109     wc.hIconSm = 0;
     115
     116    //TODO: not destroyed when class is unregistered (neither does Wine, but that might be a bug)
     117    int iSmIconWidth  = GetSystemMetrics(SM_CXSMICON);
     118    int iSmIconHeight = GetSystemMetrics(SM_CYSMICON);
     119
     120    wc.hIconSm = CopyImage(wc.hIcon, IMAGE_ICON, iSmIconWidth, iSmIconHeight,
     121                           LR_COPYFROMRESOURCE);
    110122
    111123    if(Win32WndClass::FindClass(wc.hInstance, (LPWSTR)wc.lpszClassName)) {
    112         dprintf(("RegisterClassW %x %x already exists", wc.hInstance, wc.lpszClassName));
     124        if(HIWORD(wc.lpszClassName)) {
     125                dprintf(("RegisterClassW %x %ls already exists", wc.hInstance, wc.lpszClassName));
     126        }
     127        else    dprintf(("RegisterClassW %x %x already exists", wc.hInstance, wc.lpszClassName));
    113128        SetLastError(ERROR_CLASS_ALREADY_EXISTS);
    114129        return 0;
     
    138153
    139154    if(Win32WndClass::FindClass(wc.hInstance, (LPWSTR)wc.lpszClassName)) {
    140         dprintf(("RegisterClassW %x %x already exists", wc.hInstance, wc.lpszClassName));
     155        if(HIWORD(wc.lpszClassName)) {
     156                dprintf(("RegisterClassExW %x %ls already exists", wc.hInstance, wc.lpszClassName));
     157        }
     158        else    dprintf(("RegisterClassExW %x %x already exists", wc.hInstance, wc.lpszClassName));
    141159        SetLastError(ERROR_CLASS_ALREADY_EXISTS);
    142160        return 0;
     
    306324 char          *astring = NULL;
    307325
    308   dprintf(("USER32: GetClassInfoExW\n"));
     326  if(HIWORD(lpszClass)) {
     327       dprintf(("USER32:GetClassInfoExW (%08xh,%ls,%08x)",
     328                 hInstance, lpszClass, lpwcx));
     329  }
     330  else dprintf(("USER32:GetClassInfoExW (%08xh,%x,%08x)",
     331                 hInstance, lpszClass, lpwcx));
    309332
    310333  if(HIWORD(lpszClass) != 0) {
Note: See TracChangeset for help on using the changeset viewer.