ReactOS 0.4.15-dev-7942-gd23573b
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}
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6102
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
HDC hdc
Definition: main.c:9
static char title[]
Definition: ps.c:92
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
LONG_PTR LPARAM
Definition: windef.h:208
DWORD COLORREF
Definition: windef.h:300
static RECT s_MyDrawText_Rect
Definition: window.cpp:883
static BOOL CALLBACK MyDrawText(HDC hdc, LPARAM data, int cnt)
Definition: window.cpp:885
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
Definition: text.c:918
DWORD WINAPI GetSysColor(_In_ int)
#define GrayString
Definition: winuser.h:5802
#define COLOR_GRAYTEXT
Definition: winuser.h:932
HBRUSH WINAPI GetSysColorBrush(_In_ int)
#define DrawText
Definition: winuser.h:5771
#define DT_CALCRECT
Definition: winuser.h:526
#define COLOR_BTNHIGHLIGHT
Definition: winuser.h:935

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
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
#define DT_SINGLELINE
Definition: winuser.h:540
const CHAR * LPCTSTR
Definition: xmlstorage.h:193

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().