ReactOS  0.4.13-dev-482-ge57f103
status.c File Reference
#include <stdarg.h>
#include <string.h>
#include "windef.h"
#include "winbase.h"
#include "wine/unicode.h"
#include "wingdi.h"
#include "winuser.h"
#include "winnls.h"
#include "commctrl.h"
#include "comctl32.h"
#include "uxtheme.h"
#include "vssym32.h"
#include "wine/debug.h"
Include dependency graph for status.c:

Go to the source code of this file.

Classes

struct  STATUSWINDOWPART
 
struct  STATUS_INFO
 

Macros

#define HORZ_BORDER   0
 
#define VERT_BORDER   2
 
#define HORZ_GAP   2
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (statusbar)
 
static void STATUSBAR_SetPartBounds (STATUS_INFO *infoPtr)
 
static LRESULT STATUSBAR_NotifyFormat (STATUS_INFO *infoPtr, HWND from, INT cmd)
 
static LPCSTR debugstr_t (LPCWSTR text, BOOL isW)
 
static UINT STATUSBAR_ComputeHeight (STATUS_INFO *infoPtr)
 
static void STATUSBAR_DrawSizeGrip (HTHEME theme, HDC hdc, LPRECT lpRect)
 
static void STATUSBAR_DrawPart (const STATUS_INFO *infoPtr, HDC hdc, const STATUSWINDOWPART *part, int itemID)
 
static void STATUSBAR_RefreshPart (const STATUS_INFO *infoPtr, HDC hdc, const STATUSWINDOWPART *part, int itemID)
 
static LRESULT STATUSBAR_Refresh (STATUS_INFO *infoPtr, HDC hdc)
 
static int STATUSBAR_InternalHitTest (const STATUS_INFO *infoPtr, const POINT *pt)
 
static LRESULT STATUSBAR_Relay2Tip (const STATUS_INFO *infoPtr, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
static BOOL STATUSBAR_GetBorders (const STATUS_INFO *infoPtr, INT out[])
 
static BOOL STATUSBAR_SetBorders (STATUS_INFO *infoPtr, const INT in[])
 
static HICON STATUSBAR_GetIcon (const STATUS_INFO *infoPtr, INT nPart)
 
static INT STATUSBAR_GetParts (const STATUS_INFO *infoPtr, INT num_parts, INT parts[])
 
static BOOL STATUSBAR_GetRect (const STATUS_INFO *infoPtr, INT nPart, LPRECT rect)
 
static LRESULT STATUSBAR_GetTextA (STATUS_INFO *infoPtr, INT nPart, LPSTR buf)
 
static LRESULT STATUSBAR_GetTextW (STATUS_INFO *infoPtr, INT nPart, LPWSTR buf)
 
static LRESULT STATUSBAR_GetTextLength (STATUS_INFO *infoPtr, INT nPart)
 
static LRESULT STATUSBAR_GetTipTextA (const STATUS_INFO *infoPtr, INT id, LPSTR tip, INT size)
 
static LRESULT STATUSBAR_GetTipTextW (const STATUS_INFO *infoPtr, INT id, LPWSTR tip, INT size)
 
static COLORREF STATUSBAR_SetBkColor (STATUS_INFO *infoPtr, COLORREF color)
 
static BOOL STATUSBAR_SetIcon (STATUS_INFO *infoPtr, INT nPart, HICON hIcon)
 
static BOOL STATUSBAR_SetMinHeight (STATUS_INFO *infoPtr, INT height)
 
static BOOL STATUSBAR_SetParts (STATUS_INFO *infoPtr, INT count, LPINT parts)
 
static BOOL STATUSBAR_SetTextT (STATUS_INFO *infoPtr, INT nPart, WORD style, LPWSTR text, BOOL isW)
 
static LRESULT STATUSBAR_SetTipTextA (const STATUS_INFO *infoPtr, INT id, LPSTR text)
 
static LRESULT STATUSBAR_SetTipTextW (const STATUS_INFO *infoPtr, INT id, LPWSTR text)
 
static LRESULT STATUSBAR_SetUnicodeFormat (STATUS_INFO *infoPtr, BOOL bUnicode)
 
static BOOL STATUSBAR_Simple (STATUS_INFO *infoPtr, BOOL simple)
 
static LRESULT STATUSBAR_WMDestroy (STATUS_INFO *infoPtr)
 
static LRESULT STATUSBAR_WMCreate (HWND hwnd, const CREATESTRUCTA *lpCreate)
 
static INT STATUSBAR_WMGetText (const STATUS_INFO *infoPtr, INT size, LPWSTR buf)
 
static BOOL STATUSBAR_WMNCHitTest (const STATUS_INFO *infoPtr, INT x, INT y)
 
static LRESULT STATUSBAR_WMPaint (STATUS_INFO *infoPtr, HDC hdc)
 
static LRESULT STATUSBAR_WMSetFont (STATUS_INFO *infoPtr, HFONT font, BOOL redraw)
 
static BOOL STATUSBAR_WMSetText (const STATUS_INFO *infoPtr, LPCSTR text)
 
static BOOL STATUSBAR_WMSize (STATUS_INFO *infoPtr, WORD flags)
 
static LRESULT theme_changed (const STATUS_INFO *infoPtr)
 
static LRESULT STATUSBAR_SendMouseNotify (const STATUS_INFO *infoPtr, UINT code, UINT msg, WPARAM wParam, LPARAM lParam)
 
static LRESULT WINAPI StatusWindowProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 
void STATUS_Register (void)
 
void STATUS_Unregister (void)
 

Variables

static const WCHAR themeClass [] = { 'S','t','a','t','u','s',0 }
 

Macro Definition Documentation

◆ HORZ_BORDER

#define HORZ_BORDER   0

Definition at line 86 of file status.c.

◆ HORZ_GAP

#define HORZ_GAP   2

Definition at line 88 of file status.c.

◆ VERT_BORDER

#define VERT_BORDER   2

Definition at line 87 of file status.c.

Function Documentation

◆ debugstr_t()

static LPCSTR debugstr_t ( LPCWSTR  text,
BOOL  isW 
)
inlinestatic

Definition at line 98 of file status.c.

99 {
100  return isW ? debugstr_w(text) : debugstr_a((LPCSTR)text);
101 }
const WCHAR * text
Definition: package.c:1827
#define debugstr_w
Definition: kernel32.h:32
const char * LPCSTR
Definition: xmlstorage.h:183
#define debugstr_a
Definition: kernel32.h:31
static const WCHAR isW[]
Definition: tokenize.c:59

Referenced by STATUSBAR_SetTextT().

◆ STATUS_Register()

void STATUS_Register ( void  )

Definition at line 1330 of file status.c.

1331 {
1332  WNDCLASSW wndClass;
1333 
1334  ZeroMemory (&wndClass, sizeof(WNDCLASSW));
1335  wndClass.style = CS_GLOBALCLASS | CS_DBLCLKS | CS_VREDRAW;
1336  wndClass.lpfnWndProc = StatusWindowProc;
1337  wndClass.cbClsExtra = 0;
1338  wndClass.cbWndExtra = sizeof(STATUS_INFO *);
1339  wndClass.hCursor = LoadCursorW (0, (LPWSTR)IDC_ARROW);
1340  wndClass.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
1341  wndClass.lpszClassName = STATUSCLASSNAMEW;
1342 
1343  RegisterClassW (&wndClass);
1344 }
#define STATUSCLASSNAMEW
Definition: commctrl.h:1908
UINT style
Definition: winuser.h:3129
static LRESULT WINAPI StatusWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: status.c:1171
#define ZeroMemory
Definition: winbase.h:1635
int cbClsExtra
Definition: winuser.h:3131
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
WNDPROC lpfnWndProc
Definition: winuser.h:3130
LPCWSTR lpszClassName
Definition: winuser.h:3138
#define CS_VREDRAW
Definition: winuser.h:653
int cbWndExtra
Definition: winuser.h:3132
#define CS_GLOBALCLASS
Definition: winuser.h:647
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2074
#define COLOR_BTNFACE
Definition: winuser.h:918
#define CS_DBLCLKS
Definition: winuser.h:646
HCURSOR hCursor
Definition: winuser.h:3135
HBRUSH hbrBackground
Definition: winuser.h:3136
#define IDC_ARROW
Definition: winuser.h:682
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by DllMain().

◆ STATUS_Unregister()

void STATUS_Unregister ( void  )

Definition at line 1354 of file status.c.

1355 {
1357 }
#define STATUSCLASSNAMEW
Definition: commctrl.h:1908
BOOL WINAPI UnregisterClassW(_In_ LPCWSTR, HINSTANCE)
smooth NULL
Definition: ftsmooth.c:416

Referenced by DllMain().

◆ STATUSBAR_ComputeHeight()

static UINT STATUSBAR_ComputeHeight ( STATUS_INFO infoPtr)
static

Definition at line 104 of file status.c.

105 {
106  HTHEME theme;
107  UINT height;
108  TEXTMETRICW tm;
109  int margin;
110 
111  COMCTL32_GetFontMetrics(infoPtr->hFont ? infoPtr->hFont : infoPtr->hDefaultFont, &tm);
112  margin = (tm.tmInternalLeading ? tm.tmInternalLeading : 2);
113  height = max(tm.tmHeight + margin + 2*GetSystemMetrics(SM_CYBORDER), infoPtr->minHeight) + infoPtr->verticalBorder;
114 
115  if ((theme = GetWindowTheme(infoPtr->Self)))
116  {
117  /* Determine bar height from theme such that the content area is
118  * textHeight pixels large */
119  HDC hdc = GetDC(infoPtr->Self);
120  RECT r;
121 
122  SetRect(&r, 0, 0, 0, max(infoPtr->minHeight, tm.tmHeight));
123  if (SUCCEEDED(GetThemeBackgroundExtent(theme, hdc, SP_PANE, 0, &r, &r)))
124  {
125  height = r.bottom - r.top;
126  }
127  ReleaseDC(infoPtr->Self, hdc);
128  }
129 
130  TRACE(" textHeight=%d+%d, final height=%d\n", tm.tmHeight, tm.tmInternalLeading, height);
131  return height;
132 }
#define max(a, b)
Definition: svc.c:63
HDC WINAPI GetDC(_In_opt_ HWND)
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
static HDC
Definition: imagelist.c:92
UINT minHeight
Definition: status.c:66
static HTHEME(WINAPI *pOpenThemeDataEx)(HWND
HFONT hFont
Definition: status.c:69
HFONT hDefaultFont
Definition: status.c:70
HWND Self
Definition: status.c:62
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
void COMCTL32_GetFontMetrics(HFONT hFont, TEXTMETRICW *ptm) DECLSPEC_HIDDEN
Definition: commctrl.c:1721
HRESULT WINAPI GetThemeBackgroundExtent(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pContentRect, RECT *pExtentRect)
Definition: draw.c:1528
#define TRACE(s)
Definition: solgame.cpp:4
int WINAPI GetSystemMetrics(_In_ int)
HTHEME WINAPI GetWindowTheme(HWND hwnd)
Definition: system.c:851
#define SM_CYBORDER
Definition: winuser.h:955
HDC hdc
Definition: main.c:9
Definition: time.h:76
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
unsigned int UINT
Definition: ndis.h:50
INT verticalBorder
Definition: status.c:76
#define SUCCEEDED(hr)
Definition: intsafe.h:57

Referenced by STATUSBAR_SetMinHeight(), STATUSBAR_WMCreate(), and STATUSBAR_WMSetFont().

◆ STATUSBAR_DrawPart()

static void STATUSBAR_DrawPart ( const STATUS_INFO infoPtr,
HDC  hdc,
const STATUSWINDOWPART part,
int  itemID 
)
static

Definition at line 161 of file status.c.

162 {
163  RECT r = part->bound;
165  HTHEME theme = GetWindowTheme (infoPtr->Self);
166  int themePart = SP_PANE;
167  int x = 0;
168 
169  TRACE("part bound %s\n", wine_dbgstr_rect(&r));
170  if (part->style & SBT_POPOUT)
172  else if (part->style & SBT_NOBORDERS)
173  border = 0;
174 
175  if (theme)
176  {
177  if ((GetWindowLongW (infoPtr->Self, GWL_STYLE) & SBARS_SIZEGRIP)
178  && (infoPtr->simple || (itemID == (infoPtr->numParts-1))))
179  themePart = SP_GRIPPERPANE;
180  DrawThemeBackground(theme, hdc, themePart, 0, &r, NULL);
181  }
182  else
184 
185  if (part->hIcon) {
186  INT cy = r.bottom - r.top;
187  DrawIconEx (hdc, r.left + 2, r.top, part->hIcon, cy, cy, 0, 0, DI_NORMAL);
188  x = 2 + cy;
189  }
190 
191  if (part->style & SBT_OWNERDRAW) {
192  DRAWITEMSTRUCT dis;
193 
194  dis.CtlID = GetWindowLongPtrW (infoPtr->Self, GWLP_ID);
195  dis.itemID = itemID;
196  dis.hwndItem = infoPtr->Self;
197  dis.hDC = hdc;
198  dis.rcItem = r;
199  dis.itemData = (ULONG_PTR)part->text;
200  SendMessageW (infoPtr->Notify, WM_DRAWITEM, dis.CtlID, (LPARAM)&dis);
201  } else {
202  r.left += x;
203 #ifdef __REACTOS__
204  if (!theme)
205  {
206  r.left -= 2;
207  DrawStatusTextW (hdc, &r, part->text, SBT_NOBORDERS);
208  }
209  else
210  {
211  r.left += 2;
212  r.right -= 2;
213  DrawThemeText(theme, hdc, SP_PANE, 0, part->text, -1, DT_VCENTER|DT_SINGLELINE|DT_NOPREFIX, 0, &r);
214  }
215 #else
216  DrawStatusTextW (hdc, &r, part->text, SBT_NOBORDERS);
217 #endif
218  }
219 }
#define SBT_POPOUT
Definition: commctrl.h:1944
#define BDR_RAISEDOUTER
Definition: winuser.h:442
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
ULONG_PTR itemData
Definition: winuser.h:3046
static HTHEME(WINAPI *pOpenThemeDataEx)(HWND
WORD numParts
Definition: status.c:64
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define GetWindowLongPtrW
Definition: winuser.h:4698
#define DT_NOPREFIX
Definition: winuser.h:537
HRESULT WINAPI DrawThemeBackground(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pRect, const RECT *pClipRect)
Definition: draw.c:128
int32_t INT
Definition: typedefs.h:56
#define BF_ADJUST
Definition: winuser.h:470
#define BF_RECT
Definition: winuser.h:462
HWND Self
Definition: status.c:62
BOOL WINAPI DrawEdge(_In_ HDC, _Inout_ LPRECT, _In_ UINT, _In_ UINT)
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:570
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
#define DT_VCENTER
Definition: winuser.h:543
#define TRACE(s)
Definition: solgame.cpp:4
#define SBARS_SIZEGRIP
Definition: commctrl.h:1895
BOOL WINAPI DrawIconEx(_In_ HDC, _In_ int, _In_ int, _In_ HICON, _In_ int, _In_ int, _In_ UINT, _In_opt_ HBRUSH, _In_ UINT)
Definition: cursoricon.c:1997
GLint GLint GLsizei GLsizei GLsizei GLint border
Definition: gl.h:1546
const char * wine_dbgstr_rect(const RECT *rect)
HTHEME WINAPI GetWindowTheme(HWND hwnd)
Definition: system.c:851
HDC hdc
Definition: main.c:9
#define DI_NORMAL
Definition: wingdi.h:72
#define BDR_SUNKENOUTER
Definition: winuser.h:443
HICON hIcon
Definition: status.c:57
#define GWL_STYLE
Definition: winuser.h:846
#define DT_SINGLELINE
Definition: winuser.h:540
LPWSTR text
Definition: status.c:56
void WINAPI DrawStatusTextW(HDC hdc, LPCRECT lprc, LPCWSTR text, UINT style)
Definition: commctrl.c:677
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HWND Notify
Definition: status.c:63
unsigned int UINT
Definition: ndis.h:50
#define WM_DRAWITEM
Definition: winuser.h:1627
#define SBT_OWNERDRAW
Definition: commctrl.h:1942
BOOL simple
Definition: status.c:67
#define ULONG_PTR
Definition: config.h:101
#define SBT_NOBORDERS
Definition: commctrl.h:1943
#define GWLP_ID
Definition: winuser.h:854
HRESULT WINAPI DrawThemeText(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, LPCWSTR pszText, int iCharCount, DWORD dwTextFlags, DWORD dwTextFlags2, const RECT *pRect)
Definition: draw.c:1377

Referenced by STATUSBAR_RefreshPart().

◆ STATUSBAR_DrawSizeGrip()

static void STATUSBAR_DrawSizeGrip ( HTHEME  theme,
HDC  hdc,
LPRECT  lpRect 
)
static

Definition at line 135 of file status.c.

136 {
137  RECT rc = *lpRect;
138 
139  TRACE("draw size grip %s\n", wine_dbgstr_rect(lpRect));
140 
141  if (theme)
142  {
143  SIZE gripperSize;
144  if (SUCCEEDED (GetThemePartSize (theme, hdc, SP_GRIPPER, 0, lpRect,
145  TS_DRAW, &gripperSize)))
146  {
147  rc.left = rc.right - gripperSize.cx;
148  rc.top = rc.bottom - gripperSize.cy;
149  if (SUCCEEDED (DrawThemeBackground(theme, hdc, SP_GRIPPER, 0, &rc, NULL)))
150  return;
151  }
152  }
153 
154  rc.left = max( rc.left, rc.right - GetSystemMetrics(SM_CXVSCROLL) - 1 );
155  rc.top = max( rc.top, rc.bottom - GetSystemMetrics(SM_CYHSCROLL) - 1 );
157 }
HRESULT WINAPI GetThemePartSize(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, RECT *prc, THEMESIZE eSize, SIZE *psz)
Definition: draw.c:1777
#define max(a, b)
Definition: svc.c:63
#define SM_CYHSCROLL
Definition: winuser.h:952
LONG top
Definition: windef.h:292
BOOL WINAPI DrawFrameControl(_In_ HDC, _Inout_ LPRECT, _In_ UINT, _In_ UINT)
LONG left
Definition: windef.h:291
LONG right
Definition: windef.h:293
HRESULT WINAPI DrawThemeBackground(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pRect, const RECT *pClipRect)
Definition: draw.c:128
smooth NULL
Definition: ftsmooth.c:416
LONG cx
Definition: windef.h:319
#define TRACE(s)
Definition: solgame.cpp:4
#define DFCS_SCROLLSIZEGRIP
Definition: winuser.h:494
const char * wine_dbgstr_rect(const RECT *rect)
int WINAPI GetSystemMetrics(_In_ int)
HDC hdc
Definition: main.c:9
#define SM_CXVSCROLL
Definition: winuser.h:951
#define DFC_SCROLL
Definition: winuser.h:475
LONG bottom
Definition: windef.h:294
LONG cy
Definition: windef.h:320
#define SUCCEEDED(hr)
Definition: intsafe.h:57

Referenced by STATUSBAR_Refresh().

◆ STATUSBAR_GetBorders()

static BOOL STATUSBAR_GetBorders ( const STATUS_INFO infoPtr,
INT  out[] 
)
static

Definition at line 388 of file status.c.

389 {
390  TRACE("\n");
391  out[0] = infoPtr->horizontalBorder;
392  out[1] = infoPtr->verticalBorder;
393  out[2] = infoPtr->horizontalGap;
394 
395  return TRUE;
396 }
#define TRUE
Definition: types.h:120
INT horizontalGap
Definition: status.c:77
#define TRACE(s)
Definition: solgame.cpp:4
static FILE * out
Definition: regtests2xml.c:44
INT verticalBorder
Definition: status.c:76
INT horizontalBorder
Definition: status.c:75

Referenced by StatusWindowProc().

◆ STATUSBAR_GetIcon()

static HICON STATUSBAR_GetIcon ( const STATUS_INFO infoPtr,
INT  nPart 
)
static

Definition at line 413 of file status.c.

414 {
415  TRACE("%d\n", nPart);
416  /* MSDN says: "simple parts are indexed with -1" */
417  if ((nPart < -1) || (nPart >= infoPtr->numParts))
418  return 0;
419 
420  if (nPart == -1)
421  return (infoPtr->part0.hIcon);
422  else
423  return (infoPtr->parts[nPart].hIcon);
424 }
WORD numParts
Definition: status.c:64
STATUSWINDOWPART part0
Definition: status.c:73
#define TRACE(s)
Definition: solgame.cpp:4
HICON hIcon
Definition: status.c:57
STATUSWINDOWPART * parts
Definition: status.c:74

Referenced by StatusWindowProc().

◆ STATUSBAR_GetParts()

static INT STATUSBAR_GetParts ( const STATUS_INFO infoPtr,
INT  num_parts,
INT  parts[] 
)
static

Definition at line 428 of file status.c.

429 {
430  INT i;
431 
432  TRACE("(%d)\n", num_parts);
433  if (parts) {
434  for (i = 0; i < num_parts; i++) {
435  parts[i] = infoPtr->parts[i].x;
436  }
437  }
438  return infoPtr->numParts;
439 }
WORD numParts
Definition: status.c:64
int32_t INT
Definition: typedefs.h:56
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define TRACE(s)
Definition: solgame.cpp:4
STATUSWINDOWPART * parts
Definition: status.c:74

Referenced by StatusWindowProc().

◆ STATUSBAR_GetRect()

static BOOL STATUSBAR_GetRect ( const STATUS_INFO infoPtr,
INT  nPart,
LPRECT  rect 
)
static

Definition at line 443 of file status.c.

444 {
445  TRACE("part %d\n", nPart);
446  if(nPart >= infoPtr->numParts || nPart < 0)
447  return FALSE;
448  if (infoPtr->simple)
449  *rect = infoPtr->part0.bound;
450  else
451  *rect = infoPtr->parts[nPart].bound;
452  return TRUE;
453 }
#define TRUE
Definition: types.h:120
WORD numParts
Definition: status.c:64
& rect
Definition: startmenu.cpp:1413
STATUSWINDOWPART part0
Definition: status.c:73
#define TRACE(s)
Definition: solgame.cpp:4
STATUSWINDOWPART * parts
Definition: status.c:74
BOOL simple
Definition: status.c:67

Referenced by StatusWindowProc().

◆ STATUSBAR_GetTextA()

static LRESULT STATUSBAR_GetTextA ( STATUS_INFO infoPtr,
INT  nPart,
LPSTR  buf 
)
static

Definition at line 457 of file status.c.

458 {
459  STATUSWINDOWPART *part;
460  LRESULT result;
461 
462  TRACE("part %d\n", nPart);
463 
464  /* MSDN says: "simple parts use index of 0", so this check is ok. */
465  if (nPart < 0 || nPart >= infoPtr->numParts) return 0;
466 
467  if (infoPtr->simple)
468  part = &infoPtr->part0;
469  else
470  part = &infoPtr->parts[nPart];
471 
472  if (part->style & SBT_OWNERDRAW)
473  result = (LRESULT)part->text;
474  else {
475  DWORD len = part->text ? WideCharToMultiByte( CP_ACP, 0, part->text, -1,
476  NULL, 0, NULL, NULL ) - 1 : 0;
477  result = MAKELONG( len, part->style );
478  if (part->text && buf)
479  WideCharToMultiByte( CP_ACP, 0, part->text, -1, buf, len+1, NULL, NULL );
480  }
481  return result;
482 }
#define WideCharToMultiByte
Definition: compat.h:101
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define CP_ACP
Definition: compat.h:99
WORD numParts
Definition: status.c:64
STATUSWINDOWPART part0
Definition: status.c:73
#define MAKELONG(a, b)
Definition: typedefs.h:248
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
unsigned long DWORD
Definition: ntddk_ex.h:95
GLenum GLsizei len
Definition: glext.h:6722
#define LRESULT
Definition: ole.h:14
LPWSTR text
Definition: status.c:56
STATUSWINDOWPART * parts
Definition: status.c:74
#define SBT_OWNERDRAW
Definition: commctrl.h:1942
BOOL simple
Definition: status.c:67
LONG_PTR LRESULT
Definition: windef.h:209
GLuint64EXT * result
Definition: glext.h:11304

Referenced by StatusWindowProc().

◆ STATUSBAR_GetTextLength()

static LRESULT STATUSBAR_GetTextLength ( STATUS_INFO infoPtr,
INT  nPart 
)
static

Definition at line 512 of file status.c.

513 {
514  STATUSWINDOWPART *part;
515  DWORD result;
516 
517  TRACE("part %d\n", nPart);
518 
519  /* MSDN says: "simple parts use index of 0", so this check is ok. */
520  if (nPart < 0 || nPart >= infoPtr->numParts) return 0;
521 
522  if (infoPtr->simple)
523  part = &infoPtr->part0;
524  else
525  part = &infoPtr->parts[nPart];
526 
527  if ((~part->style & SBT_OWNERDRAW) && part->text)
528  result = strlenW(part->text);
529  else
530  result = 0;
531 
532  result |= (part->style << 16);
533  return result;
534 }
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
WORD numParts
Definition: status.c:64
STATUSWINDOWPART part0
Definition: status.c:73
#define TRACE(s)
Definition: solgame.cpp:4
unsigned long DWORD
Definition: ntddk_ex.h:95
LPWSTR text
Definition: status.c:56
STATUSWINDOWPART * parts
Definition: status.c:74
#define SBT_OWNERDRAW
Definition: commctrl.h:1942
BOOL simple
Definition: status.c:67
GLuint64EXT * result
Definition: glext.h:11304

Referenced by StatusWindowProc().

◆ STATUSBAR_GetTextW()

static LRESULT STATUSBAR_GetTextW ( STATUS_INFO infoPtr,
INT  nPart,
LPWSTR  buf 
)
static

Definition at line 486 of file status.c.

487 {
488  STATUSWINDOWPART *part;
489  LRESULT result;
490 
491  TRACE("part %d\n", nPart);
492  if (nPart < 0 || nPart >= infoPtr->numParts) return 0;
493 
494  if (infoPtr->simple)
495  part = &infoPtr->part0;
496  else
497  part = &infoPtr->parts[nPart];
498 
499  if (part->style & SBT_OWNERDRAW)
500  result = (LRESULT)part->text;
501  else {
502  result = part->text ? strlenW (part->text) : 0;
503  result |= (part->style << 16);
504  if (part->text && buf)
505  strcpyW (buf, part->text);
506  }
507  return result;
508 }
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
WORD numParts
Definition: status.c:64
STATUSWINDOWPART part0
Definition: status.c:73
#define TRACE(s)
Definition: solgame.cpp:4
#define LRESULT
Definition: ole.h:14
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:219
LPWSTR text
Definition: status.c:56
STATUSWINDOWPART * parts
Definition: status.c:74
#define SBT_OWNERDRAW
Definition: commctrl.h:1942
BOOL simple
Definition: status.c:67
LONG_PTR LRESULT
Definition: windef.h:209
GLuint64EXT * result
Definition: glext.h:11304

Referenced by StatusWindowProc().

◆ STATUSBAR_GetTipTextA()

static LRESULT STATUSBAR_GetTipTextA ( const STATUS_INFO infoPtr,
INT  id,
LPSTR  tip,
INT  size 
)
static

Definition at line 537 of file status.c.

538 {
539  TRACE("\n");
540  if (tip) {
542  buf[0]='\0';
543 
544  if (infoPtr->hwndToolTip) {
545  TTTOOLINFOA ti;
546  ti.cbSize = sizeof(TTTOOLINFOA);
547  ti.hwnd = infoPtr->Self;
548  ti.uId = id;
549  ti.lpszText = buf;
550  SendMessageA (infoPtr->hwndToolTip, TTM_GETTEXTA, 0, (LPARAM)&ti);
551  }
552  lstrcpynA (tip, buf, size);
553  }
554  return 0;
555 }
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
char CHAR
Definition: xmlstorage.h:175
#define TTM_GETTEXTA
Definition: commctrl.h:1774
HWND Self
Definition: status.c:62
LONG_PTR LPARAM
Definition: windef.h:208
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
UINT_PTR uId
Definition: commctrl.h:1703
#define INFOTIPSIZE
Definition: commctrl.h:124
HWND hwndToolTip
Definition: status.c:68
#define lstrcpynA
Definition: compat.h:408
struct tagTOOLINFOA TTTOOLINFOA
GLenum GLuint id
Definition: glext.h:5579
LPSTR lpszText
Definition: commctrl.h:1706

Referenced by StatusWindowProc().

◆ STATUSBAR_GetTipTextW()

static LRESULT STATUSBAR_GetTipTextW ( const STATUS_INFO infoPtr,
INT  id,
LPWSTR  tip,
INT  size 
)
static

Definition at line 559 of file status.c.

560 {
561  TRACE("\n");
562  if (tip) {
564  buf[0]=0;
565 
566  if (infoPtr->hwndToolTip) {
567  TTTOOLINFOW ti;
568  ti.cbSize = sizeof(TTTOOLINFOW);
569  ti.hwnd = infoPtr->Self;
570  ti.uId = id;
571  ti.lpszText = buf;
572  SendMessageW(infoPtr->hwndToolTip, TTM_GETTEXTW, 0, (LPARAM)&ti);
573  }
574  lstrcpynW(tip, buf, size);
575  }
576 
577  return 0;
578 }
struct tagTOOLINFOW TTTOOLINFOW
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define lstrcpynW
Definition: compat.h:397
LPWSTR lpszText
Definition: commctrl.h:1718
HWND Self
Definition: status.c:62
LONG_PTR LPARAM
Definition: windef.h:208
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
__wchar_t WCHAR
Definition: xmlstorage.h:180
UINT_PTR uId
Definition: commctrl.h:1715
#define TTM_GETTEXTW
Definition: commctrl.h:1775
#define INFOTIPSIZE
Definition: commctrl.h:124
HWND hwndToolTip
Definition: status.c:68
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
GLenum GLuint id
Definition: glext.h:5579

Referenced by StatusWindowProc().

◆ STATUSBAR_InternalHitTest()

static int STATUSBAR_InternalHitTest ( const STATUS_INFO infoPtr,
const POINT pt 
)
static

Definition at line 309 of file status.c.

310 {
311  unsigned int i;
312 
313  if (infoPtr->simple)
314  return 255;
315 
316  for (i = 0; i < infoPtr->numParts; i++)
317  if (pt->x >= infoPtr->parts[i].bound.left && pt->x <= infoPtr->parts[i].bound.right)
318  return i;
319  return -2;
320 }
#define pt(x, y)
Definition: drawing.c:79
WORD numParts
Definition: status.c:64
LONG left
Definition: windef.h:291
LONG right
Definition: windef.h:293
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
STATUSWINDOWPART * parts
Definition: status.c:74
BOOL simple
Definition: status.c:67

Referenced by STATUSBAR_SendMouseNotify().

◆ STATUSBAR_NotifyFormat()

static LRESULT STATUSBAR_NotifyFormat ( STATUS_INFO infoPtr,
HWND  from,
INT  cmd 
)
static

Definition at line 1135 of file status.c.

1136 {
1137  if (cmd == NF_REQUERY) {
1138  INT i = SendMessageW(from, WM_NOTIFYFORMAT, (WPARAM)infoPtr->Self, NF_QUERY);
1139  infoPtr->bUnicode = (i == NFR_UNICODE);
1140  }
1141  return infoPtr->bUnicode ? NFR_UNICODE : NFR_ANSI;
1142 }
Definition: ftp_var.h:139
UINT_PTR WPARAM
Definition: windef.h:207
int32_t INT
Definition: typedefs.h:56
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
HWND Self
Definition: status.c:62
BOOL bUnicode
Definition: status.c:72
#define NFR_UNICODE
Definition: winuser.h:2413
#define NF_REQUERY
Definition: winuser.h:2415
#define NF_QUERY
Definition: winuser.h:2414
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define NFR_ANSI
Definition: winuser.h:2412
CardRegion * from
Definition: spigame.cpp:19

Referenced by STATUSBAR_WMCreate(), and StatusWindowProc().

◆ STATUSBAR_Refresh()

static LRESULT STATUSBAR_Refresh ( STATUS_INFO infoPtr,
HDC  hdc 
)
static

Definition at line 257 of file status.c.

258 {
259  RECT rect;
260  HBRUSH hbrBk;
261  HFONT hOldFont;
262  HTHEME theme;
263 
264  TRACE("\n");
265  if (!IsWindowVisible(infoPtr->Self))
266  return 0;
267 
268  STATUSBAR_SetPartBounds(infoPtr);
269 
270  GetClientRect (infoPtr->Self, &rect);
271 
272  if ((theme = GetWindowTheme (infoPtr->Self)))
273  {
274  DrawThemeBackground(theme, hdc, 0, 0, &rect, NULL);
275  }
276  else
277  {
278  if (infoPtr->clrBk != CLR_DEFAULT)
279  hbrBk = CreateSolidBrush (infoPtr->clrBk);
280  else
281  hbrBk = GetSysColorBrush (COLOR_3DFACE);
282  FillRect(hdc, &rect, hbrBk);
283  if (infoPtr->clrBk != CLR_DEFAULT)
284  DeleteObject (hbrBk);
285  }
286 
287  hOldFont = SelectObject (hdc, infoPtr->hFont ? infoPtr->hFont : infoPtr->hDefaultFont);
288 
289  if (infoPtr->simple) {
290  STATUSBAR_RefreshPart (infoPtr, hdc, &infoPtr->part0, 0);
291  } else {
292  unsigned int i;
293 
294  for (i = 0; i < infoPtr->numParts; i++) {
295  STATUSBAR_RefreshPart (infoPtr, hdc, &infoPtr->parts[i], i);
296  }
297  }
298 
299  SelectObject (hdc, hOldFont);
300 
301  if (GetWindowLongW (infoPtr->Self, GWL_STYLE) & SBARS_SIZEGRIP)
302  STATUSBAR_DrawSizeGrip (theme, hdc, &rect);
303 
304  return 0;
305 }
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1497
static HTHEME(WINAPI *pOpenThemeDataEx)(HWND
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
WORD numParts
Definition: status.c:64
HFONT hFont
Definition: status.c:69
HRESULT WINAPI DrawThemeBackground(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pRect, const RECT *pClipRect)
Definition: draw.c:128
& rect
Definition: startmenu.cpp:1413
STATUSWINDOWPART part0
Definition: status.c:73
HFONT hDefaultFont
Definition: status.c:70
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define COLOR_3DFACE
Definition: winuser.h:919
HWND Self
Definition: status.c:62
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define SBARS_SIZEGRIP
Definition: commctrl.h:1895
static void STATUSBAR_SetPartBounds(STATUS_INFO *infoPtr)
Definition: status.c:324
HTHEME WINAPI GetWindowTheme(HWND hwnd)
Definition: system.c:851
static void STATUSBAR_RefreshPart(const STATUS_INFO *infoPtr, HDC hdc, const STATUSWINDOWPART *part, int itemID)
Definition: status.c:223
HDC hdc
Definition: main.c:9
#define GWL_STYLE
Definition: winuser.h:846
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
STATUSWINDOWPART * parts
Definition: status.c:74
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
#define CLR_DEFAULT
Definition: commctrl.h:305
static void STATUSBAR_DrawSizeGrip(HTHEME theme, HDC hdc, LPRECT lpRect)
Definition: status.c:135
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
BOOL simple
Definition: status.c:67
BOOL WINAPI IsWindowVisible(_In_ HWND)
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
HBRUSH WINAPI GetSysColorBrush(_In_ int)
COLORREF clrBk
Definition: status.c:71

Referenced by STATUSBAR_WMPaint().

◆ STATUSBAR_RefreshPart()

static void STATUSBAR_RefreshPart ( const STATUS_INFO infoPtr,
HDC  hdc,
const STATUSWINDOWPART part,
int  itemID 
)
static

Definition at line 223 of file status.c.

224 {
225  HBRUSH hbrBk;
226  HTHEME theme;
227 
228  TRACE("item %d\n", itemID);
229 
230  if (part->bound.right < part->bound.left) return;
231 
232  if (!RectVisible(hdc, &part->bound))
233  return;
234 
235  if ((theme = GetWindowTheme (infoPtr->Self)))
236  {
237  RECT cr;
238  GetClientRect (infoPtr->Self, &cr);
239  DrawThemeBackground(theme, hdc, 0, 0, &cr, &part->bound);
240  }
241  else
242  {
243  if (infoPtr->clrBk != CLR_DEFAULT)
244  hbrBk = CreateSolidBrush (infoPtr->clrBk);
245  else
246  hbrBk = GetSysColorBrush (COLOR_3DFACE);
247  FillRect(hdc, &part->bound, hbrBk);
248  if (infoPtr->clrBk != CLR_DEFAULT)
249  DeleteObject (hbrBk);
250  }
251 
252  STATUSBAR_DrawPart (infoPtr, hdc, part, itemID);
253 }
static HTHEME(WINAPI *pOpenThemeDataEx)(HWND
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
LONG left
Definition: windef.h:291
LONG right
Definition: windef.h:293
HRESULT WINAPI DrawThemeBackground(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pRect, const RECT *pClipRect)
Definition: draw.c:128
#define COLOR_3DFACE
Definition: winuser.h:919
HWND Self
Definition: status.c:62
#define TRACE(s)
Definition: solgame.cpp:4
HTHEME WINAPI GetWindowTheme(HWND hwnd)
Definition: system.c:851
HDC hdc
Definition: main.c:9
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI RectVisible(_In_ HDC, _In_ LPCRECT)
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
#define CLR_DEFAULT
Definition: commctrl.h:305
int WINAPI FillRect(HDC, LPCRECT, HBRUSH)
HBRUSH WINAPI GetSysColorBrush(_In_ int)
static void STATUSBAR_DrawPart(const STATUS_INFO *infoPtr, HDC hdc, const STATUSWINDOWPART *part, int itemID)
Definition: status.c:161
COLORREF clrBk
Definition: status.c:71

Referenced by STATUSBAR_Refresh().

◆ STATUSBAR_Relay2Tip()

static LRESULT STATUSBAR_Relay2Tip ( const STATUS_INFO infoPtr,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 370 of file status.c.

372 {
373  MSG msg;
374 
375  msg.hwnd = infoPtr->Self;
376  msg.message = uMsg;
377  msg.wParam = wParam;
378  msg.lParam = lParam;
379  msg.time = GetMessageTime ();
380  msg.pt.x = (short)LOWORD(GetMessagePos ());
381  msg.pt.y = (short)HIWORD(GetMessagePos ());
382 
383  return SendMessageW (infoPtr->hwndToolTip, TTM_RELAYEVENT, 0, (LPARAM)&msg);
384 }
#define TTM_RELAYEVENT
Definition: commctrl.h:1764
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
LONG WINAPI GetMessageTime(void)
Definition: message.c:1360
DWORD WINAPI GetMessagePos(void)
Definition: message.c:1350
WPARAM wParam
Definition: combotst.c:138
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
Definition: typeof.h:93
HWND Self
Definition: status.c:62
LONG_PTR LPARAM
Definition: windef.h:208
HWND hwndToolTip
Definition: status.c:68
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define msg(x)
Definition: auth_time.c:54
#define HIWORD(l)
Definition: typedefs.h:246
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82

Referenced by StatusWindowProc().

◆ STATUSBAR_SendMouseNotify()

static LRESULT STATUSBAR_SendMouseNotify ( const STATUS_INFO infoPtr,
UINT  code,
UINT  msg,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 1146 of file status.c.

1147 {
1148  NMMOUSE nm;
1149 
1150  TRACE("code %04x, lParam=%lx\n", code, lParam);
1151  nm.hdr.hwndFrom = infoPtr->Self;
1152  nm.hdr.idFrom = GetWindowLongPtrW(infoPtr->Self, GWLP_ID);
1153  nm.hdr.code = code;
1154  nm.pt.x = (short)LOWORD(lParam);
1155  nm.pt.y = (short)HIWORD(lParam);
1156  nm.dwItemSpec = STATUSBAR_InternalHitTest(infoPtr, &nm.pt);
1157  nm.dwItemData = 0;
1158  nm.dwHitInfo = 0x30000; /* seems constant */
1159 
1160  /* Do default processing if WM_NOTIFY returns zero */
1161  if(!SendMessageW(infoPtr->Notify, WM_NOTIFY, nm.hdr.idFrom, (LPARAM)&nm))
1162  {
1163  return DefWindowProcW(infoPtr->Self, msg, wParam, lParam);
1164  }
1165  return 0;
1166 }
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
#define GetWindowLongPtrW
Definition: winuser.h:4698
WPARAM wParam
Definition: combotst.c:138
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
DWORD_PTR dwItemSpec
Definition: commctrl.h:160
UINT code
Definition: winuser.h:3112
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
Definition: typeof.h:93
HWND Self
Definition: status.c:62
UINT_PTR idFrom
Definition: winuser.h:3111
LONG_PTR LPARAM
Definition: windef.h:208
static int STATUSBAR_InternalHitTest(const STATUS_INFO *infoPtr, const POINT *pt)
Definition: status.c:309
#define TRACE(s)
Definition: solgame.cpp:4
POINT pt
Definition: commctrl.h:162
HWND hwndFrom
Definition: winuser.h:3110
int code
Definition: i386-dis.c:3591
NMHDR hdr
Definition: commctrl.h:159
DWORD_PTR dwItemData
Definition: commctrl.h:161
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HWND Notify
Definition: status.c:63
LPARAM dwHitInfo
Definition: commctrl.h:163
#define msg(x)
Definition: auth_time.c:54
#define HIWORD(l)
Definition: typedefs.h:246
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
#define GWLP_ID
Definition: winuser.h:854
#define WM_NOTIFY
Definition: richedit.h:61

Referenced by StatusWindowProc().

◆ STATUSBAR_SetBkColor()

static COLORREF STATUSBAR_SetBkColor ( STATUS_INFO infoPtr,
COLORREF  color 
)
static

Definition at line 582 of file status.c.

583 {
584  COLORREF oldBkColor;
585 
586  oldBkColor = infoPtr->clrBk;
587  infoPtr->clrBk = color;
588  InvalidateRect(infoPtr->Self, NULL, FALSE);
589 
590  TRACE("CREF: %08x -> %08x\n", oldBkColor, infoPtr->clrBk);
591  return oldBkColor;
592 }
GLuint color
Definition: glext.h:6243
HWND Self
Definition: status.c:62
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
DWORD COLORREF
Definition: windef.h:285
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
COLORREF clrBk
Definition: status.c:71

Referenced by StatusWindowProc().

◆ STATUSBAR_SetBorders()

static BOOL STATUSBAR_SetBorders ( STATUS_INFO infoPtr,
const INT  in[] 
)
static

Definition at line 400 of file status.c.

401 {
402  TRACE("\n");
403  infoPtr->horizontalBorder = in[0];
404  infoPtr->verticalBorder = in[1];
405  infoPtr->horizontalGap = in[2];
406  InvalidateRect(infoPtr->Self, NULL, FALSE);
407 
408  return TRUE;
409 }
#define TRUE
Definition: types.h:120
HWND Self
Definition: status.c:62
INT horizontalGap
Definition: status.c:77
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
GLuint in
Definition: glext.h:9616
INT verticalBorder
Definition: status.c:76
INT horizontalBorder
Definition: status.c:75

Referenced by StatusWindowProc().

◆ STATUSBAR_SetIcon()

static BOOL STATUSBAR_SetIcon ( STATUS_INFO infoPtr,
INT  nPart,
HICON  hIcon 
)
static

Definition at line 596 of file status.c.

597 {
598  if ((nPart < -1) || (nPart >= infoPtr->numParts))
599  return FALSE;
600 
601  TRACE("setting part %d\n", nPart);
602 
603  /* FIXME: MSDN says "if nPart is -1, the status bar is assumed simple" */
604  if (nPart == -1) {
605  if (infoPtr->part0.hIcon == hIcon) /* same as - no redraw */
606  return TRUE;
607  infoPtr->part0.hIcon = hIcon;
608  if (infoPtr->simple)
609  InvalidateRect(infoPtr->Self, &infoPtr->part0.bound, FALSE);
610  } else {
611  if (infoPtr->parts[nPart].hIcon == hIcon) /* same as - no redraw */
612  return TRUE;
613 
614  infoPtr->parts[nPart].hIcon = hIcon;
615  if (!(infoPtr->simple))
616  InvalidateRect(infoPtr->Self, &infoPtr->parts[nPart].bound, FALSE);
617  }
618  return TRUE;
619 }
#define TRUE
Definition: types.h:120
WORD numParts
Definition: status.c:64
STATUSWINDOWPART part0
Definition: status.c:73
HWND Self
Definition: status.c:62
#define TRACE(s)
Definition: solgame.cpp:4
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
HICON hIcon
Definition: status.c:57
STATUSWINDOWPART * parts
Definition: status.c:74
HICON hIcon
Definition: msconfig.c:44
BOOL simple
Definition: status.c:67

Referenced by StatusWindowProc().

◆ STATUSBAR_SetMinHeight()

static BOOL STATUSBAR_SetMinHeight ( STATUS_INFO infoPtr,
INT  height 
)
static

Definition at line 623 of file status.c.

624 {
626  if (ysize & 1) ysize--;
627  infoPtr->minHeight = max(height, ysize);
628  infoPtr->height = STATUSBAR_ComputeHeight(infoPtr);
629  /* like native, don't resize the control */
630  return TRUE;
631 }
#define max(a, b)
Definition: svc.c:63
#define TRUE
Definition: types.h:120
#define SM_CYSIZE
Definition: winuser.h:982
UINT minHeight
Definition: status.c:66
static UINT STATUSBAR_ComputeHeight(STATUS_INFO *infoPtr)
Definition: status.c:104
int WINAPI GetSystemMetrics(_In_ int)
unsigned long DWORD
Definition: ntddk_ex.h:95
UINT height
Definition: status.c:65
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546

Referenced by StatusWindowProc().

◆ STATUSBAR_SetPartBounds()

static void STATUSBAR_SetPartBounds ( STATUS_INFO infoPtr)
static

Definition at line 324 of file status.c.

325 {
326  STATUSWINDOWPART *part;
327  RECT rect, *r;
328  UINT i;
329 
330  /* get our window size */
331  GetClientRect (infoPtr->Self, &rect);
332  TRACE("client wnd size is %s\n", wine_dbgstr_rect(&rect));
333 
334  rect.left += infoPtr->horizontalBorder;
335  rect.top += infoPtr->verticalBorder;
336 
337  /* set bounds for simple rectangle */
338  infoPtr->part0.bound = rect;
339 
340  /* set bounds for non-simple rectangles */
341  for (i = 0; i < infoPtr->numParts; i++) {
342  part = &infoPtr->parts[i];
343  r = &infoPtr->parts[i].bound;
344  r->top = rect.top;
345  r->bottom = rect.bottom;
346  if (i == 0)
347  r->left = 0;
348  else
349  r->left = infoPtr->parts[i-1].bound.right + infoPtr->horizontalGap;
350  if (part->x == -1)
351  r->right = rect.right;
352  else
353  r->right = part->x;
354 
355  if (infoPtr->hwndToolTip) {
356  TTTOOLINFOW ti;
357 
358  ti.cbSize = sizeof(TTTOOLINFOW);
359  ti.hwnd = infoPtr->Self;
360  ti.uId = i;
361  ti.rect = *r;
363  0, (LPARAM)&ti);
364  }
365  }
366 }
struct tagTOOLINFOW TTTOOLINFOW
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
LONG top
Definition: windef.h:292
WORD numParts
Definition: status.c:64
LONG right
Definition: windef.h:293
& rect
Definition: startmenu.cpp:1413
STATUSWINDOWPART part0
Definition: status.c:73
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
HWND Self
Definition: status.c:62
INT horizontalGap
Definition: status.c:77
LONG_PTR LPARAM
Definition: windef.h:208
#define TRACE(s)
Definition: solgame.cpp:4
UINT_PTR uId
Definition: commctrl.h:1715
const char * wine_dbgstr_rect(const RECT *rect)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
STATUSWINDOWPART * parts
Definition: status.c:74
HWND hwndToolTip
Definition: status.c:68
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
unsigned int UINT
Definition: ndis.h:50
INT verticalBorder
Definition: status.c:76
#define TTM_NEWTOOLRECTW
Definition: commctrl.h:1763
INT horizontalBorder
Definition: status.c:75

Referenced by STATUSBAR_Refresh(), STATUSBAR_SetParts(), and STATUSBAR_WMSize().

◆ STATUSBAR_SetParts()

static BOOL STATUSBAR_SetParts ( STATUS_INFO infoPtr,
INT  count,
LPINT  parts 
)
static

Definition at line 635 of file status.c.

636 {
637  STATUSWINDOWPART *tmp;
638  INT i, oldNumParts;
639 
640  TRACE("(%d,%p)\n", count, parts);
641 
642  if(!count) return FALSE;
643 
644  oldNumParts = infoPtr->numParts;
645  infoPtr->numParts = count;
646  if (oldNumParts > infoPtr->numParts) {
647  for (i = infoPtr->numParts ; i < oldNumParts; i++) {
648  if (!(infoPtr->parts[i].style & SBT_OWNERDRAW))
649  Free (infoPtr->parts[i].text);
650  }
651  } else if (oldNumParts < infoPtr->numParts) {
652  tmp = Alloc (sizeof(STATUSWINDOWPART) * infoPtr->numParts);
653  if (!tmp) return FALSE;
654  for (i = 0; i < oldNumParts; i++) {
655  tmp[i] = infoPtr->parts[i];
656  }
657  Free (infoPtr->parts);
658  infoPtr->parts = tmp;
659  }
660  if (oldNumParts == infoPtr->numParts) {
661  for (i=0; i < oldNumParts; i++)
662  if (infoPtr->parts[i].x != parts[i])
663  break;
664  if (i==oldNumParts) /* Unchanged? no need to redraw! */
665  return TRUE;
666  }
667 
668  for (i = 0; i < infoPtr->numParts; i++)
669  infoPtr->parts[i].x = parts[i];
670 
671  if (infoPtr->hwndToolTip) {
672  INT nTipCount;
673  TTTOOLINFOW ti;
674  WCHAR wEmpty = 0;
675 
676  ZeroMemory (&ti, sizeof(TTTOOLINFOW));
677  ti.cbSize = sizeof(TTTOOLINFOW);
678  ti.hwnd = infoPtr->Self;
679  ti.lpszText = &wEmpty;
680 
681  nTipCount = SendMessageW (infoPtr->hwndToolTip, TTM_GETTOOLCOUNT, 0, 0);
682  if (nTipCount < infoPtr->numParts) {
683  /* add tools */
684  for (i = nTipCount; i < infoPtr->numParts; i++) {
685  TRACE("add tool %d\n", i);
686  ti.uId = i;
688  0, (LPARAM)&ti);
689  }
690  }
691  else if (nTipCount > infoPtr->numParts) {
692  /* delete tools */
693  for (i = nTipCount - 1; i >= infoPtr->numParts; i--) {
694  TRACE("delete tool %d\n", i);
695  ti.uId = i;
697  0, (LPARAM)&ti);
698  }
699  }
700  }
701  STATUSBAR_SetPartBounds (infoPtr);
702  InvalidateRect(infoPtr->Self, NULL, FALSE);
703  return TRUE;
704 }
struct tagTOOLINFOW TTTOOLINFOW
#define TRUE
Definition: types.h:120
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define ZeroMemory
Definition: winbase.h:1635
WORD numParts
Definition: status.c:64
int32_t INT
Definition: typedefs.h:56
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION Free
Definition: exfuncs.h:656
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
LPWSTR lpszText
Definition: commctrl.h:1718
HWND Self
Definition: status.c:62
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
#define TRACE(s)
Definition: solgame.cpp:4
if(!(yy_init))
Definition: macro.lex.yy.c:714
__wchar_t WCHAR
Definition: xmlstorage.h:180
UINT_PTR uId
Definition: commctrl.h:1715
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
PVOID Alloc(IN DWORD dwFlags, IN SIZE_T dwBytes)
Definition: main.c:63
static void STATUSBAR_SetPartBounds(STATUS_INFO *infoPtr)
Definition: status.c:324
LPWSTR text
Definition: status.c:56
STATUSWINDOWPART * parts
Definition: status.c:74
#define TTM_ADDTOOLW
Definition: commctrl.h:1759
HWND hwndToolTip
Definition: status.c:68
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define TTM_GETTOOLCOUNT
Definition: commctrl.h:1778
#define SBT_OWNERDRAW
Definition: commctrl.h:1942
#define TTM_DELTOOLW
Definition: commctrl.h:1761

Referenced by StatusWindowProc().

◆ STATUSBAR_SetTextT()

static BOOL STATUSBAR_SetTextT ( STATUS_INFO infoPtr,
INT  nPart,
WORD  style,
LPWSTR  text,
BOOL  isW 
)
static

Definition at line 708 of file status.c.

710 {
711  STATUSWINDOWPART *part=NULL;
712  BOOL changed = FALSE;
713  INT oldStyle;
714 
715  if (style & SBT_OWNERDRAW) {
716  TRACE("part %d, text %p\n",nPart,text);
717  }
718  else TRACE("part %d, text %s\n", nPart, debugstr_t(text, isW));
719 
720  /* MSDN says: "If the parameter is set to SB_SIMPLEID (255), the status
721  * window is assumed to be a simple window */
722 
723  if (nPart == 0x00ff) {
724  part = &infoPtr->part0;
725  } else {
726  if (infoPtr->parts && nPart >= 0 && nPart < infoPtr->numParts) {
727  part = &infoPtr->parts[nPart];
728  }
729  }
730  if (!part) return FALSE;
731 
732  if (part->style != style)
733  changed = TRUE;
734 
735  oldStyle = part->style;
736  part->style = style;
737  if (style & SBT_OWNERDRAW) {
738  if (!(oldStyle & SBT_OWNERDRAW))
739  Free (part->text);
740  part->text = text;
741  } else {
742  LPWSTR ntext;
743  WCHAR *idx;
744 
745  if (text && !isW) {
746  LPCSTR atxt = (LPCSTR)text;
747  DWORD len = MultiByteToWideChar( CP_ACP, 0, atxt, -1, NULL, 0 );
748  ntext = Alloc( (len + 1)*sizeof(WCHAR) );
749  if (!ntext) return FALSE;
750  MultiByteToWideChar( CP_ACP, 0, atxt, -1, ntext, len );
751  } else if (text) {
752  ntext = Alloc( (strlenW(text) + 1)*sizeof(WCHAR) );
753  if (!ntext) return FALSE;
754  strcpyW (ntext, text);
755  } else ntext = 0;
756 
757  /* replace nonprintable characters with spaces */
758  if (ntext) {
759  idx = ntext;
760  while (*idx) {
761  if(!isprintW(*idx))
762  *idx = ' ';
763  idx++;
764  }
765  }
766 
767  /* check if text is unchanged -> no need to redraw */
768  if (text) {
769  if (!changed && part->text && !lstrcmpW(ntext, part->text)) {
770  Free(ntext);
771  return TRUE;
772  }
773  } else {
774  if (!changed && !part->text)
775  return TRUE;
776  }
777 
778  if (!(oldStyle & SBT_OWNERDRAW))
779  Free (part->text);
780  part->text = ntext;
781  }
782  InvalidateRect(infoPtr->Self, &part->bound, FALSE);
783  UpdateWindow(infoPtr->Self);
784 
785  return TRUE;
786 }
#define TRUE
Definition: types.h:120
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
const WCHAR * text
Definition: package.c:1827
#define CP_ACP
Definition: compat.h:99
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:170
static LPCSTR debugstr_t(LPCWSTR text, BOOL isW)
Definition: status.c:98
BOOL WINAPI UpdateWindow(_In_ HWND)
int32_t INT
Definition: typedefs.h:56
WINE_UNICODE_INLINE int isprintW(WCHAR wc)
Definition: unicode.h:205
STATUSWINDOWPART part0
Definition: status.c:73
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION Free
Definition: exfuncs.h:656
unsigned int BOOL
Definition: ntddk_ex.h:94
HWND Self
Definition: status.c:62
unsigned int idx
Definition: utils.c:41
smooth NULL
Definition: ftsmooth.c:416
const char * LPCSTR
Definition: xmlstorage.h:183
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
PVOID Alloc(IN DWORD dwFlags, IN SIZE_T dwBytes)
Definition: main.c:63
unsigned long DWORD
Definition: ntddk_ex.h:95
static const WCHAR isW[]
Definition: tokenize.c:59
GLenum GLsizei len
Definition: glext.h:6722
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:219
LPWSTR text
Definition: status.c:56
STATUSWINDOWPART * parts
Definition: status.c:74
#define MultiByteToWideChar
Definition: compat.h:100
#define SBT_OWNERDRAW
Definition: commctrl.h:1942
WCHAR * LPWSTR
Definition: xmlstorage.h:184
Arabic default style
Definition: afstyles.h:93

Referenced by StatusWindowProc().

◆ STATUSBAR_SetTipTextA()

static LRESULT STATUSBAR_SetTipTextA ( const STATUS_INFO infoPtr,
INT  id,
LPSTR  text 
)
static

Definition at line 790 of file status.c.

791 {
792  TRACE("part %d: \"%s\"\n", id, text);
793  if (infoPtr->hwndToolTip) {
794  TTTOOLINFOA ti;
795  ti.cbSize = sizeof(TTTOOLINFOA);
796  ti.hwnd = infoPtr->Self;
797  ti.uId = id;
798  ti.hinst = 0;
799  ti.lpszText = text;
800  SendMessageA (infoPtr->hwndToolTip, TTM_UPDATETIPTEXTA, 0, (LPARAM)&ti);
801  }
802 
803  return 0;
804 }
#define TTM_UPDATETIPTEXTA
Definition: commctrl.h:1776
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
const WCHAR * text
Definition: package.c:1827
HINSTANCE hinst
Definition: commctrl.h:1705
HWND Self
Definition: status.c:62
LONG_PTR LPARAM
Definition: windef.h:208
#define TRACE(s)
Definition: solgame.cpp:4
UINT_PTR uId
Definition: commctrl.h:1703
HWND hwndToolTip
Definition: status.c:68
struct tagTOOLINFOA TTTOOLINFOA
GLenum GLuint id
Definition: glext.h:5579
LPSTR lpszText
Definition: commctrl.h:1706

Referenced by StatusWindowProc().

◆ STATUSBAR_SetTipTextW()

static LRESULT STATUSBAR_SetTipTextW ( const STATUS_INFO infoPtr,
INT  id,
LPWSTR  text 
)
static

Definition at line 808 of file status.c.

809 {
810  TRACE("part %d: \"%s\"\n", id, debugstr_w(text));
811  if (infoPtr->hwndToolTip) {
812  TTTOOLINFOW ti;
813  ti.cbSize = sizeof(TTTOOLINFOW);
814  ti.hwnd = infoPtr->Self;
815  ti.uId = id;
816  ti.hinst = 0;
817  ti.lpszText = text;
818  SendMessageW (infoPtr->hwndToolTip, TTM_UPDATETIPTEXTW, 0, (LPARAM)&ti);
819  }
820 
821  return 0;
822 }
struct tagTOOLINFOW TTTOOLINFOW
const WCHAR * text
Definition: package.c:1827
LPWSTR lpszText
Definition: commctrl.h:1718
HWND Self
Definition: status.c:62
#define debugstr_w
Definition: kernel32.h:32
LONG_PTR LPARAM
Definition: windef.h:208
#define TRACE(s)
Definition: solgame.cpp:4
#define TTM_UPDATETIPTEXTW
Definition: commctrl.h:1777
UINT_PTR uId
Definition: commctrl.h:1715
HINSTANCE hinst
Definition: commctrl.h:1717
HWND hwndToolTip
Definition: status.c:68
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
GLenum GLuint id
Definition: glext.h:5579

Referenced by StatusWindowProc().

◆ STATUSBAR_SetUnicodeFormat()

static LRESULT STATUSBAR_SetUnicodeFormat ( STATUS_INFO infoPtr,
BOOL  bUnicode 
)
inlinestatic

Definition at line 826 of file status.c.

827 {
828  BOOL bOld = infoPtr->bUnicode;
829 
830  TRACE("(0x%x)\n", bUnicode);
831  infoPtr->bUnicode = bUnicode;
832 
833  return bOld;
834 }
unsigned int BOOL
Definition: ntddk_ex.h:94
BOOL bUnicode
Definition: status.c:72
#define TRACE(s)
Definition: solgame.cpp:4

Referenced by StatusWindowProc().

◆ STATUSBAR_Simple()

static BOOL STATUSBAR_Simple ( STATUS_INFO infoPtr,
BOOL  simple 
)
static

Definition at line 838 of file status.c.

839 {
840  NMHDR nmhdr;
841 
842  TRACE("(simple=%d)\n", simple);
843  if (infoPtr->simple == simple) /* no need to change */
844  return TRUE;
845 
846  infoPtr->simple = simple;
847 
848  /* send notification */
849  nmhdr.hwndFrom = infoPtr->Self;
850  nmhdr.idFrom = GetWindowLongPtrW (infoPtr->Self, GWLP_ID);
851  nmhdr.code = SBN_SIMPLEMODECHANGE;
852  SendMessageW (infoPtr->Notify, WM_NOTIFY, 0, (LPARAM)&nmhdr);
853  InvalidateRect(infoPtr->Self, NULL, FALSE);
854  return TRUE;
855 }
#define TRUE
Definition: types.h:120
#define GetWindowLongPtrW
Definition: winuser.h:4698
UINT code
Definition: winuser.h:3112
HWND Self
Definition: status.c:62
UINT_PTR idFrom
Definition: winuser.h:3111
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
#define TRACE(s)
Definition: solgame.cpp:4
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
HWND hwndFrom
Definition: winuser.h:3110
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HWND Notify
Definition: status.c:63
BOOL simple
Definition: status.c:67
#define SBN_SIMPLEMODECHANGE
Definition: commctrl.h:1950
#define GWLP_ID
Definition: winuser.h:854
#define WM_NOTIFY
Definition: richedit.h:61

Referenced by StatusWindowProc().

◆ STATUSBAR_WMCreate()

static LRESULT STATUSBAR_WMCreate ( HWND  hwnd,
const CREATESTRUCTA lpCreate 
)
static

Definition at line 889 of file status.c.

890 {
891  STATUS_INFO *infoPtr;
892  NONCLIENTMETRICSW nclm;
893  DWORD dwStyle;
894  RECT rect;
895  int len;
896 
897  TRACE("\n");
898  infoPtr = Alloc (sizeof(STATUS_INFO));
899  if (!infoPtr) goto create_fail;
900  SetWindowLongPtrW (hwnd, 0, (DWORD_PTR)infoPtr);
901 
902  infoPtr->Self = hwnd;
903  infoPtr->Notify = lpCreate->hwndParent;
904  infoPtr->numParts = 1;
905  infoPtr->parts = 0;
906  infoPtr->simple = FALSE;
907  infoPtr->clrBk = CLR_DEFAULT;
908  infoPtr->hFont = 0;
909  infoPtr->horizontalBorder = HORZ_BORDER;
910  infoPtr->verticalBorder = VERT_BORDER;
911  infoPtr->horizontalGap = HORZ_GAP;
913  if (infoPtr->minHeight & 1) infoPtr->minHeight--;
914 
915  STATUSBAR_NotifyFormat(infoPtr, infoPtr->Notify, NF_REQUERY);
916 
917  ZeroMemory (&nclm, sizeof(nclm));
918  nclm.cbSize = sizeof(nclm);
919  SystemParametersInfoW (SPI_GETNONCLIENTMETRICS, nclm.cbSize, &nclm, 0);
920  infoPtr->hDefaultFont = CreateFontIndirectW (&nclm.lfStatusFont);
921 
922  GetClientRect (hwnd, &rect);
923 
924  /* initialize simple case */
925  infoPtr->part0.bound = rect;
926  infoPtr->part0.text = 0;
927  infoPtr->part0.x = 0;
928  infoPtr->part0.style = 0;
929  infoPtr->part0.hIcon = 0;
930 
931  /* initialize first part */
932  infoPtr->parts = Alloc (sizeof(STATUSWINDOWPART));
933  if (!infoPtr->parts) goto create_fail;
934  infoPtr->parts[0].bound = rect;
935  infoPtr->parts[0].text = 0;
936  infoPtr->parts[0].x = -1;
937  infoPtr->parts[0].style = 0;
938  infoPtr->parts[0].hIcon = 0;
939 
941 
942  if (lpCreate->lpszName && (len = strlenW ((LPCWSTR)lpCreate->lpszName)))
943  {
944  infoPtr->parts[0].text = Alloc ((len + 1)*sizeof(WCHAR));
945  if (!infoPtr->parts[0].text) goto create_fail;
946  strcpyW (infoPtr->parts[0].text, (LPCWSTR)lpCreate->lpszName);
947  }
948 
949  dwStyle = GetWindowLongW (hwnd, GWL_STYLE);
950  /* native seems to clear WS_BORDER, too */
951  dwStyle &= ~WS_BORDER;
952  SetWindowLongW (hwnd, GWL_STYLE, dwStyle);
953 
954  infoPtr->height = STATUSBAR_ComputeHeight(infoPtr);
955 
956  if (dwStyle & SBT_TOOLTIPS) {
957  infoPtr->hwndToolTip =
960  CW_USEDEFAULT, hwnd, 0,
962 
963  if (infoPtr->hwndToolTip) {
964  NMTOOLTIPSCREATED nmttc;
965 
966  nmttc.hdr.hwndFrom = hwnd;
968  nmttc.hdr.code = NM_TOOLTIPSCREATED;
969  nmttc.hwndToolTips = infoPtr->hwndToolTip;
970 
971  SendMessageW (lpCreate->hwndParent, WM_NOTIFY, nmttc.hdr.idFrom, (LPARAM)&nmttc);
972  }
973  }
974 
975  return 0;
976 
977 create_fail:
978  TRACE(" failed!\n");
979  if (infoPtr) STATUSBAR_WMDestroy(infoPtr);
980  return -1;
981 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define HORZ_GAP
Definition: status.c:88
#define SM_CYSIZE
Definition: winuser.h:982
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
static LRESULT STATUSBAR_NotifyFormat(STATUS_INFO *infoPtr, HWND from, INT cmd)
Definition: status.c:1135
#define SBT_TOOLTIPS
Definition: commctrl.h:1897
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
UINT minHeight
Definition: status.c:66
#define ZeroMemory
Definition: winbase.h:1635
WORD numParts
Definition: status.c:64
#define GetWindowLongPtrW
Definition: winuser.h:4698
HFONT hFont
Definition: status.c:69
& rect
Definition: startmenu.cpp:1413
STATUSWINDOWPART part0
Definition: status.c:73
HFONT hDefaultFont
Definition: status.c:70
#define VERT_BORDER
Definition: status.c:87
LPCSTR lpszName
Definition: winuser.h:2902
UINT code
Definition: winuser.h:3112
#define TTS_ALWAYSTIP
Definition: commctrl.h:1729
HWND Self
Definition: status.c:62
LONG WINAPI SetWindowLongW(_In_ HWND, _In_ int, _In_ LONG)
INT horizontalGap
Definition: status.c:77
UINT_PTR idFrom
Definition: winuser.h:3111
#define CW_USEDEFAULT
Definition: winuser.h:225
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
smooth NULL
Definition: ftsmooth.c:416
HFONT WINAPI CreateFontIndirectW(_In_ const LOGFONTW *)
static LRESULT STATUSBAR_WMDestroy(STATUS_INFO *infoPtr)
Definition: status.c:859
LONG_PTR LPARAM
Definition: windef.h:208
BOOL WINAPI SystemParametersInfoW(_In_ UINT, _In_ UINT, _Inout_opt_ PVOID, _In_ UINT)
#define TRACE(s)
Definition: solgame.cpp:4
static UINT STATUSBAR_ComputeHeight(STATUS_INFO *infoPtr)
Definition: status.c:104
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define NF_REQUERY
Definition: winuser.h:2415
PVOID Alloc(IN DWORD dwFlags, IN SIZE_T dwBytes)
Definition: main.c:63
int WINAPI GetSystemMetrics(_In_ int)
unsigned long DWORD
Definition: ntddk_ex.h:95
UINT height
Definition: status.c:65
HTHEME WINAPI OpenThemeData(HWND hwnd, LPCWSTR classlist)
Definition: system.c:835
#define TOOLTIPS_CLASSW
Definition: commctrl.h:1679
HWND WINAPI CreateWindowExW(_In_ DWORD dwExStyle, _In_opt_ LPCWSTR lpClassName, _In_opt_ LPCWSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
GLenum GLsizei len
Definition: glext.h:6722
static const WCHAR themeClass[]
Definition: status.c:90
HWND hwndFrom
Definition: winuser.h:3110
uint32_t DWORD_PTR
Definition: typedefs.h:63
HICON hIcon
Definition: status.c:57
#define GWL_STYLE
Definition: winuser.h:846
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:219
#define WS_BORDER
Definition: pedump.c:625
LPWSTR text
Definition: status.c:56
STATUSWINDOWPART * parts
Definition: status.c:74
HWND hwndToolTip
Definition: status.c:68
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HWND Notify
Definition: status.c:63
#define WS_POPUP
Definition: pedump.c:616
#define CLR_DEFAULT
Definition: commctrl.h:305
#define HORZ_BORDER
Definition: status.c:86
#define GWLP_HINSTANCE
Definition: winuser.h:850
INT verticalBorder
Definition: status.c:76
BOOL simple
Definition: status.c:67
#define SetWindowLongPtrW
Definition: winuser.h:5215
#define NM_TOOLTIPSCREATED
Definition: commctrl.h:144
COLORREF clrBk
Definition: status.c:71
INT horizontalBorder
Definition: status.c:75
#define GWLP_ID
Definition: winuser.h:854
#define WM_NOTIFY
Definition: richedit.h:61

Referenced by StatusWindowProc().

◆ STATUSBAR_WMDestroy()

static LRESULT STATUSBAR_WMDestroy ( STATUS_INFO infoPtr)
static

Definition at line 859 of file status.c.

860 {
861  unsigned int i;
862 
863  TRACE("\n");
864  for (i = 0; i < infoPtr->numParts; i++) {
865  if (!(infoPtr->parts[i].style & SBT_OWNERDRAW))
866  Free (infoPtr->parts[i].text);
867  }
868  if (!(infoPtr->part0.style & SBT_OWNERDRAW))
869  Free (infoPtr->part0.text);
870  Free (infoPtr->parts);
871 
872  /* delete default font */
873  if (infoPtr->hDefaultFont)
874  DeleteObject (infoPtr->hDefaultFont);
875 
876  /* delete tool tip control */
877  if (infoPtr->hwndToolTip)
878  DestroyWindow (infoPtr->hwndToolTip);
879 
880  CloseThemeData (GetWindowTheme (infoPtr->Self));
881 
882  SetWindowLongPtrW(infoPtr->Self, 0, 0);
883  Free (infoPtr);
884  return 0;
885 }
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
WORD numParts
Definition: status.c:64
BOOL WINAPI DestroyWindow(_In_ HWND)
STATUSWINDOWPART part0
Definition: status.c:73
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION Free
Definition: exfuncs.h:656
HFONT hDefaultFont
Definition: status.c:70
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
HWND Self
Definition: status.c:62
#define TRACE(s)
Definition: solgame.cpp:4
HTHEME WINAPI GetWindowTheme(HWND hwnd)
Definition: system.c:851
LPWSTR text
Definition: status.c:56
STATUSWINDOWPART * parts
Definition: status.c:74
HWND hwndToolTip
Definition: status.c:68
#define SBT_OWNERDRAW
Definition: commctrl.h:1942
#define SetWindowLongPtrW
Definition: winuser.h:5215
HRESULT WINAPI CloseThemeData(HTHEME hTheme)
Definition: system.c:950

Referenced by STATUSBAR_WMCreate(), and StatusWindowProc().

◆ STATUSBAR_WMGetText()

static INT STATUSBAR_WMGetText ( const STATUS_INFO infoPtr,
INT  size,
LPWSTR  buf 
)
static

Definition at line 987 of file status.c.

988 {
989  INT len;
990 
991  TRACE("\n");
992  if (!(infoPtr->parts[0].text))
993  return 0;
994 
995  len = strlenW (infoPtr->parts[0].text);
996 
997  if (!size)
998  return len;
999  else if (size > len) {
1000  strcpyW (buf, infoPtr->parts[0].text);
1001  return len;
1002  }
1003  else {
1004  memcpy (buf, infoPtr->parts[0].text, (size - 1) * sizeof(WCHAR));
1005  buf[size - 1] = 0;
1006  return size - 1;
1007  }
1008 }
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
int32_t INT
Definition: typedefs.h:56
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum GLsizei len
Definition: glext.h:6722
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:219
LPWSTR text
Definition: status.c:56
STATUSWINDOWPART * parts
Definition: status.c:74

Referenced by StatusWindowProc().

◆ STATUSBAR_WMNCHitTest()

static BOOL STATUSBAR_WMNCHitTest ( const STATUS_INFO infoPtr,
INT  x,
INT  y 
)
static

Definition at line 1012 of file status.c.

1013 {
1014  if (GetWindowLongW (infoPtr->Self, GWL_STYLE) & SBARS_SIZEGRIP) {
1015  RECT rect;
1016  POINT pt;
1017 
1018  GetClientRect (infoPtr->Self, &rect);
1019 
1020  pt.x = x;
1021  pt.y = y;
1022  ScreenToClient (infoPtr->Self, &pt);
1023 
1024  rect.left = rect.right - 13;
1025  rect.top += 2;
1026 
1027  if (PtInRect (&rect, pt))
1028  {
1029  if (GetWindowLongW( infoPtr->Self, GWL_EXSTYLE ) & WS_EX_LAYOUTRTL) return HTBOTTOMLEFT;
1030  else return HTBOTTOMRIGHT;
1031  }
1032  }
1033 
1034  return HTERROR;
1035 }
#define pt(x, y)
Definition: drawing.c:79
#define WS_EX_LAYOUTRTL
Definition: winuser.h:390
#define GWL_EXSTYLE
Definition: winuser.h:845
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define HTBOTTOMLEFT
Definition: winuser.h:2448
& rect
Definition: startmenu.cpp:1413
HWND Self
Definition: status.c:62
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
#define HTERROR
Definition: winuser.h:2426
#define SBARS_SIZEGRIP
Definition: commctrl.h:1895
#define HTBOTTOMRIGHT
Definition: winuser.h:2449
#define GWL_STYLE
Definition: winuser.h:846
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
BOOL WINAPI PtInRect(_In_ LPCRECT, _In_ POINT)
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)

Referenced by StatusWindowProc().

◆ STATUSBAR_WMPaint()

static LRESULT STATUSBAR_WMPaint ( STATUS_INFO infoPtr,
HDC  hdc 
)
static

Definition at line 1039 of file status.c.

1040 {
1041  PAINTSTRUCT ps;
1042 
1043  TRACE("\n");
1044  if (hdc) return STATUSBAR_Refresh (infoPtr, hdc);
1045  hdc = BeginPaint (infoPtr->Self, &ps);
1046  STATUSBAR_Refresh (infoPtr, hdc);
1047  EndPaint (infoPtr->Self, &ps);
1048 
1049  return 0;
1050 }
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
HWND Self
Definition: status.c:62
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
#define TRACE(s)
Definition: solgame.cpp:4
HDC hdc
Definition: main.c:9
static LRESULT STATUSBAR_Refresh(STATUS_INFO *infoPtr, HDC hdc)
Definition: status.c:257

Referenced by StatusWindowProc().

◆ STATUSBAR_WMSetFont()

static LRESULT STATUSBAR_WMSetFont ( STATUS_INFO infoPtr,
HFONT  font,
BOOL  redraw 
)
static

Definition at line 1054 of file status.c.

1055 {
1056  infoPtr->hFont = font;
1057  TRACE("%p\n", infoPtr->hFont);
1058 
1059  infoPtr->height = STATUSBAR_ComputeHeight(infoPtr);
1060  SendMessageW(infoPtr->Self, WM_SIZE, 0, 0); /* update size */
1061  if (redraw)
1062  InvalidateRect(infoPtr->Self, NULL, FALSE);
1063 
1064  return 0;
1065 }
Definition: mk_font.cpp:20
HFONT hFont
Definition: status.c:69
HWND Self
Definition: status.c:62
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
static UINT STATUSBAR_ComputeHeight(STATUS_INFO *infoPtr)
Definition: status.c:104
#define WM_SIZE
Definition: winuser.h:1593
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
UINT height
Definition: status.c:65
void redraw(int x, int y, int cx, int cy)
Definition: qtewin.cpp:1248
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)

Referenced by StatusWindowProc().

◆ STATUSBAR_WMSetText()

static BOOL STATUSBAR_WMSetText ( const STATUS_INFO infoPtr,
LPCSTR  text 
)
static

Definition at line 1069 of file status.c.

1070 {
1071  STATUSWINDOWPART *part;
1072  int len;
1073 
1074  TRACE("\n");
1075  if (infoPtr->numParts == 0)
1076  return FALSE;
1077 
1078  part = &infoPtr->parts[0];
1079  /* duplicate string */
1080  Free (part->text);
1081  part->text = 0;
1082 
1083  if (text && (len = strlenW((LPCWSTR)text))) {
1084  part->text = Alloc ((len+1)*sizeof(WCHAR));
1085  if (!part->text) return FALSE;
1086  strcpyW (part->text, (LPCWSTR)text);
1087  }
1088 
1089  InvalidateRect(infoPtr->Self, &part->bound, FALSE);
1090 
1091  return TRUE;
1092 }
#define TRUE
Definition: types.h:120
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
const WCHAR * text
Definition: package.c:1827
WORD numParts
Definition: status.c:64
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION Free
Definition: exfuncs.h:656
HWND Self
Definition: status.c:62
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
PVOID Alloc(IN DWORD dwFlags, IN SIZE_T dwBytes)
Definition: main.c:63
GLenum GLsizei len
Definition: glext.h:6722
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:219
LPWSTR text
Definition: status.c:56
STATUSWINDOWPART * parts
Definition: status.c:74

Referenced by StatusWindowProc().

◆ STATUSBAR_WMSize()

static BOOL STATUSBAR_WMSize ( STATUS_INFO infoPtr,
WORD  flags 
)
static

Definition at line 1096 of file status.c.

1097 {
1098  INT width, x, y;
1099  RECT parent_rect;
1100 
1101  /* Need to resize width to match parent */
1102  TRACE("flags %04x\n", flags);
1103 
1104  if (flags != SIZE_RESTORED && flags != SIZE_MAXIMIZED) {
1105  WARN("flags MUST be SIZE_RESTORED or SIZE_MAXIMIZED\n");
1106  return FALSE;
1107  }
1108 
1109  if (GetWindowLongW(infoPtr->Self, GWL_STYLE) & CCS_NORESIZE) return FALSE;
1110 
1111  /* width and height don't apply */
1112  if (!GetClientRect (infoPtr->Notify, &parent_rect))
1113  return FALSE;
1114 
1115  width = parent_rect.right - parent_rect.left;
1116  x = parent_rect.left;
1117  y = parent_rect.bottom - infoPtr->height;
1118  MoveWindow (infoPtr->Self, x, y, width, infoPtr->height, TRUE);
1119  STATUSBAR_SetPartBounds (infoPtr);
1120  return TRUE;
1121 }
GLint GLint GLsizei width
Definition: gl.h:1546
#define TRUE
Definition: types.h:120
#define SIZE_MAXIMIZED
Definition: winuser.h:2461
#define WARN(fmt,...)
Definition: debug.h:111
#define SIZE_RESTORED
Definition: winuser.h:2459
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
LONG left
Definition: windef.h:291
LONG right
Definition: windef.h:293
int32_t INT
Definition: typedefs.h:56
HWND Self
Definition: status.c:62
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
#define TRACE(s)
Definition: solgame.cpp:4
static void STATUSBAR_SetPartBounds(STATUS_INFO *infoPtr)
Definition: status.c:324
UINT height
Definition: status.c:65
GLbitfield flags
Definition: glext.h:7161
#define CCS_NORESIZE
Definition: commctrl.h:2217
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)
#define GWL_STYLE
Definition: winuser.h:846
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
HWND Notify
Definition: status.c:63
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
LONG bottom
Definition: windef.h:294

Referenced by StatusWindowProc().

◆ StatusWindowProc()

static LRESULT WINAPI StatusWindowProc ( HWND  hwnd,
UINT  msg,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 1171 of file status.c.

1172 {
1173  STATUS_INFO *infoPtr = (STATUS_INFO *)GetWindowLongPtrW (hwnd, 0);
1174  INT nPart = ((INT) wParam) & 0x00ff;
1175  LRESULT res;
1176 
1177  TRACE("hwnd=%p msg=%x wparam=%lx lparam=%lx\n", hwnd, msg, wParam, lParam);
1178  if (!infoPtr && msg != WM_CREATE)
1179  return DefWindowProcW (hwnd, msg, wParam, lParam);
1180 
1181  switch (msg) {
1182  case SB_GETBORDERS:
1183  return STATUSBAR_GetBorders (infoPtr, (INT *)lParam);
1184 
1185  case SB_GETICON:
1186  return (LRESULT)STATUSBAR_GetIcon (infoPtr, nPart);
1187 
1188  case SB_GETPARTS:
1189  return STATUSBAR_GetParts (infoPtr, (INT)wParam, (INT *)lParam);
1190 
1191  case SB_GETRECT:
1192  return STATUSBAR_GetRect (infoPtr, nPart, (LPRECT)lParam);
1193 
1194  case SB_GETTEXTA:
1195  return STATUSBAR_GetTextA (infoPtr, nPart, (LPSTR)lParam);
1196 
1197  case SB_GETTEXTW:
1198  return STATUSBAR_GetTextW (infoPtr, nPart, (LPWSTR)lParam);
1199 
1200  case SB_GETTEXTLENGTHA:
1201  case SB_GETTEXTLENGTHW:
1202  return STATUSBAR_GetTextLength (infoPtr, nPart);
1203 
1204  case SB_GETTIPTEXTA:
1205  return STATUSBAR_GetTipTextA (infoPtr, LOWORD(wParam), (LPSTR)lParam, HIWORD(wParam));
1206 
1207  case SB_GETTIPTEXTW:
1208  return STATUSBAR_GetTipTextW (infoPtr, LOWORD(wParam), (LPWSTR)lParam, HIWORD(wParam));
1209 
1210  case SB_GETUNICODEFORMAT:
1211  return infoPtr->bUnicode;
1212 
1213  case SB_ISSIMPLE:
1214  return infoPtr->simple;
1215 
1216  case SB_SETBORDERS:
1217  return STATUSBAR_SetBorders (infoPtr, (INT *)lParam);
1218 
1219  case SB_SETBKCOLOR:
1220  return STATUSBAR_SetBkColor (infoPtr, (COLORREF)lParam);
1221 
1222  case SB_SETICON:
1223  return STATUSBAR_SetIcon (infoPtr, nPart, (HICON)lParam);
1224 
1225  case SB_SETMINHEIGHT:
1226  return STATUSBAR_SetMinHeight (infoPtr, (INT)wParam);
1227 
1228  case SB_SETPARTS:
1229  return STATUSBAR_SetParts (infoPtr, (INT)wParam, (LPINT)lParam);
1230 
1231  case SB_SETTEXTA:
1232  return STATUSBAR_SetTextT (infoPtr, nPart, wParam & 0xff00, (LPWSTR)lParam, FALSE);
1233 
1234  case SB_SETTEXTW:
1235  return STATUSBAR_SetTextT (infoPtr, nPart, wParam & 0xff00, (LPWSTR)lParam, TRUE);
1236 
1237  case SB_SETTIPTEXTA:
1238  return STATUSBAR_SetTipTextA (infoPtr, (INT)wParam, (LPSTR)lParam);
1239 
1240  case SB_SETTIPTEXTW:
1241  return STATUSBAR_SetTipTextW (infoPtr, (INT)wParam, (LPWSTR)lParam);
1242 
1243  case SB_SETUNICODEFORMAT:
1244  return STATUSBAR_SetUnicodeFormat (infoPtr, (BOOL)wParam);
1245 
1246  case SB_SIMPLE:
1247  return STATUSBAR_Simple (infoPtr, (BOOL)wParam);
1248 
1249  case WM_CREATE:
1251 
1252  case WM_DESTROY:
1253  return STATUSBAR_WMDestroy (infoPtr);
1254 
1255  case WM_GETFONT:
1256  return (LRESULT)(infoPtr->hFont? infoPtr->hFont : infoPtr->hDefaultFont);
1257 
1258  case WM_GETTEXT:
1259  return STATUSBAR_WMGetText (infoPtr, (INT)wParam, (LPWSTR)lParam);
1260 
1261  case WM_GETTEXTLENGTH:
1262  return LOWORD(STATUSBAR_GetTextLength (infoPtr, 0));
1263 
1264  case WM_LBUTTONDBLCLK:
1265  return STATUSBAR_SendMouseNotify(infoPtr, NM_DBLCLK, msg, wParam, lParam);
1266 
1267  case WM_LBUTTONUP:
1268  return STATUSBAR_SendMouseNotify(infoPtr, NM_CLICK, msg, wParam, lParam);
1269 
1270  case WM_MOUSEMOVE:
1271  return STATUSBAR_Relay2Tip (infoPtr, msg, wParam, lParam);
1272 
1273  case WM_NCHITTEST:
1274  res = STATUSBAR_WMNCHitTest(infoPtr, (short)LOWORD(lParam),
1275  (short)HIWORD(lParam));
1276  if (res != HTERROR) return res;
1277  return DefWindowProcW (hwnd, msg, wParam, lParam);
1278 
1279  case WM_NCLBUTTONUP:
1280  case WM_NCLBUTTONDOWN:
1281  PostMessageW (infoPtr->Notify, msg, wParam, lParam);
1282  return 0;
1283 
1284  case WM_NOTIFYFORMAT:
1285  return STATUSBAR_NotifyFormat(infoPtr, (HWND)wParam, (INT)lParam);
1286 
1287  case WM_PRINTCLIENT:
1288  case WM_PAINT:
1289  return STATUSBAR_WMPaint (infoPtr, (HDC)wParam);
1290 
1291  case WM_RBUTTONDBLCLK:
1293 
1294  case WM_RBUTTONUP:
1295  return STATUSBAR_SendMouseNotify(infoPtr, NM_RCLICK, msg, wParam, lParam);
1296 
1297  case WM_SETFONT:
1298  return STATUSBAR_WMSetFont (infoPtr, (HFONT)wParam, LOWORD(lParam));
1299 
1300  case WM_SETTEXT:
1301  return STATUSBAR_WMSetText (infoPtr, (LPCSTR)lParam);
1302 
1303  case WM_SIZE:
1304  if (STATUSBAR_WMSize (infoPtr, (WORD)wParam)) return 0;
1305  return DefWindowProcW (hwnd, msg, wParam, lParam);
1306 
1307  case WM_SYSCOLORCHANGE:
1309  return 0;
1310 
1311  case WM_THEMECHANGED:
1312  return theme_changed (infoPtr);
1313 
1314  default:
1315  if ((msg >= WM_USER) && (msg < WM_APP) && !COMCTL32_IsReflectedMessage(msg))
1316  ERR("unknown msg %04x wp=%04lx lp=%08lx\n",
1317  msg, wParam, lParam);
1318  return DefWindowProcW (hwnd, msg, wParam, lParam);
1319  }
1320 }
#define WM_NCLBUTTONDOWN
Definition: winuser.h:1674
#define WM_GETTEXTLENGTH
Definition: winuser.h:1601
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define WM_SYSCOLORCHANGE
Definition: winuser.h:1608
static HICON
Definition: imagelist.c:84
static BOOL STATUSBAR_SetTextT(STATUS_INFO *infoPtr, INT nPart, WORD style, LPWSTR text, BOOL isW)
Definition: status.c:708
#define SB_ISSIMPLE
Definition: commctrl.h:1932
#define TRUE
Definition: types.h:120
static LRESULT theme_changed(const STATUS_INFO *infoPtr)
Definition: status.c:1125
static LRESULT STATUSBAR_NotifyFormat(STATUS_INFO *infoPtr, HWND from, INT cmd)
Definition: status.c:1135
#define SB_SETBORDERS
Definition: commctrl.h:65
#define WM_GETTEXT
Definition: winuser.h:1600
static LRESULT STATUSBAR_GetTipTextA(const STATUS_INFO *infoPtr, INT id, LPSTR tip, INT size)
Definition: status.c:537
#define INT
Definition: polytest.cpp:20
static HDC
Definition: imagelist.c:92
static BOOL STATUSBAR_Simple(STATUS_INFO *infoPtr, BOOL simple)
Definition: status.c:838
static LRESULT STATUSBAR_Relay2Tip(const STATUS_INFO *infoPtr, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: status.c:370
static LRESULT STATUSBAR_GetTipTextW(const STATUS_INFO *infoPtr, INT id, LPWSTR tip, INT size)
Definition: status.c:559
#define SB_GETTIPTEXTW
Definition: commctrl.h:1937
static COLORREF STATUSBAR_SetBkColor(STATUS_INFO *infoPtr, COLORREF color)
Definition: status.c:582
static BOOL STATUSBAR_GetBorders(const STATUS_INFO *infoPtr, INT out[])
Definition: status.c:388
static BOOL STATUSBAR_SetBorders(STATUS_INFO *infoPtr, const INT in[])
Definition: status.c:400
#define WM_NCHITTEST
Definition: winuser.h:1668
static LRESULT STATUSBAR_GetTextLength(STATUS_INFO *infoPtr, INT nPart)
Definition: status.c:512
#define GetWindowLongPtrW
Definition: winuser.h:4698
HFONT hFont
Definition: status.c:69
char * LPSTR
Definition: xmlstorage.h:182
static BOOL STATUSBAR_WMNCHitTest(const STATUS_INFO *infoPtr, INT x, INT y)
Definition: status.c:1012
int32_t INT
Definition: typedefs.h:56
WPARAM wParam
Definition: combotst.c:138
static BOOL STATUSBAR_GetRect(const STATUS_INFO *infoPtr, INT nPart, LPRECT rect)
Definition: status.c:443
#define WM_PRINTCLIENT
Definition: richedit.h:70
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
static INT STATUSBAR_GetParts(const STATUS_INFO *infoPtr, INT num_parts, INT parts[])
Definition: status.c:428
HFONT hDefaultFont
Definition: status.c:70
#define SB_GETRECT
Definition: commctrl.h:1931
static LRESULT STATUSBAR_SendMouseNotify(const STATUS_INFO *infoPtr, UINT code, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: status.c:1146
static BOOL STATUSBAR_SetMinHeight(STATUS_INFO *infoPtr, INT height)
Definition: status.c:623
#define NM_RDBLCLK
Definition: commctrl.h:134
static LRESULT STATUSBAR_WMPaint(STATUS_INFO *infoPtr, HDC hdc)
Definition: status.c:1039
#define SB_GETTEXTA
Definition: commctrl.h:1915
unsigned int BOOL
Definition: ntddk_ex.h:94
#define SB_SIMPLE
Definition: commctrl.h:1930
static LRESULT STATUSBAR_SetTipTextW(const STATUS_INFO *infoPtr, INT id, LPWSTR text)
Definition: status.c:808
#define WM_GETFONT
Definition: winuser.h:1633
#define SB_GETBORDERS
Definition: commctrl.h:1928
static LRESULT STATUSBAR_WMDestroy(STATUS_INFO *infoPtr)
Definition: status.c:859
#define SB_SETBKCOLOR
Definition: commctrl.h:1948
const char * LPCSTR
Definition: xmlstorage.h:183
#define HTERROR
Definition: winuser.h:2426
BOOL bUnicode
Definition: status.c:72
#define WM_SETTEXT
Definition: winuser.h:1599
#define WM_DESTROY
Definition: winuser.h:1591
#define SB_SETUNICODEFORMAT
Definition: commctrl.h:1939
#define TRACE(s)
Definition: solgame.cpp:4
#define WM_SIZE
Definition: winuser.h:1593
DWORD COLORREF
Definition: windef.h:285
unsigned short WORD
Definition: ntddk_ex.h:93
#define SB_SETTEXTW
Definition: commctrl.h:1914
#define WM_RBUTTONUP
Definition: winuser.h:1756
static LRESULT STATUSBAR_SetUnicodeFormat(STATUS_INFO *infoPtr, BOOL bUnicode)
Definition: status.c:826
#define WM_PAINT
Definition: winuser.h:1602
#define SB_SETTEXTA
Definition: commctrl.h:1913
static BOOL STATUSBAR_SetParts(STATUS_INFO *infoPtr, INT count, LPINT parts)
Definition: status.c:635
#define WM_LBUTTONDBLCLK
Definition: winuser.h:1754
static LRESULT STATUSBAR_GetTextW(STATUS_INFO *infoPtr, INT nPart, LPWSTR buf)
Definition: status.c:486
static LRESULT STATUSBAR_WMSetFont(STATUS_INFO *infoPtr, HFONT font, BOOL redraw)
Definition: status.c:1054
#define WM_APP
Definition: eventvwr.h:70
#define SB_SETICON
Definition: commctrl.h:1933
#define NM_CLICK
Definition: commctrl.h:130
#define WM_USER
Definition: winuser.h:1856
#define ERR(fmt,...)
Definition: debug.h:109
static BOOL STATUSBAR_WMSetText(const STATUS_INFO *infoPtr, LPCSTR text)
Definition: status.c:1069
#define SB_GETTEXTLENGTHW
Definition: commctrl.h:1918
#define NM_DBLCLK
Definition: commctrl.h:131
#define SB_GETTEXTLENGTHA
Definition: commctrl.h:1917
#define SB_SETTIPTEXTW
Definition: commctrl.h:1935
#define NM_RCLICK
Definition: commctrl.h:133
#define WM_LBUTTONUP
Definition: winuser.h:1753
HWND Notify
Definition: status.c:63
#define WM_MOUSEMOVE
Definition: winuser.h:1751
#define SB_SETPARTS
Definition: commctrl.h:1926
static INT STATUSBAR_WMGetText(const STATUS_INFO *infoPtr, INT size, LPWSTR buf)
Definition: status.c:987
static LRESULT STATUSBAR_GetTextA(STATUS_INFO *infoPtr, INT nPart, LPSTR buf)
Definition: status.c:457
#define WM_SETFONT
Definition: winuser.h:1632
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
#define msg(x)
Definition: auth_time.c:54
static BOOL STATUSBAR_WMSize(STATUS_INFO *infoPtr, WORD flags)
Definition: status.c:1096
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_CREATE
Definition: winuser.h:1590
GLuint res
Definition: glext.h:9613
#define WM_RBUTTONDBLCLK
Definition: winuser.h:1757
#define WM_NCLBUTTONUP
Definition: winuser.h:1675
#define HIWORD(l)
Definition: typedefs.h:246
BOOL simple
Definition: status.c:67
#define SB_SETTIPTEXTA
Definition: commctrl.h:1934
BOOL COMCTL32_IsReflectedMessage(UINT uMsg) DECLSPEC_HIDDEN
Definition: commctrl.c:1748
static BOOL STATUSBAR_SetIcon(STATUS_INFO *infoPtr, INT nPart, HICON hIcon)
Definition: status.c:596
#define SB_GETUNICODEFORMAT
Definition: commctrl.h:1940
#define SB_GETPARTS
Definition: commctrl.h:1927
static LRESULT STATUSBAR_SetTipTextA(const STATUS_INFO *infoPtr, INT id, LPSTR text)
Definition: status.c:790
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define SB_SETMINHEIGHT
Definition: commctrl.h:1929
LONG_PTR LRESULT
Definition: windef.h:209
#define SB_GETICON
Definition: commctrl.h:1938
#define SB_GETTIPTEXTA
Definition: commctrl.h:1936
static LRESULT STATUSBAR_WMCreate(HWND hwnd, const CREATESTRUCTA *lpCreate)
Definition: status.c:889
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
VOID COMCTL32_RefreshSysColors(void) DECLSPEC_HIDDEN
Definition: commctrl.c:1586
static HICON STATUSBAR_GetIcon(const STATUS_INFO *infoPtr, INT nPart)
Definition: status.c:413
int * LPINT
Definition: windef.h:178
#define SB_GETTEXTW
Definition: commctrl.h:1916

Referenced by STATUS_Register().

◆ theme_changed()

static LRESULT theme_changed ( const STATUS_INFO infoPtr)
static

Definition at line 1125 of file status.c.

1126 {
1127  HTHEME theme = GetWindowTheme (infoPtr->Self);
1128  CloseThemeData (theme);
1129  OpenThemeData (infoPtr->Self, themeClass);
1130  return 0;
1131 }
static HTHEME(WINAPI *pOpenThemeDataEx)(HWND
HWND Self
Definition: status.c:62
HTHEME WINAPI OpenThemeData(HWND hwnd, LPCWSTR classlist)
Definition: system.c:835
HTHEME WINAPI GetWindowTheme(HWND hwnd)
Definition: system.c:851
static const WCHAR themeClass[]
Definition: status.c:90
HRESULT WINAPI CloseThemeData(HTHEME hTheme)
Definition: system.c:950

Referenced by StatusWindowProc().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( statusbar  )

Variable Documentation

◆ themeClass

const WCHAR themeClass[] = { 'S','t','a','t','u','s',0 }
static

Definition at line 90 of file status.c.

Referenced by STATUSBAR_WMCreate(), and theme_changed().