Changeset 988 for trunk/src


Ignore:
Timestamp:
Sep 20, 1999, 5:59:27 PM (26 years ago)
Author:
cbratschi
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/comctl32/hotkey.c

    r983 r988  
    1 /* $Id: hotkey.c,v 1.6 1999-09-19 13:27:09 cbratschi Exp $ */
     1/* $Id: hotkey.c,v 1.7 1999-09-20 15:59:27 cbratschi Exp $ */
    22/*
    33 * Hotkey control
     
    2222
    2323static VOID
    24 HOTKEY_UpdateHotKey(HWND hwnd);
     24HOTKEY_Refresh(HWND hwnd)
     25{
     26  InvalidateRect(hwnd,NULL,FALSE);
     27}
     28
    2529
    2630static BYTE
     
    4953  infoPtr->bfMods = HOTKEY_Check(infoPtr,(wParam & 0xFF00)>>8);
    5054
    51   HOTKEY_UpdateHotKey(hwnd);
     55  HOTKEY_Refresh(hwnd);
    5256
    5357  return 0;
     
    7478
    7579  infoPtr->bfMods = HOTKEY_Check(infoPtr,infoPtr->bfMods);
    76   if (infoPtr->bfMods != oldMods) HOTKEY_UpdateHotKey(hwnd);
     80  if (infoPtr->bfMods != oldMods) HOTKEY_Refresh(hwnd);
    7781
    7882  return 0;
     
    184188
    185189    infoPtr->bfMods = newMods;
    186     HOTKEY_UpdateHotKey(hwnd);
     190    HOTKEY_Refresh(hwnd);
    187191
    188192    return TRUE;
     
    274278  DrawTextA(hdc,text,strlen(text),&newRect,DT_LEFT | DT_BOTTOM | DT_SINGLELINE | DT_CALCRECT);
    275279  if (infoPtr->hFont) SelectObject(hdc,oldFont);
    276   infoPtr->cursorPos.x = (newRect.right >= rect.right)? -1:newRect.right;
     280  infoPtr->cursorPos.x = (newRect.right >= rect.right)? 3:newRect.right;
    277281  SetCaretPos(infoPtr->cursorPos.x,infoPtr->cursorPos.y);
    278282  ShowCaret(hwnd);
     
    296300}
    297301
    298 
    299 static VOID
    300 HOTKEY_UpdateHotKey(HWND hwnd)
    301 {
    302   HDC hdc;
    303   RECT rect;
    304   HBRUSH hBrush;
    305 
    306   GetClientRect(hwnd,&rect);
    307   InflateRect(&rect,2,2);
    308   hdc = GetDC(hwnd);
    309   hBrush = (HBRUSH)SendMessageA(GetParent(hwnd),WM_CTLCOLOREDIT,hdc,(LPARAM)hwnd);
    310   if (!hBrush) hBrush = (HBRUSH)GetStockObject(WHITE_BRUSH);
    311   FillRect(hdc,&rect,hBrush);
    312   HOTKEY_Draw(hwnd,hdc);
    313   ReleaseDC(hwnd,hdc);
    314 }
    315302
    316303static LRESULT
     
    350337    ReleaseDC (hwnd, hdc);
    351338
    352     if (LOWORD(lParam)) HOTKEY_UpdateHotKey(hwnd);
     339    if (LOWORD(lParam)) HOTKEY_Refresh(hwnd);
    353340
    354341    return 0;
Note: See TracChangeset for help on using the changeset viewer.