Ignore:
Timestamp:
May 14, 2015, 9:55:51 PM (11 years ago)
Author:
rousseau
Message:

Include a bunch of Console Debug calls

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/swt/src/user32/button.cpp

    r22096 r22097  
    1616#include <string.h>
    1717#include <stdlib.h>
     18#include <stdio.h>
    1819#include <os2win.h>
    1920#include "controls.h"
     
    531532static LRESULT BUTTON_SetStyle(HWND hwnd,WPARAM wParam,LPARAM lParam)
    532533{
     534  __con_debug(2,"USER32::BUTTON_SetStyle(hwnd=%08X,wParam=%08X,lParam=%08X\n",hwnd,wParam,lParam);
    533535  DWORD dwStyle = GetWindowLongA(hwnd,GWL_STYLE),newStyle;
    534536
    535537  if ((wParam & 0x0F) >= MAX_BTN_TYPE) return 0;
    536538  newStyle = (dwStyle & 0xFFFFFFF0) | (wParam & 0x0000000F);
     539  __con_debug(2,"USER32::BUTTON_SetStyle(newStyle=%08X\n",newStyle);
    537540
    538541  if (newStyle != dwStyle)
     
    775778{
    776779  INT format = 0;
    777 
     780  __con_debug(2,"USER32::BUTTON_GetTextFormat: dwStyle=%08X, dwExStyle=%08X, dh=%d, dv=%d\n",
     781        dwStyle,dwExStyle,defHorz,defVert);
    778782  /*
    779783   * BS_CENTER is not a single bit-flag, but is actually BS_LEFT | BS_RIGHT.
     
    806810  BOOL pushedState )
    807811{
     812    __con_debug(2,"\n%s\n","USER32::BUTTON_DrawPushButton");
    808813    RECT rc, focus_rect;
    809814    HPEN hOldPen;
     
    811816    BUTTONINFO *infoPtr = (BUTTONINFO *)GetInfoPtr(hwnd);
    812817    DWORD dwStyle = GetWindowLongA(hwnd,GWL_STYLE);
     818    __con_debug(2,"USER32::BUTTON_DrawPushButton: dwStyle=%08X\n",dwStyle);
    813819    int xBorderOffset, yBorderOffset;
    814820    xBorderOffset = yBorderOffset = 0;
     
    817823
    818824    GetClientRect( hwnd, &rc );
    819 
     825    __con_debug(2,"USER32::BUTTON_DrawPushButton: l=%d, r=%d, t=%d, b=%d\n",
     826        rc.left,rc.right,rc.top,rc.bottom);
    820827      /* Send WM_CTLCOLOR to allow changing the font (the colors are fixed) */
    821828    if (infoPtr->hFont) SelectObject( hDC, infoPtr->hFont );
     
    830837        InflateRect( &rc, -1, -1 );
    831838    }
    832 
     839    __con_debug(2,"(USER32::BUTTON_DrawPushButton: l=%d, r=%d, t=%d, b=%d\n",
     840        rc.left,rc.right,rc.top,rc.bottom);
    833841    UINT uState = DFCS_BUTTONPUSH;
    834842
     
    845853    DrawFrameControl( hDC, &rc, DFC_BUTTON, uState );
    846854    InflateRect( &rc, -2, -2 );
    847 
     855    __con_debug(2,"(USER32::BUTTON_DrawPushButton: l=%d, r=%d, t=%d, b=%d\n",
     856        rc.left,rc.right,rc.top,rc.bottom);
    848857    focus_rect = rc;
    849858
     
    853862      rc.top  += 2;
    854863    }
    855 
     864    __con_debug(2,"(USER32::BUTTON_DrawPushButton: l=%d, r=%d, t=%d, b=%d\n",
     865        rc.left,rc.right,rc.top,rc.bottom);
    856866
    857867    /* draw button label, if any:
     
    859869     * In win9x we don't show text if there is a bitmap or icon.
    860870     * I don't know about win31 so I leave it as it was for win31.
    861      * Dennis Björklund 12 Jul, 99
     871     * Dennis Björklund 12 Jul, 99
    862872     */
    863873    textLen = GetWindowTextLengthA(hwnd);
     
    865875    {
    866876        INT format = BUTTON_GetTextFormat(dwStyle,GetWindowLongA(hwnd,GWL_EXSTYLE),DT_CENTER,DT_VCENTER);
     877        __con_debug(2,"(USER32::BUTTON_DrawPushButton: format=%d\n",format);
    867878
    868879        textLen++;
Note: See TracChangeset for help on using the changeset viewer.