Ignore:
Timestamp:
Feb 20, 2000, 7:28:35 PM (26 years ago)
Author:
cbratschi
Message:

WM_EX_CONTEXTHELP

File:
1 edited

Legend:

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

    r2803 r2834  
    1 /* $Id: win32wbasenonclient.cpp,v 1.11 2000-02-16 14:28:23 sandervl Exp $ */
     1/* $Id: win32wbasenonclient.cpp,v 1.12 2000-02-20 18:28:35 cbratschi Exp $ */
    22/*
    33 * Win32 Window Base Class for OS/2 (non-client methods)
     
    3939#include <menu.h>
    4040
    41 #define DBG_LOCALLOG    DBG_win32wbasenonclient
     41#define DBG_LOCALLOG    DBG_win32wbasenonclient
    4242#include "dbglocal.h"
    4343
     
    4949#define KEYDATA_PREVSTATE   0x4000
    5050
    51 static HBITMAP hbitmapClose = 0;
    52 static HBITMAP hbitmapCloseD = 0;
    53 static HBITMAP hbitmapMinimize = 0;
     51static INT bitmapW = 16,bitmapH = 14; //CB: todo: use these values
     52static HBITMAP hbitmapClose     = 0;
     53static HBITMAP hbitmapCloseD    = 0;
     54static HBITMAP hbitmapMinimize  = 0;
    5455static HBITMAP hbitmapMinimizeD = 0;
    55 static HBITMAP hbitmapMaximize = 0;
     56static HBITMAP hbitmapMaximize  = 0;
    5657static HBITMAP hbitmapMaximizeD = 0;
    57 static HBITMAP hbitmapRestore = 0;
    58 static HBITMAP hbitmapRestoreD = 0;
     58static HBITMAP hbitmapRestore   = 0;
     59static HBITMAP hbitmapRestoreD  = 0;
     60static HBITMAP hbitmapHelp      = 0;
     61static HBITMAP hbitmapHelpD     = 0;
    5962
    6063BYTE lpGrayMask[] = { 0xAA, 0xA0,
     
    606609
    607610  /* Draw frame */
    608   PatBlt(hdc,rect->left,   rect->top,      rect->right-rect->left, height,PATCOPY);
    609   PatBlt(hdc,rect->left,   rect->top,      width,                  rect->bottom-rect->top,PATCOPY);
    610   PatBlt(hdc,rect->left,   rect->bottom-1, rect->right-rect->left,-height,PATCOPY);
    611   PatBlt(hdc,rect->right-1,rect->top,     -width,                  rect->bottom-rect->top,PATCOPY);
     611  PatBlt(hdc,rect->left,   rect->top,      rect->right-rect->left, height,PATCOPY); //top
     612  PatBlt(hdc,rect->left,   rect->top,      width,                  rect->bottom-rect->top,PATCOPY); //left
     613  PatBlt(hdc,rect->left,   rect->bottom-1, rect->right-rect->left,-height,PATCOPY); //bottom
     614  PatBlt(hdc,rect->right-1,rect->top,     -width,                  rect->bottom-rect->top,PATCOPY); //right
    612615  SelectObject(hdc,oldBrush);
    613616
     
    729732          (down ? hbitmapRestoreD : hbitmapRestore ) :
    730733          (down ? hbitmapMaximizeD: hbitmapMaximize);
    731   hOldBmp=SelectObject( hdcMem, hBmp );
     734  hOldBmp = SelectObject( hdcMem, hBmp );
    732735  GetObjectA (hBmp, sizeof(BITMAP), &bmp);
    733736
     
    885888    hbitmapRestore   = LoadBitmapA(0,MAKEINTRESOURCEA(OBM_RESTORE));
    886889    hbitmapRestoreD  = LoadBitmapA(0,MAKEINTRESOURCEA(OBM_RESTORED));
     890    hbitmapHelp      = LoadBitmapA(0,MAKEINTRESOURCEA(OBM_HELP));
     891    hbitmapHelpD     = LoadBitmapA(0,MAKEINTRESOURCEA(OBM_HELPD));
    887892  }
    888893
     
    892897      r.left += GetSystemMetrics(SM_CYCAPTION) - 1;
    893898  }
    894 
    895   //CB: todo: integrate help button
    896899
    897900  if (dwStyle & WS_SYSMENU)
     
    905908    DrawCloseButton(memDC,&r2,FALSE,
    906909                    ((((state & MF_DISABLED) || (state & MF_GRAYED))) && (state != 0xFFFFFFFF)));
    907     r.right -= GetSystemMetrics(SM_CYCAPTION) - 1;
     910    r.right -= GetSystemMetrics(SM_CYCAPTION)-1;
     911
     912    if (dwExStyle & WS_EX_CONTEXTHELP)
     913    {
     914#if 0      //CB: todo: integrate help button
     915      DrawHelpButton(memDC,&r2,FALSE);
     916      r.right -= bitmapW;
     917#endif
     918    }
    908919
    909920    if ((dwStyle & WS_MAXIMIZEBOX) || (dwStyle & WS_MINIMIZEBOX))
Note: See TracChangeset for help on using the changeset viewer.