ReactOS  0.4.13-dev-235-g7373cb3
window.cpp File Reference
#include <precomp.h>
Include dependency graph for window.cpp:

Go to the source code of this file.

Macros

#define PSM_GETRESULT   (WM_USER + 135)
 
#define PropSheet_GetResult(hDlg)   SNDMSG(hDlg, PSM_GETRESULT, 0, 0)
 

Functions

static BOOL CALLBACK MyDrawText (HDC hdc, LPARAM data, int cnt)
 
void DrawGrayText (HDC hdc, LPRECT pRect, LPCTSTR title, int dt_flags)
 

Variables

static RECT s_MyDrawText_Rect = {0, 0, 0, 0}
 

Macro Definition Documentation

◆ PropSheet_GetResult

#define PropSheet_GetResult (   hDlg)    SNDMSG(hDlg, PSM_GETRESULT, 0, 0)

Definition at line 1320 of file window.cpp.

◆ PSM_GETRESULT

#define PSM_GETRESULT   (WM_USER + 135)

Definition at line 1319 of file window.cpp.

Function Documentation

◆ DrawGrayText()

void DrawGrayText ( HDC  hdc,
LPRECT  pRect,
LPCTSTR  title,
int  dt_flags 
)

Definition at line 891 of file window.cpp.

892 {
894 
895  if (gray) {
896  TextColor lcColor(hdc, GetSysColor(COLOR_BTNHIGHLIGHT));
897  RECT shadowRect = {pRect->left+1, pRect->top+1, pRect->right+1, pRect->bottom+1};
898  DrawText(hdc, title, -1, &shadowRect, dt_flags);
899 
900  SetTextColor(hdc, gray);
901  DrawText(hdc, title, -1, pRect, dt_flags);
902  } else {
903  int old_r = pRect->right;
904  int old_b = pRect->bottom;
905 
906  DrawText(hdc, title, -1, pRect, dt_flags|DT_CALCRECT);
907 
908  int x = pRect->left + (old_r-pRect->right)/2;
909  int y = pRect->top + (old_b-pRect->bottom)/2;
910  int w = pRect->right-pRect->left;
911  int h = pRect->bottom-pRect->top;
914 
916  }
917 }
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6102
LONG top
Definition: windef.h:292
#define COLOR_BTNHIGHLIGHT
Definition: winuser.h:925
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
LONG left
Definition: windef.h:291
LONG right
Definition: windef.h:293
DWORD WINAPI GetSysColor(_In_ int)
#define DrawText
Definition: winuser.h:5637
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
#define DT_CALCRECT
Definition: winuser.h:526
LONG_PTR LPARAM
Definition: windef.h:208
DWORD COLORREF
Definition: windef.h:285
#define COLOR_GRAYTEXT
Definition: winuser.h:922
HDC hdc
Definition: main.c:9
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
Definition: text.c:886
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
LONG bottom
Definition: windef.h:294
#define GrayString
Definition: winuser.h:5668
static BOOL CALLBACK MyDrawText(HDC hdc, LPARAM data, int cnt)
Definition: window.cpp:885
HBRUSH WINAPI GetSysColorBrush(_In_ int)
static RECT s_MyDrawText_Rect
Definition: window.cpp:883
static char title[]
Definition: ps.c:92

Referenced by PictureButton::DrawItem(), and if().

◆ MyDrawText()

static BOOL CALLBACK MyDrawText ( HDC  hdc,
LPARAM  data,
int  cnt 
)
static

Definition at line 885 of file window.cpp.

886 {
888  return TRUE;
889 }
#define TRUE
Definition: types.h:120
const CHAR * LPCTSTR
Definition: xmlstorage.h:193
#define DrawText
Definition: winuser.h:5637
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
HDC hdc
Definition: main.c:9
#define DT_SINGLELINE
Definition: winuser.h:540
static RECT s_MyDrawText_Rect
Definition: window.cpp:883

Referenced by DrawGrayText(), and FlatButton::DrawItem().

Variable Documentation

◆ s_MyDrawText_Rect

RECT s_MyDrawText_Rect = {0, 0, 0, 0}
static

Definition at line 883 of file window.cpp.

Referenced by DrawGrayText(), FlatButton::DrawItem(), and MyDrawText().