Changeset 1047 for trunk/src


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

* empty log message *

File:
1 edited

Legend:

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

    r1027 r1047  
    1 /* $Id: hotkey.c,v 1.9 1999-09-23 17:26:29 cbratschi Exp $ */
     1/* $Id: hotkey.c,v 1.10 1999-09-25 15:10:27 cbratschi Exp $ */
    22/*
    33 * Hotkey control
     
    106106    TEXTMETRICA tm;
    107107    HDC hdc;
     108    RECT rect;
    108109
    109110    /* allocate memory for info structure */
     
    119120    infoPtr->fwCombInv = 0;
    120121    infoPtr->fwModInv  = 0;
    121     infoPtr->cursorPos.x = 3;
    122     infoPtr->cursorPos.y = 3;
    123122    infoPtr->bfModsDown = 0;
    124123
     
    128127    infoPtr->nHeight = tm.tmHeight;
    129128    ReleaseDC (hwnd, hdc);
     129
     130    GetClientRect(hwnd,&rect);
     131    infoPtr->cursorPos.x = 0;
     132    infoPtr->cursorPos.y = rect.bottom-tm.tmHeight;
    130133
    131134    return 0;
     
    303306  HideCaret(hwnd);
    304307  GetClientRect(hwnd,&rect);
    305   DrawEdge(hdc,&rect,EDGE_SUNKEN,BF_RECT | BF_ADJUST);
    306308
    307309  //draw string
     
    334336  DrawTextA(hdc,text,strlen(text),&newRect,DT_LEFT | DT_BOTTOM | DT_SINGLELINE | DT_CALCRECT);
    335337  if (infoPtr->hFont) SelectObject(hdc,oldFont);
    336   infoPtr->cursorPos.x = (newRect.right >= rect.right)? 3:newRect.right;
     338  infoPtr->cursorPos.x = (newRect.right >= rect.right)? 0:newRect.right;
    337339  SetCaretPos(infoPtr->cursorPos.x,infoPtr->cursorPos.y);
    338340  ShowCaret(hwnd);
Note: See TracChangeset for help on using the changeset viewer.