Ignore:
Timestamp:
Feb 5, 2000, 8:45:19 PM (26 years ago)
Author:
cbratschi
Message:

several fixes -> changelog

File:
1 edited

Legend:

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

    r2611 r2666  
    1 /* $Id: button.cpp,v 1.31 2000-02-03 17:13:00 cbratschi Exp $ */
     1/* $Id: button.cpp,v 1.32 2000-02-05 19:45:14 cbratschi Exp $ */
    22/* File: button.cpp -- Button type widgets
    33 *
     
    688688}
    689689
    690 static INT BUTTON_GetTextFormat(DWORD dwStyle,INT defHorz,INT defVert)
     690static INT BUTTON_GetTextFormat(DWORD dwStyle,DWORD dwExStyle,INT defHorz,INT defVert)
    691691{
    692692  INT format = 0;
     
    694694  if (dwStyle & BS_LEFT) format = DT_LEFT;
    695695  else if (dwStyle & BS_CENTER) format = DT_CENTER;
    696   else if (dwStyle & BS_RIGHT) format = DT_RIGHT;
     696  else if ((dwStyle & BS_RIGHT) || (dwExStyle & WS_EX_RIGHT)) format = DT_RIGHT;
    697697  else format = defHorz;
    698698
     
    775775    if ((textLen > 0) && (!(dwStyle & (BS_ICON|BS_BITMAP))))
    776776    {
    777         INT format = BUTTON_GetTextFormat(dwStyle,DT_CENTER,DT_VCENTER);
     777        INT format = BUTTON_GetTextFormat(dwStyle,GetWindowLongA(hwnd,GWL_EXSTYLE),DT_CENTER,DT_VCENTER);
    778778
    779779        textLen++;
     
    999999        if( text && action != ODA_SELECT )
    10001000        {
    1001           INT format = BUTTON_GetTextFormat(dwStyle,DT_TOP,DT_VCENTER);
     1001          INT format = BUTTON_GetTextFormat(dwStyle,GetWindowLongA(hwnd,GWL_EXSTYLE),DT_TOP,DT_VCENTER);
    10021002
    10031003          if (dwStyle & WS_DISABLED) DrawDisabledText(hDC,text,&rtext,format);
     
    10841084    if (textLen > 0)
    10851085    {
    1086       INT format = BUTTON_GetTextFormat(dwStyle,DT_LEFT,DT_TOP) | DT_NOCLIP | DT_SINGLELINE;
     1086      INT format = BUTTON_GetTextFormat(dwStyle,GetWindowLongA(hwnd,GWL_EXSTYLE),DT_LEFT,DT_TOP) | DT_NOCLIP | DT_SINGLELINE;
    10871087
    10881088      textLen++;
Note: See TracChangeset for help on using the changeset viewer.