ReactOS  0.4.13-dev-257-gfabbd7c
commctrl.c File Reference
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "winnls.h"
#include "commctrl.h"
#include "winerror.h"
#include "winreg.h"
#include "shlwapi.h"
#include "comctl32.h"
#include "wine/debug.h"
Include dependency graph for commctrl.c:

Go to the source code of this file.

Macros

#define NO_SHLWAPI_STREAM
 
#define VERSION   "6.0.2600.2982!"
 
#define OCM__BASE   (WM_USER+0x1c00)
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (commctrl)
 
static LRESULT WINAPI COMCTL32_SubclassProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
static void unregister_versioned_classes (void)
 
BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
 
VOID WINAPI MenuHelp (UINT uMsg, WPARAM wParam, LPARAM lParam, HMENU hMainMenu, HINSTANCE hInst, HWND hwndStatus, UINT *lpwIDs)
 
BOOL WINAPI ShowHideMenuCtl (HWND hwnd, UINT_PTR uFlags, LPINT lpInfo)
 
VOID WINAPI GetEffectiveClientRect (HWND hwnd, LPRECT lpRect, const INT *lpInfo)
 
void WINAPI DrawStatusTextW (HDC hdc, LPCRECT lprc, LPCWSTR text, UINT style)
 
void WINAPI DrawStatusTextA (HDC hdc, LPCRECT lprc, LPCSTR text, UINT style)
 
HWND WINAPI CreateStatusWindowA (LONG style, LPCSTR text, HWND parent, UINT wid)
 
HWND WINAPI CreateStatusWindowW (LONG style, LPCWSTR text, HWND parent, UINT wid)
 
HWND WINAPI CreateUpDownControl (DWORD style, INT x, INT y, INT cx, INT cy, HWND parent, INT id, HINSTANCE inst, HWND buddy, INT maxVal, INT minVal, INT curVal)
 
VOID WINAPI InitCommonControls (void)
 
BOOL WINAPI InitCommonControlsEx (const INITCOMMONCONTROLSEX *lpInitCtrls)
 
HWND WINAPI CreateToolbarEx (HWND hwnd, DWORD style, UINT wID, INT nBitmaps, HINSTANCE hBMInst, UINT_PTR wBMID, LPCTBBUTTON lpButtons, INT iNumButtons, INT dxButton, INT dyButton, INT dxBitmap, INT dyBitmap, UINT uStructSize)
 
HBITMAP WINAPI CreateMappedBitmap (HINSTANCE hInstance, INT_PTR idBitmap, UINT wFlags, LPCOLORMAP lpColorMap, INT iNumMaps)
 
HWND WINAPI CreateToolbar (HWND hwnd, DWORD style, UINT wID, INT nBitmaps, HINSTANCE hBMInst, UINT wBMID, LPCTBBUTTON lpButtons, INT iNumButtons)
 
HRESULT WINAPI DllGetVersion (DLLVERSIONINFO *pdvi)
 
HRESULT WINAPI DllInstall (BOOL bInstall, LPCWSTR cmdline)
 
BOOL WINAPI _TrackMouseEvent (TRACKMOUSEEVENT *ptme)
 
LANGID WINAPI GetMUILanguage (VOID)
 
VOID WINAPI InitMUILanguage (LANGID uiLang)
 
BOOL WINAPI SetWindowSubclass (HWND hWnd, SUBCLASSPROC pfnSubclass, UINT_PTR uIDSubclass, DWORD_PTR dwRef)
 
BOOL WINAPI GetWindowSubclass (HWND hWnd, SUBCLASSPROC pfnSubclass, UINT_PTR uID, DWORD_PTR *pdwRef)
 
BOOL WINAPI RemoveWindowSubclass (HWND hWnd, SUBCLASSPROC pfnSubclass, UINT_PTR uID)
 
LRESULT WINAPI DefSubclassProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
HWND COMCTL32_CreateToolTip (HWND hwndOwner)
 
VOID COMCTL32_RefreshSysColors (void)
 
void COMCTL32_DrawInsertMark (HDC hDC, const RECT *lpRect, COLORREF clrInsertMark, BOOL bHorizontal)
 
void COMCTL32_EnsureBitmapSize (HBITMAP *pBitmap, int cxMinWidth, int cyMinHeight, COLORREF crBackground)
 
void COMCTL32_GetFontMetrics (HFONT hFont, TEXTMETRICW *ptm)
 
BOOL COMCTL32_IsReflectedMessage (UINT uMsg)
 
BOOL WINAPI MirrorIcon (HICON *phicon1, HICON *phicon2)
 
static BOOL IsDelimiter (WCHAR c)
 
static int CALLBACK PathWordBreakProc (LPCWSTR lpch, int ichCurrent, int cch, int code)
 
LRESULT WINAPI SetPathWordBreakProc (HWND hwnd, BOOL bSet)
 
int WINAPI DrawShadowText (HDC hdc, LPCWSTR pszText, UINT cch, RECT *prc, DWORD dwFlags, COLORREF crText, COLORREF crShadow, int ixOffset, int iyOffset)
 
HRESULT WINAPI LoadIconWithScaleDown (HINSTANCE hinst, const WCHAR *name, int cx, int cy, HICON *icon)
 
HRESULT WINAPI LoadIconMetric (HINSTANCE hinst, const WCHAR *name, int size, HICON *icon)
 

Variables

static LPWSTR COMCTL32_wSubclass = NULL
 
HMODULE COMCTL32_hModule = 0
 
static LANGID COMCTL32_uiLang = MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL)
 
HBRUSH COMCTL32_hPattern55AABrush = NULL
 
COMCTL32_SysColor comctl32_color
 
static HBITMAP COMCTL32_hPattern55AABitmap = NULL
 
static const WORD wPattern55AA []
 
static const WCHAR strCC32SubclassInfo []
 

Macro Definition Documentation

◆ NO_SHLWAPI_STREAM

#define NO_SHLWAPI_STREAM

Definition at line 68 of file commctrl.c.

◆ OCM__BASE

#define OCM__BASE   (WM_USER+0x1c00)

Definition at line 1733 of file commctrl.c.

◆ VERSION

#define VERSION   "6.0.2600.2982!"

Function Documentation

◆ _TrackMouseEvent()

BOOL WINAPI _TrackMouseEvent ( TRACKMOUSEEVENT ptme)

Definition at line 1207 of file commctrl.c.

1208 {
1209  return TrackMouseEvent (ptme);
1210 }
BOOL WINAPI TrackMouseEvent(_Inout_ LPTRACKMOUSEEVENT)

Referenced by init_functions(), LISTVIEW_MouseMove(), REBAR_MouseMove(), TOOLBAR_MouseMove(), TREEVIEW_MouseMove(), and FlatButton::WndProc().

◆ COMCTL32_CreateToolTip()

HWND COMCTL32_CreateToolTip ( HWND  hwndOwner)

Definition at line 1544 of file commctrl.c.

1545 {
1546  HWND hwndToolTip;
1547 
1548  hwndToolTip = CreateWindowExW(0, TOOLTIPS_CLASSW, NULL, WS_POPUP,
1550  CW_USEDEFAULT, CW_USEDEFAULT, hwndOwner,
1551  0, 0, 0);
1552 
1553  /* Send NM_TOOLTIPSCREATED notification */
1554  if (hwndToolTip)
1555  {
1556  NMTOOLTIPSCREATED nmttc;
1557  /* true owner can be different if hwndOwner is a child window */
1558  HWND hwndTrueOwner = GetWindow(hwndToolTip, GW_OWNER);
1559  nmttc.hdr.hwndFrom = hwndTrueOwner;
1560  nmttc.hdr.idFrom = GetWindowLongPtrW(hwndTrueOwner, GWLP_ID);
1561  nmttc.hdr.code = NM_TOOLTIPSCREATED;
1562  nmttc.hwndToolTips = hwndToolTip;
1563 
1564  SendMessageW(GetParent(hwndTrueOwner), WM_NOTIFY,
1565  GetWindowLongPtrW(hwndTrueOwner, GWLP_ID), (LPARAM)&nmttc);
1566  }
1567 
1568  return hwndToolTip;
1569 }
#define GetWindowLongPtrW
Definition: winuser.h:4698
UINT code
Definition: winuser.h:3112
UINT_PTR idFrom
Definition: winuser.h:3111
#define CW_USEDEFAULT
Definition: winuser.h:225
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
#define TOOLTIPS_CLASSW
Definition: commctrl.h:1679
HWND WINAPI GetWindow(_In_ HWND, _In_ UINT)
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)
HWND hwndFrom
Definition: winuser.h:3110
HWND WINAPI GetParent(_In_ HWND)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WS_POPUP
Definition: pedump.c:616
#define GW_OWNER
Definition: winuser.h:761
#define NM_TOOLTIPSCREATED
Definition: commctrl.h:144
#define GWLP_ID
Definition: winuser.h:854
#define WM_NOTIFY
Definition: richedit.h:61

Referenced by LISTVIEW_WindowProc(), and TREEVIEW_StyleChanged().

◆ COMCTL32_DrawInsertMark()

void COMCTL32_DrawInsertMark ( HDC  hDC,
const RECT lpRect,
COLORREF  clrInsertMark,
BOOL  bHorizontal 
)

Definition at line 1626 of file commctrl.c.

1627 {
1628  HPEN hPen = CreatePen(PS_SOLID, 1, clrInsertMark);
1629  HPEN hOldPen;
1630  static const DWORD adwPolyPoints[] = {4,4,4};
1631  LONG lCentre = (bHorizontal ?
1632  lpRect->top + (lpRect->bottom - lpRect->top)/2 :
1633  lpRect->left + (lpRect->right - lpRect->left)/2);
1634  LONG l1 = (bHorizontal ? lpRect->left : lpRect->top);
1635  LONG l2 = (bHorizontal ? lpRect->right : lpRect->bottom);
1636  const POINT aptInsertMark[] =
1637  {
1638  /* top (V) or left (H) arrow */
1639  {lCentre , l1 + 2},
1640  {lCentre - 2, l1 },
1641  {lCentre + 3, l1 },
1642  {lCentre + 1, l1 + 2},
1643  /* middle line */
1644  {lCentre , l2 - 2},
1645  {lCentre , l1 - 1},
1646  {lCentre + 1, l1 - 1},
1647  {lCentre + 1, l2 - 2},
1648  /* bottom (V) or right (H) arrow */
1649  {lCentre , l2 - 3},
1650  {lCentre - 2, l2 - 1},
1651  {lCentre + 3, l2 - 1},
1652  {lCentre + 1, l2 - 3},
1653  };
1654  hOldPen = SelectObject(hDC, hPen);
1655  PolyPolyline(hDC, aptInsertMark, adwPolyPoints, ARRAY_SIZE(adwPolyPoints));
1656  SelectObject(hDC, hOldPen);
1657  DeleteObject(hPen);
1658 }
HPEN WINAPI CreatePen(_In_ int, _In_ int, _In_ COLORREF)
LONG top
Definition: windef.h:292
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1497
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
LONG left
Definition: windef.h:291
LONG right
Definition: windef.h:293
#define PS_SOLID
Definition: wingdi.h:585
long LONG
Definition: pedump.c:60
unsigned long DWORD
Definition: ntddk_ex.h:95
BOOL WINAPI PolyPolyline(_In_ HDC hdc, _In_ const POINT *apt, _In_reads_(csz) const DWORD *asz, _In_ DWORD csz)
static HDC hDC
Definition: 3dtext.c:33
#define ARRAY_SIZE(a)
Definition: main.h:24
LONG bottom
Definition: windef.h:294

Referenced by TOOLBAR_Refresh().

◆ COMCTL32_EnsureBitmapSize()

void COMCTL32_EnsureBitmapSize ( HBITMAP pBitmap,
int  cxMinWidth,
int  cyMinHeight,
COLORREF  crBackground 
)

Definition at line 1678 of file commctrl.c.

1679 {
1680  int cxNew, cyNew;
1681  BITMAP bmp;
1682  HBITMAP hNewBitmap;
1683  HBITMAP hNewDCBitmap, hOldDCBitmap;
1684  HBRUSH hNewDCBrush;
1685  HDC hdcNew, hdcOld;
1686 
1687  if (!GetObjectW(*pBitmap, sizeof(BITMAP), &bmp))
1688  return;
1689  cxNew = (cxMinWidth > bmp.bmWidth ? cxMinWidth : bmp.bmWidth);
1690  cyNew = (cyMinHeight > bmp.bmHeight ? cyMinHeight : bmp.bmHeight);
1691  if (cxNew == bmp.bmWidth && cyNew == bmp.bmHeight)
1692  return;
1693 
1694  hdcNew = CreateCompatibleDC(NULL);
1695  hNewBitmap = CreateBitmap(cxNew, cyNew, bmp.bmPlanes, bmp.bmBitsPixel, NULL);
1696  hNewDCBitmap = SelectObject(hdcNew, hNewBitmap);
1697  hNewDCBrush = SelectObject(hdcNew, CreateSolidBrush(crBackground));
1698 
1699  hdcOld = CreateCompatibleDC(NULL);
1700  hOldDCBitmap = SelectObject(hdcOld, *pBitmap);
1701 
1702  BitBlt(hdcNew, 0, 0, bmp.bmWidth, bmp.bmHeight, hdcOld, 0, 0, SRCCOPY);
1703  if (bmp.bmWidth < cxMinWidth)
1704  PatBlt(hdcNew, bmp.bmWidth, 0, cxNew, bmp.bmHeight, PATCOPY);
1705  if (bmp.bmHeight < cyMinHeight)
1706  PatBlt(hdcNew, 0, bmp.bmHeight, bmp.bmWidth, cyNew, PATCOPY);
1707  if (bmp.bmWidth < cxMinWidth && bmp.bmHeight < cyMinHeight)
1708  PatBlt(hdcNew, bmp.bmWidth, bmp.bmHeight, cxNew, cyNew, PATCOPY);
1709 
1710  SelectObject(hdcNew, hNewDCBitmap);
1711  DeleteObject(SelectObject(hdcNew, hNewDCBrush));
1712  DeleteDC(hdcNew);
1713  SelectObject(hdcOld, hOldDCBitmap);
1714  DeleteDC(hdcOld);
1715 
1716  DeleteObject(*pBitmap);
1717  *pBitmap = hNewBitmap;
1718  return;
1719 }
static HDC
Definition: imagelist.c:92
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1497
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
static VOID NTAPI BitBlt(IN ULONG Left, IN ULONG Top, IN ULONG Width, IN ULONG Height, IN PUCHAR Buffer, IN ULONG BitsPerPixel, IN ULONG Delta)
Definition: vga.c:416
BOOL WINAPI PatBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
smooth NULL
Definition: ftsmooth.c:416
BITMAP bmp
Definition: alphablend.c:62
#define PATCOPY
Definition: wingdi.h:334
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
BOOL WINAPI DeleteDC(_In_ HDC)
Definition: bl.h:1331
HBRUSH WINAPI CreateSolidBrush(_In_ COLORREF)
static HBITMAP
Definition: button.c:44
#define SRCCOPY
Definition: wingdi.h:332
HBITMAP WINAPI CreateBitmap(_In_ INT cx, _In_ INT cy, _In_ UINT cPlanes, _In_ UINT cBitsPerPel, _In_opt_ const VOID *pvBits)

Referenced by TOOLBAR_AddBitmapToImageList().

◆ COMCTL32_GetFontMetrics()

void COMCTL32_GetFontMetrics ( HFONT  hFont,
TEXTMETRICW ptm 
)

Definition at line 1721 of file commctrl.c.

1722 {
1723  HDC hdc = GetDC(NULL);
1724  HFONT hOldFont;
1725 
1726  hOldFont = SelectObject(hdc, hFont);
1727  GetTextMetricsW(hdc, ptm);
1728  SelectObject(hdc, hOldFont);
1729  ReleaseDC(NULL, hdc);
1730 }
BOOL WINAPI GetTextMetricsW(_In_ HDC, _Out_ LPTEXTMETRICW)
Definition: text.c:221
HDC WINAPI GetDC(_In_opt_ HWND)
static HDC
Definition: imagelist.c:92
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1497
HFONT hFont
Definition: main.c:53
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
smooth NULL
Definition: ftsmooth.c:416
HDC hdc
Definition: main.c:9
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)

Referenced by STATUSBAR_ComputeHeight().

◆ COMCTL32_IsReflectedMessage()

BOOL COMCTL32_IsReflectedMessage ( UINT  uMsg)

Definition at line 1748 of file commctrl.c.

1749 {
1750  switch (uMsg)
1751  {
1752  case OCM__BASE + WM_COMMAND:
1753  case OCM__BASE + WM_CTLCOLORBTN:
1754  case OCM__BASE + WM_CTLCOLOREDIT:
1755  case OCM__BASE + WM_CTLCOLORDLG:
1760  case OCM__BASE + WM_DRAWITEM:
1761  case OCM__BASE + WM_MEASUREITEM:
1762  case OCM__BASE + WM_DELETEITEM:
1763  case OCM__BASE + WM_VKEYTOITEM:
1764  case OCM__BASE + WM_CHARTOITEM:
1765  case OCM__BASE + WM_COMPAREITEM:
1766  case OCM__BASE + WM_HSCROLL:
1767  case OCM__BASE + WM_VSCROLL:
1768  case OCM__BASE + WM_PARENTNOTIFY:
1769  case OCM__BASE + WM_NOTIFY:
1770  return TRUE;
1771  default:
1772  return FALSE;
1773  }
1774 }
#define TRUE
Definition: types.h:120
#define WM_CTLCOLORDLG
Definition: winuser.h:1746
#define WM_CTLCOLORSTATIC
Definition: winuser.h:1748
#define WM_CTLCOLORLISTBOX
Definition: winuser.h:1744
#define WM_CHARTOITEM
Definition: winuser.h:1631
#define WM_CTLCOLORBTN
Definition: winuser.h:1745
#define WM_PARENTNOTIFY
Definition: winuser.h:1779
#define WM_DELETEITEM
Definition: winuser.h:1629
#define WM_CTLCOLORSCROLLBAR
Definition: winuser.h:1747
#define WM_CTLCOLORMSGBOX
Definition: winuser.h:1742
#define WM_MEASUREITEM
Definition: winuser.h:1628
#define WM_VKEYTOITEM
Definition: winuser.h:1630
#define WM_COMMAND
Definition: winuser.h:1716
#define WM_COMPAREITEM
Definition: winuser.h:1637
#define WM_CTLCOLOREDIT
Definition: winuser.h:1743
#define WM_HSCROLL
Definition: winuser.h:1719
#define WM_DRAWITEM
Definition: winuser.h:1627
#define OCM__BASE
Definition: commctrl.c:1733
#define WM_NOTIFY
Definition: richedit.h:61
#define WM_VSCROLL
Definition: winuser.h:1720

Referenced by ANIMATE_WindowProc(), COMBOEX_WindowProc(), DATETIME_WindowProc(), FlatSB_WindowProc(), HEADER_WindowProc(), HOTKEY_WindowProc(), IPADDRESS_WindowProc(), LISTVIEW_WindowProc(), MONTHCAL_WindowProc(), NATIVEFONT_WindowProc(), ProgressWindowProc(), REBAR_WindowProc(), StatusWindowProc(), SysLinkWindowProc(), TAB_WindowProc(), ToolbarWindowProc(), TOOLTIPS_WindowProc(), TRACKBAR_WindowProc(), TREEVIEW_WindowProc(), and UpDownWindowProc().

◆ COMCTL32_RefreshSysColors()

VOID COMCTL32_RefreshSysColors ( void  )

Definition at line 1586 of file commctrl.c.

1587 {
1605 }
#define COLOR_3DHILIGHT
Definition: winuser.h:927
#define COLOR_HIGHLIGHT
Definition: winuser.h:916
COLORREF clr3dShadow
Definition: comctl32.h:165
COLORREF clrBtnHighlight
Definition: comctl32.h:157
#define COLOR_BTNHIGHLIGHT
Definition: winuser.h:925
COLORREF clr3dHilight
Definition: comctl32.h:164
COLORREF clrBtnText
Definition: comctl32.h:159
COLORREF clr3dFace
Definition: comctl32.h:167
#define COLOR_WINDOW
Definition: winuser.h:908
DWORD WINAPI GetSysColor(_In_ int)
#define COLOR_3DSHADOW
Definition: winuser.h:921
#define COLOR_INFOBK
Definition: winuser.h:932
COLORREF clrWindowText
Definition: comctl32.h:169
#define COLOR_3DFACE
Definition: winuser.h:919
COLORREF clrActiveCaption
Definition: comctl32.h:171
COLORREF clrInfoBk
Definition: comctl32.h:172
COLORREF clr3dDkShadow
Definition: comctl32.h:166
COLORREF clrHighlightText
Definition: comctl32.h:162
#define COLOR_ACTIVECAPTION
Definition: winuser.h:905
#define COLOR_HIGHLIGHTTEXT
Definition: winuser.h:917
#define COLOR_WINDOWTEXT
Definition: winuser.h:911
#define COLOR_HOTLIGHT
Definition: winuser.h:933
COMCTL32_SysColor comctl32_color
Definition: commctrl.c:82
COLORREF clrHotTrackingColor
Definition: comctl32.h:163
#define COLOR_GRAYTEXT
Definition: winuser.h:922
#define COLOR_BTNFACE
Definition: winuser.h:918
#define COLOR_INFOTEXT
Definition: winuser.h:931
COLORREF clrGrayText
Definition: comctl32.h:170
COLORREF clrBtnFace
Definition: comctl32.h:160
COLORREF clrBtnShadow
Definition: comctl32.h:158
COLORREF clrInfoText
Definition: comctl32.h:173
#define COLOR_BTNSHADOW
Definition: winuser.h:920
COLORREF clrHighlight
Definition: comctl32.h:161
#define COLOR_BTNTEXT
Definition: winuser.h:923
#define COLOR_3DDKSHADOW
Definition: winuser.h:929
COLORREF clrWindow
Definition: comctl32.h:168

Referenced by COMBOEX_WindowProc(), DllMain(), HEADER_WindowProc(), IPADDRESS_WindowProc(), LISTVIEW_WindowProc(), MONTHCAL_WindowProc(), PROPSHEET_DialogProc(), REBAR_WindowProc(), STATIC_WindowProc(), StatusWindowProc(), SysLinkWindowProc(), TAB_WindowProc(), TOOLBAR_SysColorChange(), TOOLTIPS_WindowProc(), and TREEVIEW_WindowProc().

◆ COMCTL32_SubclassProc()

static LRESULT WINAPI COMCTL32_SubclassProc ( HWND  hWnd,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 1445 of file commctrl.c.

1446 {
1449  LRESULT ret;
1450 
1451  TRACE ("(%p, 0x%08x, 0x%08lx, 0x%08lx)\n", hWnd, uMsg, wParam, lParam);
1452 
1454  if (!stack) {
1455  ERR ("Our sub classing stack got erased for %p!! Nothing we can do\n", hWnd);
1456  return 0;
1457  }
1458 
1459  /* Save our old stackpos to properly handle nested messages */
1460  proc = stack->stackpos;
1461  stack->stackpos = stack->SubclassProcs;
1462  stack->running++;
1463  ret = DefSubclassProc(hWnd, uMsg, wParam, lParam);
1464  stack->running--;
1465  stack->stackpos = proc;
1466 
1467  if (!stack->SubclassProcs && !stack->running) {
1468  TRACE("Last Subclass removed, cleaning up\n");
1469  /* clean up our heap and reset the original window procedure */
1470  if (IsWindowUnicode (hWnd))
1472  else
1474  Free (stack);
1476  }
1477  return ret;
1478 }
HWND hWnd
Definition: settings.c:17
static stack_node_t * stack
Definition: rpn_ieee.c:37
static HANDLE proc()
Definition: pdb.c:32
WPARAM wParam
Definition: combotst.c:138
HANDLE WINAPI RemovePropW(_In_ HWND, _In_ LPCWSTR)
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION Free
Definition: exfuncs.h:656
LRESULT WINAPI DefSubclassProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: commctrl.c:1496
BOOL WINAPI IsWindowUnicode(_In_ HWND)
Definition: _stack.h:47
#define TRACE(s)
Definition: solgame.cpp:4
int ret
#define SetWindowLongPtrA
Definition: winuser.h:5214
uint32_t DWORD_PTR
Definition: typedefs.h:63
#define GWLP_WNDPROC
Definition: treelist.c:66
#define ERR(fmt,...)
Definition: debug.h:109
HANDLE WINAPI GetPropW(_In_ HWND, _In_ LPCWSTR)
#define SetWindowLongPtrW
Definition: winuser.h:5215
LONG_PTR LRESULT
Definition: windef.h:209
static LPWSTR COMCTL32_wSubclass
Definition: commctrl.c:78
LPARAM lParam
Definition: combotst.c:139

Referenced by SetWindowSubclass().

◆ CreateMappedBitmap()

HBITMAP WINAPI CreateMappedBitmap ( HINSTANCE  hInstance,
INT_PTR  idBitmap,
UINT  wFlags,
LPCOLORMAP  lpColorMap,
INT  iNumMaps 
)

Definition at line 998 of file commctrl.c.

1000 {
1001  HGLOBAL hglb;
1002  HRSRC hRsrc;
1003  const BITMAPINFOHEADER *lpBitmap;
1004  LPBITMAPINFOHEADER lpBitmapInfo;
1005  UINT nSize, nColorTableSize, iColor;
1006  RGBQUAD *pColorTable;
1007  INT i, iMaps, nWidth, nHeight;
1008  HDC hdcScreen;
1009  HBITMAP hbm;
1010  LPCOLORMAP sysColorMap;
1011  COLORREF cRef;
1012  COLORMAP internalColorMap[4] =
1013  {{0x000000, 0}, {0x808080, 0}, {0xC0C0C0, 0}, {0xFFFFFF, 0}};
1014 
1015  /* initialize pointer to colortable and default color table */
1016  if (lpColorMap) {
1017  iMaps = iNumMaps;
1018  sysColorMap = lpColorMap;
1019  }
1020  else {
1021  internalColorMap[0].to = GetSysColor (COLOR_BTNTEXT);
1022  internalColorMap[1].to = GetSysColor (COLOR_BTNSHADOW);
1023  internalColorMap[2].to = GetSysColor (COLOR_BTNFACE);
1024  internalColorMap[3].to = GetSysColor (COLOR_BTNHIGHLIGHT);
1025  iMaps = 4;
1026  sysColorMap = internalColorMap;
1027  }
1028 
1029  hRsrc = FindResourceW (hInstance, (LPWSTR)idBitmap, (LPWSTR)RT_BITMAP);
1030  if (hRsrc == 0)
1031  return 0;
1032  hglb = LoadResource (hInstance, hRsrc);
1033  if (hglb == 0)
1034  return 0;
1035  lpBitmap = LockResource (hglb);
1036  if (lpBitmap == NULL)
1037  return 0;
1038 
1039  if (lpBitmap->biSize >= sizeof(BITMAPINFOHEADER) && lpBitmap->biClrUsed)
1040  nColorTableSize = lpBitmap->biClrUsed;
1041  else if (lpBitmap->biBitCount <= 8)
1042  nColorTableSize = (1 << lpBitmap->biBitCount);
1043  else
1044  nColorTableSize = 0;
1045  nSize = lpBitmap->biSize;
1046  if (nSize == sizeof(BITMAPINFOHEADER) && lpBitmap->biCompression == BI_BITFIELDS)
1047  nSize += 3 * sizeof(DWORD);
1048  nSize += nColorTableSize * sizeof(RGBQUAD);
1049  lpBitmapInfo = GlobalAlloc (GMEM_FIXED, nSize);
1050  if (lpBitmapInfo == NULL)
1051  return 0;
1052  RtlMoveMemory (lpBitmapInfo, lpBitmap, nSize);
1053 
1054  pColorTable = (RGBQUAD*)(((LPBYTE)lpBitmapInfo) + lpBitmapInfo->biSize);
1055 
1056  for (iColor = 0; iColor < nColorTableSize; iColor++) {
1057  for (i = 0; i < iMaps; i++) {
1058  cRef = RGB(pColorTable[iColor].rgbRed,
1059  pColorTable[iColor].rgbGreen,
1060  pColorTable[iColor].rgbBlue);
1061  if ( cRef == sysColorMap[i].from) {
1062 #if 0
1063  if (wFlags & CBS_MASKED) {
1064  if (sysColorMap[i].to != COLOR_BTNTEXT)
1065  pColorTable[iColor] = RGB(255, 255, 255);
1066  }
1067  else
1068 #endif
1069  pColorTable[iColor].rgbBlue = GetBValue(sysColorMap[i].to);
1070  pColorTable[iColor].rgbGreen = GetGValue(sysColorMap[i].to);
1071  pColorTable[iColor].rgbRed = GetRValue(sysColorMap[i].to);
1072  break;
1073  }
1074  }
1075  }
1076  nWidth = lpBitmapInfo->biWidth;
1077  nHeight = lpBitmapInfo->biHeight;
1078  hdcScreen = GetDC (NULL);
1079  hbm = CreateCompatibleBitmap (hdcScreen, nWidth, nHeight);
1080  if (hbm) {
1081  HDC hdcDst = CreateCompatibleDC (hdcScreen);
1082  HBITMAP hbmOld = SelectObject (hdcDst, hbm);
1083  const BYTE *lpBits = (const BYTE *)lpBitmap + nSize;
1084  StretchDIBits (hdcDst, 0, 0, nWidth, nHeight, 0, 0, nWidth, nHeight,
1085  lpBits, (LPBITMAPINFO)lpBitmapInfo, DIB_RGB_COLORS,
1086  SRCCOPY);
1087  SelectObject (hdcDst, hbmOld);
1088  DeleteDC (hdcDst);
1089  }
1090  ReleaseDC (NULL, hdcScreen);
1091  GlobalFree (lpBitmapInfo);
1092  FreeResource (hglb);
1093 
1094  return hbm;
1095 }
int WINAPI StretchDIBits(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_opt_ const VOID *, _In_ const BITMAPINFO *, _In_ UINT, _In_ DWORD)
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:368
HDC WINAPI GetDC(_In_opt_ HWND)
HBITMAP WINAPI CreateCompatibleBitmap(_In_ HDC hdc, _In_ INT cx, _In_ INT cy)
*nSize LPSTR _Inout_ LPDWORD nSize
Definition: winbase.h:2024
static HDC
Definition: imagelist.c:92
#define GetRValue(rgb)
Definition: wingdi.h:2913
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1497
LPVOID WINAPI LockResource(HGLOBAL handle)
Definition: res.c:550
#define COLOR_BTNHIGHLIGHT
Definition: winuser.h:925
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
int32_t INT
Definition: typedefs.h:56
#define BI_BITFIELDS
Definition: mmreg.h:507
DWORD WINAPI GetSysColor(_In_ int)
HRSRC WINAPI FindResourceW(HINSTANCE hModule, LPCWSTR name, LPCWSTR type)
Definition: res.c:176
UCHAR rgbBlue
Definition: inbv.c:122
#define RtlMoveMemory(Destination, Source, Length)
Definition: typedefs.h:263
UCHAR rgbGreen
Definition: inbv.c:123
#define GetGValue(rgb)
Definition: wingdi.h:2914
UCHAR rgbRed
Definition: inbv.c:124
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
HINSTANCE hInstance
Definition: charmap.c:20
unsigned char * LPBYTE
Definition: typedefs.h:52
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
BOOL WINAPI FreeResource(HGLOBAL handle)
Definition: res.c:559
DWORD biCompression
Definition: amvideo.idl:35
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
Definition: res.c:532
smooth NULL
Definition: ftsmooth.c:416
struct tagRGBQUAD RGBQUAD
DWORD COLORREF
Definition: windef.h:285
#define RGB(r, g, b)
Definition: wingdi.h:2918
unsigned long DWORD
Definition: ntddk_ex.h:95
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
Definition: heapmem.c:611
COLORREF to
Definition: commctrl.h:937
#define GMEM_FIXED
Definition: winbase.h:290
#define COLOR_BTNFACE
Definition: winuser.h:918
unsigned char BYTE
Definition: mem.h:68
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:519
static HDC hdcDst
Definition: xlate.c:32
BOOL WINAPI DeleteDC(_In_ HDC)
#define COLOR_BTNSHADOW
Definition: winuser.h:920
_In_ HBITMAP hbm
Definition: ntgdi.h:2776
unsigned int UINT
Definition: ndis.h:50
#define GetBValue(rgb)
Definition: wingdi.h:2915
#define COLOR_BTNTEXT
Definition: winuser.h:923
static HBITMAP
Definition: button.c:44
WCHAR * LPWSTR
Definition: xmlstorage.h:184
CardRegion * from
Definition: spigame.cpp:19
#define RT_BITMAP
Definition: pedump.c:364
#define DIB_RGB_COLORS
Definition: wingdi.h:366
#define SRCCOPY
Definition: wingdi.h:332
_In_ ULONG iColor
Definition: xlateobj.h:17

Referenced by PROPSHEET_LoadWizardBitmaps(), and TOOLBAR_AddBitmapToImageList().

◆ CreateStatusWindowA()

HWND WINAPI CreateStatusWindowA ( LONG  style,
LPCSTR  text,
HWND  parent,
UINT  wid 
)

Definition at line 769 of file commctrl.c.

770 {
774  parent, (HMENU)(DWORD_PTR)wid, 0, 0);
775 }
const WCHAR * text
Definition: package.c:1827
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4184
#define CW_USEDEFAULT
Definition: winuser.h:225
r parent
Definition: btrfs.c:2677
uint32_t DWORD_PTR
Definition: typedefs.h:63
#define STATUSCLASSNAMEA
Definition: commctrl.h:1909
Arabic default style
Definition: afstyles.h:93
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60

◆ CreateStatusWindowW()

HWND WINAPI CreateStatusWindowW ( LONG  style,
LPCWSTR  text,
HWND  parent,
UINT  wid 
)

Definition at line 795 of file commctrl.c.

796 {
800  parent, (HMENU)(DWORD_PTR)wid, 0, 0);
801 }
#define STATUSCLASSNAMEW
Definition: commctrl.h:1908
const WCHAR * text
Definition: package.c:1827
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4185
#define CW_USEDEFAULT
Definition: winuser.h:225
r parent
Definition: btrfs.c:2677
uint32_t DWORD_PTR
Definition: typedefs.h:63
Arabic default style
Definition: afstyles.h:93
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60

Referenced by Control_WndProc_Create(), iewnd_OnCreate(), InitInstance(), OnCreate(), and show_frame().

◆ CreateToolbar()

HWND WINAPI CreateToolbar ( HWND  hwnd,
DWORD  style,
UINT  wID,
INT  nBitmaps,
HINSTANCE  hBMInst,
UINT  wBMID,
LPCTBBUTTON  lpButtons,
INT  iNumButtons 
)

Definition at line 1122 of file commctrl.c.

1125 {
1126  return CreateToolbarEx (hwnd, style | CCS_NODIVIDER, wID, nBitmaps,
1127  hBMInst, wBMID, lpButtons,
1128  iNumButtons, 0, 0, 0, 0, CCSIZEOF_STRUCT(TBBUTTON, dwData));
1129 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
static HANDLE ULONG_PTR dwData
Definition: file.c:35
HWND WINAPI CreateToolbarEx(HWND hwnd, DWORD style, UINT wID, INT nBitmaps, HINSTANCE hBMInst, UINT_PTR wBMID, LPCTBBUTTON lpButtons, INT iNumButtons, INT dxButton, INT dyButton, INT dxBitmap, INT dyBitmap, UINT uStructSize)
Definition: commctrl.c:929
#define CCS_NODIVIDER
Definition: commctrl.h:2220
Arabic default style
Definition: afstyles.h:93
#define CCSIZEOF_STRUCT(structname, member)
Definition: commctrl.h:150

◆ CreateToolbarEx()

HWND WINAPI CreateToolbarEx ( HWND  hwnd,
DWORD  style,
UINT  wID,
INT  nBitmaps,
HINSTANCE  hBMInst,
UINT_PTR  wBMID,
LPCTBBUTTON  lpButtons,
INT  iNumButtons,
INT  dxButton,
INT  dyButton,
INT  dxBitmap,
INT  dyBitmap,
UINT  uStructSize 
)

Definition at line 929 of file commctrl.c.

933 {
934  HWND hwndTB;
935 
936  hwndTB =
939  if(hwndTB) {
940  TBADDBITMAP tbab;
941 
942  SendMessageW (hwndTB, TB_BUTTONSTRUCTSIZE, uStructSize, 0);
943 
944  /* set bitmap and button size */
945  /*If CreateToolbarEx receives 0, windows sets default values*/
946  if (dxBitmap < 0)
947  dxBitmap = 16;
948  if (dyBitmap < 0)
949  dyBitmap = 16;
950  if (dxBitmap == 0 || dyBitmap == 0)
951  dxBitmap = dyBitmap = 16;
952  SendMessageW(hwndTB, TB_SETBITMAPSIZE, 0, MAKELPARAM(dxBitmap, dyBitmap));
953 
954  if (dxButton < 0)
955  dxButton = dxBitmap;
956  if (dyButton < 0)
957  dyButton = dyBitmap;
958  /* TB_SETBUTTONSIZE -> TB_SETBITMAPSIZE bug introduced for Windows compatibility */
959  if (dxButton != 0 && dyButton != 0)
960  SendMessageW(hwndTB, TB_SETBITMAPSIZE, 0, MAKELPARAM(dxButton, dyButton));
961 
962 
963  /* add bitmaps */
964  if (nBitmaps > 0 || hBMInst == HINST_COMMCTRL)
965  {
966  tbab.hInst = hBMInst;
967  tbab.nID = wBMID;
968 
969  SendMessageW (hwndTB, TB_ADDBITMAP, nBitmaps, (LPARAM)&tbab);
970  }
971  /* add buttons */
972  if(iNumButtons > 0)
973  SendMessageW (hwndTB, TB_ADDBUTTONSW, iNumButtons, (LPARAM)lpButtons);
974  }
975 
976  return hwndTB;
977 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define TB_BUTTONSTRUCTSIZE
Definition: commctrl.h:1106
#define MAKELPARAM(l, h)
Definition: winuser.h:3915
#define TOOLBARCLASSNAMEW
Definition: commctrl.h:915
HINSTANCE hInst
Definition: commctrl.h:1031
#define WS_CHILD
Definition: pedump.c:617
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
#define TB_ADDBITMAP
Definition: commctrl.h:1028
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)
#define TB_ADDBUTTONSW
Definition: commctrl.h:1238
#define TB_SETBITMAPSIZE
Definition: commctrl.h:1108
uint32_t DWORD_PTR
Definition: typedefs.h:63
HMODULE COMCTL32_hModule
Definition: commctrl.c:79
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define HINST_COMMCTRL
Definition: commctrl.h:1035
Arabic default style
Definition: afstyles.h:93
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
UINT_PTR nID
Definition: commctrl.h:1032

Referenced by QuickLaunchBar::Create(), create_drive_bar(), CreateToolbar(), TaskBar::Init(), init_functions(), InitInstance(), MainFrameBase::MainFrameBase(), MDIMainFrame::MDIMainFrame(), OnCreate(), and show_frame().

◆ CreateUpDownControl()

HWND WINAPI CreateUpDownControl ( DWORD  style,
INT  x,
INT  y,
INT  cx,
INT  cy,
HWND  parent,
INT  id,
HINSTANCE  inst,
HWND  buddy,
INT  maxVal,
INT  minVal,
INT  curVal 
)

Definition at line 829 of file commctrl.c.

832 {
833  HWND hUD =
835  parent, (HMENU)(DWORD_PTR)id, inst, 0);
836  if (hUD) {
837  SendMessageW (hUD, UDM_SETBUDDY, (WPARAM)buddy, 0);
838  SendMessageW (hUD, UDM_SETRANGE, 0, MAKELONG(maxVal, minVal));
839  SendMessageW (hUD, UDM_SETPOS, 0, MAKELONG(curVal, 0));
840  }
841 
842  return hUD;
843 }
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
UINT_PTR WPARAM
Definition: windef.h:207
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4185
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:570
#define MAKELONG(a, b)
Definition: typedefs.h:248
#define UDM_SETRANGE
Definition: commctrl.h:2113
r parent
Definition: btrfs.c:2677
uint32_t DWORD_PTR
Definition: typedefs.h:63
#define UDM_SETBUDDY
Definition: commctrl.h:2117
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define UDM_SETPOS
Definition: commctrl.h:2115
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
_Out_opt_ int * cx
Definition: commctrl.h:570
#define UPDOWN_CLASSW
Definition: commctrl.h:2091
Arabic default style
Definition: afstyles.h:93
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60

Referenced by DATETIME_StyleChanged(), init_functions(), PRINTDLG_WMInitDialog(), and PRINTDLG_WMInitDialogW().

◆ DefSubclassProc()

LRESULT WINAPI DefSubclassProc ( HWND  hWnd,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 1496 of file commctrl.c.

1497 {
1499  LRESULT ret;
1500 
1501  TRACE ("(%p, 0x%08x, 0x%08lx, 0x%08lx)\n", hWnd, uMsg, wParam, lParam);
1502 
1503  /* retrieve our little stack from the Properties */
1505  if (!stack) {
1506  ERR ("Our sub classing stack got erased for %p!! Nothing we can do\n", hWnd);
1507  return 0;
1508  }
1509 
1510  /* If we are at the end of stack then we have to call the original
1511  * window procedure */
1512  if (!stack->stackpos) {
1513  if (IsWindowUnicode (hWnd))
1514  ret = CallWindowProcW (stack->origproc, hWnd, uMsg, wParam, lParam);
1515  else
1516  ret = CallWindowProcA (stack->origproc, hWnd, uMsg, wParam, lParam);
1517  } else {
1518  const SUBCLASSPROCS *proc = stack->stackpos;
1519  stack->stackpos = stack->stackpos->next;
1520  /* call the Subclass procedure from the stack */
1521  ret = proc->subproc (hWnd, uMsg, wParam, lParam,
1522  proc->id, proc->ref);
1523  }
1524 
1525  return ret;
1526 }
HWND hWnd
Definition: settings.c:17
static stack_node_t * stack
Definition: rpn_ieee.c:37
static HANDLE proc()
Definition: pdb.c:32
WPARAM wParam
Definition: combotst.c:138
LRESULT WINAPI CallWindowProcA(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI IsWindowUnicode(_In_ HWND)
Definition: _stack.h:47
#define TRACE(s)
Definition: solgame.cpp:4
int ret
#define ERR(fmt,...)
Definition: debug.h:109
HANDLE WINAPI GetPropW(_In_ HWND, _In_ LPCWSTR)
LRESULT WINAPI CallWindowProcW(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LONG_PTR LRESULT
Definition: windef.h:209
static LPWSTR COMCTL32_wSubclass
Definition: commctrl.c:78
LPARAM lParam
Definition: combotst.c:139

Referenced by COMBOEX_ComboWndProc(), COMBOEX_EditWndProc(), COMCTL32_SubclassProc(), CredDialogPasswordSubclassProc(), CDownloadManager::DownloadProgressProc(), DragList_SubclassWindowProc(), init_function_pointers(), init_functions(), PROPSHEET_WizardSubclassProc(), RebarSubclassProc(), subclass_proc(), TOOLTIPS_SubclassProc(), and UPDOWN_Buddy_SubclassProc().

◆ DllGetVersion()

HRESULT WINAPI DllGetVersion ( DLLVERSIONINFO pdvi)

Definition at line 1148 of file commctrl.c.

1149 {
1150  if (pdvi->cbSize != sizeof(DLLVERSIONINFO)) {
1151  WARN("wrong DLLVERSIONINFO size from app\n");
1152  return E_INVALIDARG;
1153  }
1154 
1157  pdvi->dwBuildNumber = 2919;
1158  pdvi->dwPlatformID = 6304;
1159 
1160  TRACE("%u.%u.%u.%u\n",
1161  pdvi->dwMajorVersion, pdvi->dwMinorVersion,
1162  pdvi->dwBuildNumber, pdvi->dwPlatformID);
1163 
1164  return S_OK;
1165 }
DWORD dwMinorVersion
Definition: shlwapi.h:1956
#define WARN(fmt,...)
Definition: debug.h:111
DWORD dwBuildNumber
Definition: shlwapi.h:1957
#define E_INVALIDARG
Definition: ddrawi.h:101
DWORD dwMajorVersion
Definition: shlwapi.h:1955
#define TRACE(s)
Definition: solgame.cpp:4
#define COMCTL32_VERSION
Definition: resource.h:72
#define COMCTL32_VERSION_MINOR
Definition: comctl32.h:190
DWORD dwPlatformID
Definition: shlwapi.h:1958
#define S_OK
Definition: intsafe.h:59

◆ DllInstall()

HRESULT WINAPI DllInstall ( BOOL  bInstall,
LPCWSTR  cmdline 
)

Definition at line 1176 of file commctrl.c.

1177 {
1178  TRACE("(%u, %s): stub\n", bInstall, debugstr_w(cmdline));
1179  return S_OK;
1180 }
TCHAR * cmdline
Definition: stretchblt.cpp:32
#define debugstr_w
Definition: kernel32.h:32
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59

◆ DllMain()

BOOL WINAPI DllMain ( HINSTANCE  hinstDLL,
DWORD  fdwReason,
LPVOID  lpvReserved 
)

Definition at line 341 of file commctrl.c.

342 {
343  TRACE("%p,%x,%p\n", hinstDLL, fdwReason, lpvReserved);
344 
345  switch (fdwReason) {
346  case DLL_PROCESS_ATTACH:
347  DisableThreadLibraryCalls(hinstDLL);
348 
349  COMCTL32_hModule = hinstDLL;
350 
351  /* add global subclassing atom (used by 'tooltip' and 'updown') */
353  TRACE("Subclassing atom added: %p\n", COMCTL32_wSubclass);
354 
355  /* create local pattern brush */
358 
359  /* Get all the colors at DLL load */
361 
362 #ifndef __REACTOS__
363  /* like comctl32 5.82+ register all the common control classes */
364  ANIMATE_Register ();
365  COMBOEX_Register ();
367  FLATSB_Register ();
368  HEADER_Register ();
369  HOTKEY_Register ();
374  PAGER_Register ();
376  REBAR_Register ();
377  STATUS_Register ();
378  SYSLINK_Register ();
379  TAB_Register ();
380  TOOLBAR_Register ();
384  UPDOWN_Register ();
385 
386  BUTTON_Register ();
387  COMBO_Register ();
389  EDIT_Register ();
390  LISTBOX_Register ();
391  STATIC_Register ();
392 
393  /* subclass user32 controls */
395 #else
396  InitializeClasses();
397 #endif
398 
399  break;
400 
401  case DLL_PROCESS_DETACH:
402  if (lpvReserved) break;
403 #ifndef __REACTOS__
404  /* clean up subclassing */
406 
407  /* unregister all common control classes */
418  PAGER_Unregister ();
420  REBAR_Unregister ();
423  TAB_Unregister ();
429 
431 
432 #else
433  UninitializeClasses();
434 #endif
435  /* delete local pattern brush */
438 
439  /* delete global subclassing atom */
441  TRACE("Subclassing atom deleted: %p\n", COMCTL32_wSubclass);
442  break;
443  }
444 
445  return TRUE;
446 }
void COMBO_Register(void)
Definition: combo.c:2150
void STATIC_Register(void) DECLSPEC_HIDDEN
Definition: static.c:780
ATOM WINAPI GlobalDeleteAtom(ATOM nAtom)
Definition: atom.c:454
HBRUSH COMCTL32_hPattern55AABrush
Definition: commctrl.c:81
void ANIMATE_Register(void)
Definition: animate.c:965
#define TRUE
Definition: types.h:120
void BUTTON_Register(void)
Definition: button.c:2122
void TRACKBAR_Register(void) DECLSPEC_HIDDEN
Definition: trackbar.c:2049
void HEADER_Register(void) DECLSPEC_HIDDEN
Definition: header.c:2280
void HOTKEY_Unregister(void) DECLSPEC_HIDDEN
Definition: hotkey.c:559
void TRACKBAR_Unregister(void) DECLSPEC_HIDDEN
Definition: trackbar.c:2066
void TOOLTIPS_Unregister(void) DECLSPEC_HIDDEN
Definition: tooltips.c:2381
void LISTVIEW_Register(void) DECLSPEC_HIDDEN
Definition: listview.c:11859
void DATETIME_Register(void) DECLSPEC_HIDDEN
Definition: datetime.c:1666
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
void UPDOWN_Register(void) DECLSPEC_HIDDEN
Definition: updown.c:1181
void SYSLINK_Register(void) DECLSPEC_HIDDEN
Definition: syslink.c:1742
#define DLL_PROCESS_ATTACH
Definition: compat.h:120
void STATUS_Register(void) DECLSPEC_HIDDEN
Definition: status.c:1330
void REBAR_Register(void) DECLSPEC_HIDDEN
Definition: rebar.c:3826
void PROGRESS_Unregister(void) DECLSPEC_HIDDEN
Definition: progress.c:768
void PAGER_Register(void) DECLSPEC_HIDDEN
Definition: pager.c:1103
static IN DWORD IN LPVOID lpvReserved
void ANIMATE_Unregister(void)
Definition: animate.c:982
static void unregister_versioned_classes(void)
Definition: commctrl.c:305
void LISTVIEW_Unregister(void) DECLSPEC_HIDDEN
Definition: listview.c:11884
void REBAR_Unregister(void) DECLSPEC_HIDDEN
Definition: rebar.c:3851
void COMBOLBOX_Register(void) DECLSPEC_HIDDEN
Definition: listbox.c:3069
void PROGRESS_Register(void) DECLSPEC_HIDDEN
Definition: progress.c:747
void NATIVEFONT_Unregister(void) DECLSPEC_HIDDEN
Definition: nativefont.c:131
void TAB_Register(void) DECLSPEC_HIDDEN
Definition: tab.c:3463
void EDIT_Register(void) DECLSPEC_HIDDEN
Definition: edit.c:5032
void SYSLINK_Unregister(void) DECLSPEC_HIDDEN
Definition: syslink.c:1763
void TREEVIEW_Register(void) DECLSPEC_HIDDEN
Definition: treeview.c:5924
#define DLL_PROCESS_DETACH
Definition: compat.h:119
HBRUSH WINAPI CreatePatternBrush(_In_ HBITMAP)
#define TRACE(s)
Definition: solgame.cpp:4
void MONTHCAL_Register(void) DECLSPEC_HIDDEN
Definition: monthcal.c:3037
void COMBOEX_Unregister(void)
Definition: comboex.c:2189
void NATIVEFONT_Register(void) DECLSPEC_HIDDEN
Definition: nativefont.c:113
void THEMING_Uninitialize(void) DECLSPEC_HIDDEN
Definition: theming.c:191
void HOTKEY_Register(void) DECLSPEC_HIDDEN
Definition: hotkey.c:541
void PAGER_Unregister(void) DECLSPEC_HIDDEN
Definition: pager.c:1121
static HBITMAP COMCTL32_hPattern55AABitmap
Definition: commctrl.c:84
uint32_t DWORD_PTR
Definition: typedefs.h:63
void IPADDRESS_Unregister(void) DECLSPEC_HIDDEN
Definition: ipaddress.c:667
void TAB_Unregister(void) DECLSPEC_HIDDEN
Definition: tab.c:3481
HMODULE COMCTL32_hModule
Definition: commctrl.c:79
void HEADER_Unregister(void) DECLSPEC_HIDDEN
Definition: header.c:2297
void IPADDRESS_Register(void) DECLSPEC_HIDDEN
Definition: ipaddress.c:650
void COMBOEX_Register(void)
Definition: comboex.c:2172
void TOOLBAR_Unregister(void) DECLSPEC_HIDDEN
Definition: toolbar.c:7194
ATOM WINAPI GlobalAddAtomW(LPCWSTR lpString)
Definition: atom.c:444
void UPDOWN_Unregister(void) DECLSPEC_HIDDEN
Definition: updown.c:1203
void TOOLBAR_Register(void) DECLSPEC_HIDDEN
Definition: toolbar.c:7176
void TREEVIEW_Unregister(void) DECLSPEC_HIDDEN
Definition: treeview.c:5945
void FLATSB_Register(void) DECLSPEC_HIDDEN
Definition: flatsb.c:267
VOID COMCTL32_RefreshSysColors(void)
Definition: commctrl.c:1586
static const WCHAR strCC32SubclassInfo[]
Definition: commctrl.c:92
WCHAR * LPWSTR
Definition: xmlstorage.h:184
void MONTHCAL_Unregister(void) DECLSPEC_HIDDEN
Definition: monthcal.c:3055
void TOOLTIPS_Register(void) DECLSPEC_HIDDEN
Definition: tooltips.c:2355
void DATETIME_Unregister(void) DECLSPEC_HIDDEN
Definition: datetime.c:1684
static LPWSTR COMCTL32_wSubclass
Definition: commctrl.c:78
#define LOWORD(l)
Definition: pedump.c:82
void STATUS_Unregister(void) DECLSPEC_HIDDEN
Definition: status.c:1354
static const WORD wPattern55AA[]
Definition: commctrl.c:86
void LISTBOX_Register(void) DECLSPEC_HIDDEN
Definition: listbox.c:3054
void THEMING_Initialize(void) DECLSPEC_HIDDEN
Definition: theming.c:108
void FLATSB_Unregister(void) DECLSPEC_HIDDEN
Definition: flatsb.c:285
HBITMAP WINAPI CreateBitmap(_In_ INT cx, _In_ INT cy, _In_ UINT cPlanes, _In_ UINT cBitsPerPel, _In_opt_ const VOID *pvBits)

◆ DrawShadowText()

int WINAPI DrawShadowText ( HDC  hdc,
LPCWSTR  pszText,
UINT  cch,
RECT prc,
DWORD  dwFlags,
COLORREF  crText,
COLORREF  crShadow,
int  ixOffset,
int  iyOffset 
)

Definition at line 1845 of file commctrl.c.

1847 {
1848  COLORREF crOldText;
1849  RECT rcText;
1850  INT iRet, x, y, x2, y2;
1851  BYTE *pBits;
1852  HBITMAP hbm, hbmOld;
1853  BITMAPINFO bi;
1854  HDC hdcMem;
1855  HFONT hOldFont;
1856  BLENDFUNCTION bf;
1857 
1858  /* Create 32 bit DIB section for the shadow */
1859  ZeroMemory(&bi, sizeof(bi));
1860  bi.bmiHeader.biSize = sizeof(bi.bmiHeader);
1861  bi.bmiHeader.biWidth = prc->right - prc->left + 4;
1862  bi.bmiHeader.biHeight = prc->bottom - prc->top + 5; // bottom-up DIB
1863  bi.bmiHeader.biPlanes = 1;
1864  bi.bmiHeader.biBitCount = 32;
1866  hbm = CreateDIBSection(hdc, &bi, DIB_RGB_COLORS, (PVOID*)&pBits, NULL, 0);
1867  if(!hbm)
1868  {
1869  ERR("CreateDIBSection failed\n");
1870  return 0;
1871  }
1872 
1873  /* Create memory device context for new DIB section and select it */
1875  if(!hdcMem)
1876  {
1877  ERR("CreateCompatibleDC failed\n");
1878  DeleteObject(hbm);
1879  return 0;
1880  }
1881 
1882  hbmOld = (HBITMAP)SelectObject(hdcMem, hbm);
1883 
1884  /* Draw text on our helper bitmap */
1886  SetTextColor(hdcMem, RGB(16, 16, 16));
1887  SetBkColor(hdcMem, RGB(0, 0, 0));
1889  SetRect(&rcText, 0, 0, prc->right - prc->left, prc->bottom - prc->top);
1890  DrawTextW(hdcMem, pszText, cch, &rcText, dwFlags);
1891  SelectObject(hdcMem, hOldFont);
1892 
1893  /* Flush GDI so data pointed by pBits is valid */
1894  GdiFlush();
1895 
1896  /* Set alpha of pixels (forget about colors for now. They will be changed in next loop).
1897  We copy text image 4*5 times and each time alpha is added */
1898  for (x = 0; x < bi.bmiHeader.biWidth; ++x)
1899  for (y = 0; y < bi.bmiHeader.biHeight; ++y)
1900  {
1901  BYTE *pDest = &pBits[(y * bi.bmiHeader.biWidth + x) * 4];
1902  UINT Alpha = 0;
1903 
1904  for (x2 = x - 4 + 1; x2 <= x; ++x2)
1905  for (y2 = y; y2 < y + 5; ++y2)
1906  {
1907  if (x2 >= 0 && x2 < bi.bmiHeader.biWidth && y2 >= 0 && y2 < bi.bmiHeader.biHeight)
1908  {
1909  BYTE *pSrc = &pBits[(y2 * bi.bmiHeader.biWidth + x2) * 4];
1910  Alpha += pSrc[0];
1911  }
1912  }
1913 
1914  if (Alpha > 255)
1915  Alpha = 255;
1916  pDest[3] = Alpha;
1917  }
1918 
1919  /* Now set the color of each pixel to shadow color * alpha (see GdiAlphaBlend) */
1920  for (x = 0; x < bi.bmiHeader.biWidth; ++x)
1921  for (y = 0; y < bi.bmiHeader.biHeight; ++y)
1922  {
1923  BYTE *pDest = &pBits[(y * bi.bmiHeader.biWidth + x) * 4];
1924  pDest[0] = GetBValue(crShadow) * pDest[3] / 255;
1925  pDest[1] = GetGValue(crShadow) * pDest[3] / 255;
1926  pDest[2] = GetRValue(crShadow) * pDest[3] / 255;
1927  }
1928 
1929  /* Fix ixOffset of the shadow (tested on Win) */
1930  ixOffset -= 3;
1931  iyOffset -= 3;
1932 
1933  /* Alpha blend helper image to destination DC */
1934  bf.BlendOp = AC_SRC_OVER;
1935  bf.BlendFlags = 0;
1936  bf.SourceConstantAlpha = 255;
1938  GdiAlphaBlend(hdc, prc->left + ixOffset, prc->top + iyOffset, bi.bmiHeader.biWidth, bi.bmiHeader.biHeight, hdcMem, 0, 0, bi.bmiHeader.biWidth, bi.bmiHeader.biHeight, bf);
1939 
1940  /* Delete the helper bitmap */
1941  SelectObject(hdcMem, hbmOld);
1942  DeleteObject(hbm);
1943  DeleteDC(hdcMem);
1944 
1945  /* Finally draw the text over shadow */
1946  crOldText = SetTextColor(hdc, crText);
1948  iRet = DrawTextW(hdc, pszText, cch, prc, dwFlags);
1949  SetTextColor(hdc, crOldText);
1950 
1951  return iRet;
1952 }
BOOL WINAPI GdiAlphaBlend(HDC hdcDst, int xDst, int yDst, int widthDst, int heightDst, HDC hdcSrc, int xSrc, int ySrc, int widthSrc, int heightSrc, BLENDFUNCTION blendFunction)
BITMAPINFOHEADER bmiHeader
Definition: wingdi.h:1454
static HDC
Definition: imagelist.c:92
#define GetRValue(rgb)
Definition: wingdi.h:2913
LONG top
Definition: windef.h:292
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1497
#define ZeroMemory
Definition: winbase.h:1635
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
LONG left
Definition: windef.h:291
#define AC_SRC_ALPHA
Definition: alphablend.c:9
LONG right
Definition: windef.h:293
int32_t INT
Definition: typedefs.h:56
BYTE BlendOp
Definition: wingdi.h:2737
COLORREF WINAPI SetBkColor(_In_ HDC, _In_ COLORREF)
Definition: dc.c:975
#define GetGValue(rgb)
Definition: wingdi.h:2914
int WINAPI SetBkMode(_In_ HDC, _In_ int)
Definition: dc.c:1032
DWORD biCompression
Definition: amvideo.idl:35
#define TRANSPARENT
Definition: wingdi.h:949
static DWORD DWORD void LPSTR DWORD cch
Definition: str.c:201
smooth NULL
Definition: ftsmooth.c:416
DWORD COLORREF
Definition: windef.h:285
BYTE SourceConstantAlpha
Definition: wingdi.h:2739
#define RGB(r, g, b)
Definition: wingdi.h:2918
#define OBJ_FONT
Definition: objidl.idl:1414
HDC hdc
Definition: main.c:9
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
BYTE BlendFlags
Definition: wingdi.h:2738
#define AC_SRC_OVER
Definition: wingdi.h:1351
unsigned char BYTE
Definition: mem.h:68
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG _In_ LONG y2
Definition: winddi.h:3706
#define ERR(fmt,...)
Definition: debug.h:109
BOOL WINAPI GdiFlush(void)
Definition: misc.c:44
COLORREF WINAPI SetTextColor(_In_ HDC, _In_ COLORREF)
Definition: text.c:886
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
BOOL WINAPI DeleteDC(_In_ HDC)
HBITMAP WINAPI CreateDIBSection(HDC hDC, CONST BITMAPINFO *BitmapInfo, UINT Usage, VOID **Bits, HANDLE hSection, DWORD dwOffset)
Definition: bitmap.c:197
_In_ HBITMAP hbm
Definition: ntgdi.h:2776
unsigned int UINT
Definition: ndis.h:50
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG x2
Definition: winddi.h:3706
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
LONG bottom
Definition: windef.h:294
#define GetBValue(rgb)
Definition: wingdi.h:2915
static HBITMAP
Definition: button.c:44
#define DIB_RGB_COLORS
Definition: wingdi.h:366
BYTE AlphaFormat
Definition: wingdi.h:2740
_Out_ LPRECT prc
Definition: ntgdi.h:1658
#define BI_RGB
Definition: precomp.h:35
HGDIOBJ WINAPI GetCurrentObject(_In_ HDC, _In_ UINT)
Definition: dc.c:439
HDC hdcMem
Definition: welcome.c:104
INT WINAPI DrawTextW(HDC hdc, LPCWSTR str, INT count, LPRECT rect, UINT flags)
Definition: defwnd.c:17

Referenced by CDownloadManager::DownloadProgressProc(), and LISTVIEW_DrawItemPart().

◆ DrawStatusTextA()

void WINAPI DrawStatusTextA ( HDC  hdc,
LPCRECT  lprc,
LPCSTR  text,
UINT  style 
)

Definition at line 735 of file commctrl.c.

736 {
737  INT len;
738  LPWSTR textW = NULL;
739 
740  if ( text ) {
741  if ( (len = MultiByteToWideChar( CP_ACP, 0, text, -1, NULL, 0 )) ) {
742  if ( (textW = Alloc( len * sizeof(WCHAR) )) )
743  MultiByteToWideChar( CP_ACP, 0, text, -1, textW, len );
744  }
745  }
747  Free( textW );
748 }
_In_ int _Inout_ LPRECT lprc
Definition: winuser.h:4334
const WCHAR * text
Definition: package.c:1827
#define CP_ACP
Definition: compat.h:99
int32_t INT
Definition: typedefs.h:56
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION Free
Definition: exfuncs.h:656
smooth NULL
Definition: ftsmooth.c:416
__wchar_t WCHAR
Definition: xmlstorage.h:180
PVOID Alloc(IN DWORD dwFlags, IN SIZE_T dwBytes)
Definition: main.c:63
HDC hdc
Definition: main.c:9
GLenum GLsizei len
Definition: glext.h:6722
static const WCHAR textW[]
Definition: itemdlg.c:1559
void WINAPI DrawStatusTextW(HDC hdc, LPCRECT lprc, LPCWSTR text, UINT style)
Definition: commctrl.c:677
#define MultiByteToWideChar
Definition: compat.h:100
WCHAR * LPWSTR
Definition: xmlstorage.h:184
Arabic default style
Definition: afstyles.h:93

◆ DrawStatusTextW()

void WINAPI DrawStatusTextW ( HDC  hdc,
LPCRECT  lprc,
LPCWSTR  text,
UINT  style 
)

Definition at line 677 of file commctrl.c.

678 {
679  RECT r = *lprc;
681 
682  if (style & SBT_POPOUT)
684  else if (style & SBT_NOBORDERS)
685  border = 0;
686 
688 
689  /* now draw text */
690  if (text) {
691  int oldbkmode = SetBkMode (hdc, TRANSPARENT);
692  UINT align = DT_LEFT;
693  int strCnt = 0;
694 
695  if (style & SBT_RTLREADING)
696  FIXME("Unsupported RTL style!\n");
697  r.left += 3;
698  do {
699  if (*text == '\t') {
700  if (strCnt) {
701  DrawTextW (hdc, text - strCnt, strCnt, &r, align|DT_VCENTER|DT_SINGLELINE|DT_NOPREFIX);
702  strCnt = 0;
703  }
704  if (align==DT_RIGHT) {
705  break;
706  }
708  } else {
709  strCnt++;
710  }
711  } while(*text++);
712 
713  if (strCnt) DrawTextW (hdc, text - strCnt, -1, &r, align|DT_VCENTER|DT_SINGLELINE|DT_NOPREFIX);
714  SetBkMode(hdc, oldbkmode);
715  }
716 }
#define SBT_POPOUT
Definition: commctrl.h:1944
#define BDR_RAISEDOUTER
Definition: winuser.h:442
_In_ int _Inout_ LPRECT lprc
Definition: winuser.h:4334
#define SBT_RTLREADING
Definition: commctrl.h:1945
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
const WCHAR * text
Definition: package.c:1827
#define DT_RIGHT
Definition: winuser.h:538
int align(int length, int align)
Definition: dsound8.c:36
#define DT_NOPREFIX
Definition: winuser.h:537
#define BF_ADJUST
Definition: winuser.h:470
#define BF_RECT
Definition: winuser.h:462
int WINAPI SetBkMode(_In_ HDC, _In_ int)
Definition: dc.c:1032
#define DT_LEFT
Definition: winuser.h:534
BOOL WINAPI DrawEdge(_In_ HDC, _Inout_ LPRECT, _In_ UINT, _In_ UINT)
#define FIXME(fmt,...)
Definition: debug.h:110
#define TRANSPARENT
Definition: wingdi.h:949
#define DT_VCENTER
Definition: winuser.h:543
GLint GLint GLsizei GLsizei GLsizei GLint border
Definition: gl.h:1546
HDC hdc
Definition: main.c:9
#define BDR_SUNKENOUTER
Definition: winuser.h:443
#define DT_SINGLELINE
Definition: winuser.h:540
unsigned int UINT
Definition: ndis.h:50
#define DT_CENTER
Definition: winuser.h:527
Arabic default style
Definition: afstyles.h:93
#define SBT_NOBORDERS
Definition: commctrl.h:1943
INT WINAPI DrawTextW(HDC hdc, LPCWSTR str, INT count, LPRECT rect, UINT flags)
Definition: defwnd.c:17

Referenced by DrawStatusTextA(), and STATUSBAR_DrawPart().

◆ GetEffectiveClientRect()

VOID WINAPI GetEffectiveClientRect ( HWND  hwnd,
LPRECT  lpRect,
const INT lpInfo 
)

Definition at line 629 of file commctrl.c.

630 {
631  RECT rcCtrl;
632  const INT *lpRun;
633  HWND hwndCtrl;
634 
635  TRACE("(%p %p %p)\n",
636  hwnd, lpRect, lpInfo);
637 
638  GetClientRect (hwnd, lpRect);
639  lpRun = lpInfo;
640 
641  do {
642  lpRun += 2;
643  if (*lpRun == 0)
644  return;
645  lpRun++;
646  hwndCtrl = GetDlgItem (hwnd, *lpRun);
647  if (GetWindowLongW (hwndCtrl, GWL_STYLE) & WS_VISIBLE) {
648  TRACE("control id 0x%x\n", *lpRun);
649  GetWindowRect (hwndCtrl, &rcCtrl);
650  MapWindowPoints (NULL, hwnd, (LPPOINT)&rcCtrl, 2);
651  SubtractRect (lpRect, lpRect, &rcCtrl);
652  }
653  lpRun++;
654  } while (*lpRun);
655 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
BOOL WINAPI SubtractRect(_Out_ LPRECT, _In_ LPCRECT, _In_ LPCRECT)
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
int32_t INT
Definition: typedefs.h:56
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define GWL_STYLE
Definition: winuser.h:846
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define WS_VISIBLE
Definition: pedump.c:620

Referenced by CShellBrowser::GetBorderDW(), and CShellBrowser::OnSize().

◆ GetMUILanguage()

LANGID WINAPI GetMUILanguage ( VOID  )

Definition at line 1220 of file commctrl.c.

1221 {
1222  return COMCTL32_uiLang;
1223 }
static LANGID COMCTL32_uiLang
Definition: commctrl.c:80

◆ GetWindowSubclass()

BOOL WINAPI GetWindowSubclass ( HWND  hWnd,
SUBCLASSPROC  pfnSubclass,
UINT_PTR  uID,
DWORD_PTR pdwRef 
)

Definition at line 1348 of file commctrl.c.

1350 {
1351  const SUBCLASS_INFO *stack;
1352  const SUBCLASSPROCS *proc;
1353 
1354  TRACE ("(%p, %p, %lx, %p)\n", hWnd, pfnSubclass, uID, pdwRef);
1355 
1356  /* See if we have been called for this window */
1358  if (!stack)
1359  return FALSE;
1360 
1361  proc = stack->SubclassProcs;
1362  while (proc) {
1363  if ((proc->id == uID) &&
1364  (proc->subproc == pfnSubclass)) {
1365  *pdwRef = proc->ref;
1366  return TRUE;
1367  }
1368  proc = proc->next;
1369  }
1370 
1371  return FALSE;
1372 }
#define TRUE
Definition: types.h:120
HWND hWnd
Definition: settings.c:17
static stack_node_t * stack
Definition: rpn_ieee.c:37
static HANDLE proc()
Definition: pdb.c:32
Definition: _stack.h:47
#define TRACE(s)
Definition: solgame.cpp:4
HANDLE WINAPI GetPropW(_In_ HWND, _In_ LPCWSTR)
_In_ SUBCLASSPROC pfnSubclass
Definition: commctrl.h:5027
static LPWSTR COMCTL32_wSubclass
Definition: commctrl.c:78

Referenced by DrawInsert().

◆ InitCommonControls()

◆ InitCommonControlsEx()

◆ InitMUILanguage()

VOID WINAPI InitMUILanguage ( LANGID  uiLang)

Definition at line 1234 of file commctrl.c.

1235 {
1236  COMCTL32_uiLang = uiLang;
1237 }
static LANGID COMCTL32_uiLang
Definition: commctrl.c:80

◆ IsDelimiter()

static BOOL IsDelimiter ( WCHAR  c)
inlinestatic

Definition at line 1795 of file commctrl.c.

1796 {
1797  switch(c)
1798  {
1799  case '/':
1800  case '\\':
1801  case '.':
1802  case ' ':
1803  return TRUE;
1804  }
1805  return FALSE;
1806 }
#define TRUE
Definition: types.h:120
const GLubyte * c
Definition: glext.h:8905

Referenced by PathWordBreakProc().

◆ LoadIconMetric()

HRESULT WINAPI LoadIconMetric ( HINSTANCE  hinst,
const WCHAR name,
int  size,
HICON icon 
)

Definition at line 1977 of file commctrl.c.

1978 {
1979  int cx, cy;
1980 
1981  TRACE("(%p, %s, %d, %p)\n", hinst, debugstr_w(name), size, icon);
1982 
1983  if (size == LIM_SMALL)
1984  {
1987  }
1988  else if (size == LIM_LARGE)
1989  {
1992  }
1993  else
1994  {
1995  *icon = NULL;
1996  return E_INVALIDARG;
1997  }
1998 
1999  return LoadIconWithScaleDown(hinst, name, cx, cy, icon);
2000 }
#define SM_CYSMICON
Definition: winuser.h:1003
#define debugstr_w
Definition: kernel32.h:32
#define SM_CXICON
Definition: winuser.h:962
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:570
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
int WINAPI GetSystemMetrics(_In_ int)
#define SM_CXSMICON
Definition: winuser.h:1002
#define SM_CYICON
Definition: winuser.h:963
HRESULT WINAPI LoadIconWithScaleDown(HINSTANCE hinst, const WCHAR *name, int cx, int cy, HICON *icon)
Definition: commctrl.c:1957
_Out_opt_ int * cx
Definition: commctrl.h:570
Definition: name.c:36
static HINSTANCE hinst
Definition: edit.c:551

◆ LoadIconWithScaleDown()

HRESULT WINAPI LoadIconWithScaleDown ( HINSTANCE  hinst,
const WCHAR name,
int  cx,
int  cy,
HICON icon 
)

Definition at line 1957 of file commctrl.c.

1958 {
1959  TRACE("(%p, %s, %d, %d, %p)\n", hinst, debugstr_w(name), cx, cy, icon);
1960 
1961  *icon = NULL;
1962 
1963  if (!name)
1964  return E_INVALIDARG;
1965 
1966  *icon = LoadImageW(hinst, name, IMAGE_ICON, cx, cy,
1968  if (!*icon)
1969  return HRESULT_FROM_WIN32(GetLastError());
1970 
1971  return S_OK;
1972 }
#define IMAGE_ICON
Definition: winuser.h:212
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
#define LR_LOADFROMFILE
Definition: winuser.h:1082
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_ UINT, _In_ int, _In_ int, _In_ UINT)
Definition: cursoricon.c:2172
#define debugstr_w
Definition: kernel32.h:32
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:570
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define IS_INTRESOURCE(i)
Definition: winuser.h:580
#define S_OK
Definition: intsafe.h:59
_Out_opt_ int * cx
Definition: commctrl.h:570
Definition: name.c:36
static HINSTANCE hinst
Definition: edit.c:551

Referenced by LoadIconMetric().

◆ MenuHelp()

VOID WINAPI MenuHelp ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
HMENU  hMainMenu,
HINSTANCE  hInst,
HWND  hwndStatus,
UINT lpwIDs 
)

Definition at line 480 of file commctrl.c.

482 {
483  UINT uMenuID = 0;
484 
485  if (!IsWindow (hwndStatus))
486  return;
487 
488  switch (uMsg) {
489  case WM_MENUSELECT:
490  TRACE("WM_MENUSELECT wParam=0x%lX lParam=0x%lX\n",
491  wParam, lParam);
492 
493  if ((HIWORD(wParam) == 0xFFFF) && (lParam == 0)) {
494  /* menu was closed */
495  TRACE("menu was closed!\n");
497  }
498  else {
499  /* menu item was selected */
500  if (HIWORD(wParam) & MF_POPUP)
501  uMenuID = *(lpwIDs+1);
502  else
503  uMenuID = (UINT)LOWORD(wParam);
504  TRACE("uMenuID = %u\n", uMenuID);
505 
506  if (uMenuID) {
507  WCHAR szText[256];
508 
509  if (!LoadStringW (hInst, uMenuID, szText, ARRAY_SIZE(szText)))
510  szText[0] = '\0';
511 
513  255 | SBT_NOBORDERS, (LPARAM)szText);
515  }
516  }
517  break;
518 
519  case WM_COMMAND :
520  TRACE("WM_COMMAND wParam=0x%lX lParam=0x%lX\n",
521  wParam, lParam);
522  /* WM_COMMAND is not invalid since it is documented
523  * in the windows api reference. So don't output
524  * any FIXME for WM_COMMAND
525  */
526  WARN("We don't care about the WM_COMMAND\n");
527  break;
528 
529  default:
530  FIXME("Invalid Message 0x%x!\n", uMsg);
531  break;
532  }
533 }
#define TRUE
Definition: types.h:120
BOOL WINAPI IsWindow(_In_opt_ HWND)
#define WARN(fmt,...)
Definition: debug.h:111
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
WPARAM wParam
Definition: combotst.c:138
static const WCHAR szText[]
Definition: dialog.c:139
HWND hwndStatus
Definition: solitaire.cpp:13
#define WM_MENUSELECT
Definition: winuser.h:1723
#define FIXME(fmt,...)
Definition: debug.h:110
#define SB_SIMPLE
Definition: commctrl.h:1930
LONG_PTR LPARAM
Definition: windef.h:208
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define SB_SETTEXTW
Definition: commctrl.h:1914
#define MF_POPUP
Definition: winuser.h:136
#define WM_COMMAND
Definition: winuser.h:1716
HINSTANCE hInst
Definition: dxdiag.c:13
#define ARRAY_SIZE(a)
Definition: main.h:24
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
unsigned int UINT
Definition: ndis.h:50
#define HIWORD(l)
Definition: typedefs.h:246
LPARAM lParam
Definition: combotst.c:139
#define SBT_NOBORDERS
Definition: commctrl.h:1943
#define LOWORD(l)
Definition: pedump.c:82

◆ MirrorIcon()

BOOL WINAPI MirrorIcon ( HICON phicon1,
HICON phicon2 
)

Definition at line 1789 of file commctrl.c.

1790 {
1791  FIXME("(%p, %p): stub\n", phicon1, phicon2);
1792  return FALSE;
1793 }
#define FIXME(fmt,...)
Definition: debug.h:110

◆ PathWordBreakProc()

static int CALLBACK PathWordBreakProc ( LPCWSTR  lpch,
int  ichCurrent,
int  cch,
int  code 
)
static

Definition at line 1808 of file commctrl.c.

1809 {
1810  if (code == WB_ISDELIMITER)
1811  return IsDelimiter(lpch[ichCurrent]);
1812  else
1813  {
1814  int dir = (code == WB_LEFT) ? -1 : 1;
1815  for(; 0 <= ichCurrent && ichCurrent < cch; ichCurrent += dir)
1816  if (IsDelimiter(lpch[ichCurrent])) return ichCurrent;
1817  }
1818  return ichCurrent;
1819 }
#define WB_ISDELIMITER
Definition: winuser.h:549
#define WB_LEFT
Definition: winuser.h:550
static DWORD DWORD void LPSTR DWORD cch
Definition: str.c:201
unsigned int dir
Definition: maze.c:112
static BOOL IsDelimiter(WCHAR c)
Definition: commctrl.c:1795

Referenced by SetPathWordBreakProc().

◆ RemoveWindowSubclass()

BOOL WINAPI RemoveWindowSubclass ( HWND  hWnd,
SUBCLASSPROC  pfnSubclass,
UINT_PTR  uID 
)

Definition at line 1390 of file commctrl.c.

1391 {
1393  LPSUBCLASSPROCS prevproc = NULL;
1395  BOOL ret = FALSE;
1396 
1397  TRACE ("(%p, %p, %lx)\n", hWnd, pfnSubclass, uID);
1398 
1399  /* Find the Subclass to remove */
1401  if (!stack)
1402  return FALSE;
1403 
1404  proc = stack->SubclassProcs;
1405  while (proc) {
1406  if ((proc->id == uID) &&
1407  (proc->subproc == pfnSubclass)) {
1408 
1409  if (!prevproc)
1410  stack->SubclassProcs = proc->next;
1411  else
1412  prevproc->next = proc->next;
1413 
1414  if (stack->stackpos == proc)
1415  stack->stackpos = stack->stackpos->next;
1416 
1417  Free (proc);
1418  ret = TRUE;
1419  break;
1420  }
1421  prevproc = proc;
1422  proc = proc->next;
1423  }
1424 
1425  if (!stack->SubclassProcs && !stack->running) {
1426  TRACE("Last Subclass removed, cleaning up\n");
1427  /* clean up our heap and reset the original window procedure */
1428  if (IsWindowUnicode (hWnd))
1430  else
1432  Free (stack);
1434  }
1435 
1436  return ret;
1437 }
#define TRUE
Definition: types.h:120
HWND hWnd
Definition: settings.c:17
static stack_node_t * stack
Definition: rpn_ieee.c:37
static HANDLE proc()
Definition: pdb.c:32
HANDLE WINAPI RemovePropW(_In_ HWND, _In_ LPCWSTR)
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION Free
Definition: exfuncs.h:656
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
BOOL WINAPI IsWindowUnicode(_In_ HWND)
Definition: _stack.h:47
#define TRACE(s)
Definition: solgame.cpp:4
int ret
#define SetWindowLongPtrA
Definition: winuser.h:5214
uint32_t DWORD_PTR
Definition: typedefs.h:63
struct _SUBCLASSPROCS * next
Definition: comctl32.h:197
#define GWLP_WNDPROC
Definition: treelist.c:66
HANDLE WINAPI GetPropW(_In_ HWND, _In_ LPCWSTR)
_In_ SUBCLASSPROC pfnSubclass
Definition: commctrl.h:5027
#define SetWindowLongPtrW
Definition: winuser.h:5215
static LPWSTR COMCTL32_wSubclass
Definition: commctrl.c:78

Referenced by COMBOEX_ComboWndProc(), COMBOEX_EditWndProc(), CredDialogPasswordSubclassProc(), CDownloadManager::DownloadProgressProc(), DragList_SubclassWindowProc(), init_function_pointers(), init_functions(), PROPSHEET_CleanUp(), PROPSHEET_RemovePage(), TOOLTIPS_SubclassProc(), and UPDOWN_Buddy_SubclassProc().

◆ SetPathWordBreakProc()

LRESULT WINAPI SetPathWordBreakProc ( HWND  hwnd,
BOOL  bSet 
)

Definition at line 1834 of file commctrl.c.

1835 {
1837  (LPARAM)(bSet ? PathWordBreakProc : NULL));
1838 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define EM_SETWORDBREAKPROC
Definition: winuser.h:1981
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
static int CALLBACK PathWordBreakProc(LPCWSTR lpch, int ichCurrent, int cch, int code)
Definition: commctrl.c:1808

Referenced by COMBOEX_SetExtendedStyle().

◆ SetWindowSubclass()

BOOL WINAPI SetWindowSubclass ( HWND  hWnd,
SUBCLASSPROC  pfnSubclass,
UINT_PTR  uIDSubclass,
DWORD_PTR  dwRef 
)

Definition at line 1261 of file commctrl.c.

1263 {
1266 
1267  TRACE ("(%p, %p, %lx, %lx)\n", hWnd, pfnSubclass, uIDSubclass, dwRef);
1268 
1269  if (!hWnd || !pfnSubclass)
1270  return FALSE;
1271 
1272  /* Since the window procedure that we set here has two additional arguments,
1273  * we can't simply set it as the new window procedure of the window. So we
1274  * set our own window procedure and then calculate the other two arguments
1275  * from there. */
1276 
1277  /* See if we have been called for this window */
1279  if (!stack) {
1280  /* allocate stack */
1281  stack = Alloc (sizeof(SUBCLASS_INFO));
1282  if (!stack) {
1283  ERR ("Failed to allocate our Subclassing stack\n");
1284  return FALSE;
1285  }
1287 
1288  /* set window procedure to our own and save the current one */
1289  if (IsWindowUnicode (hWnd))
1292  else
1295  }
1296  else {
1297  /* Check to see if we have called this function with the same uIDSubClass
1298  * and pfnSubclass */
1299  proc = stack->SubclassProcs;
1300  while (proc) {
1301  if ((proc->id == uIDSubclass) &&
1302  (proc->subproc == pfnSubclass)) {
1303  proc->ref = dwRef;
1304  return TRUE;
1305  }
1306  proc = proc->next;
1307  }
1308  }
1309 
1310  proc = Alloc(sizeof(SUBCLASSPROCS));
1311  if (!proc) {
1312  ERR ("Failed to allocate subclass entry in stack\n");
1313  if (IsWindowUnicode (hWnd))
1315  else
1317  Free (stack);
1319  return FALSE;
1320  }
1321 
1322  proc->subproc = pfnSubclass;
1323  proc->ref = dwRef;
1324  proc->id = uIDSubclass;
1325  proc->next = stack->SubclassProcs;
1326  stack->SubclassProcs = proc;
1327 
1328  return TRUE;
1329 }
static LRESULT WINAPI COMCTL32_SubclassProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: commctrl.c:1445
#define TRUE
Definition: types.h:120
HWND hWnd
Definition: settings.c:17
static stack_node_t * stack
Definition: rpn_ieee.c:37
static HANDLE proc()
Definition: pdb.c:32
HANDLE WINAPI RemovePropW(_In_ HWND, _In_ LPCWSTR)
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION Free
Definition: exfuncs.h:656
BOOL WINAPI IsWindowUnicode(_In_ HWND)
Definition: _stack.h:47
#define TRACE(s)
Definition: solgame.cpp:4
BOOL WINAPI SetPropW(_In_ HWND, _In_ LPCWSTR, _In_opt_ HANDLE)
PVOID Alloc(IN DWORD dwFlags, IN SIZE_T dwBytes)
Definition: main.c:63
#define SetWindowLongPtrA
Definition: winuser.h:5214
uint32_t DWORD_PTR
Definition: typedefs.h:63
#define GWLP_WNDPROC
Definition: treelist.c:66
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2859
#define ERR(fmt,...)
Definition: debug.h:109
HANDLE WINAPI GetPropW(_In_ HWND, _In_ LPCWSTR)
_In_ SUBCLASSPROC pfnSubclass
Definition: commctrl.h:5027
#define SetWindowLongPtrW
Definition: winuser.h:5215
static LPWSTR COMCTL32_wSubclass
Definition: commctrl.c:78

Referenced by COMBOEX_Create(), COMBOEX_Destroy(), CredDialogInit(), CDownloadManager::DownloadDlgProc(), init_function_pointers(), init_functions(), MakeDragList(), PROPSHEET_CreatePage(), TbdInitializeDocks(), Test_MessagesNonThemed(), Test_MessagesThemed(), TOOLTIPS_AddToolT(), TOOLTIPS_ResetSubclass(), UPDOWN_ResetSubclass(), and UPDOWN_SetBuddy().

◆ ShowHideMenuCtl()

BOOL WINAPI ShowHideMenuCtl ( HWND  hwnd,
UINT_PTR  uFlags,
LPINT  lpInfo 
)

Definition at line 567 of file commctrl.c.

568 {
569  LPINT lpMenuId;
570 
571  TRACE("%p, %lx, %p\n", hwnd, uFlags, lpInfo);
572 
573  if (lpInfo == NULL)
574  return FALSE;
575 
576  if (!(lpInfo[0]) || !(lpInfo[1]))
577  return FALSE;
578 
579  /* search for control */
580  lpMenuId = &lpInfo[2];
581  while (*lpMenuId != uFlags)
582  lpMenuId += 2;
583 
584  if (GetMenuState ((HMENU)(DWORD_PTR)lpInfo[1], uFlags, MF_BYCOMMAND) & MFS_CHECKED) {
585  /* uncheck menu item */
586  CheckMenuItem ((HMENU)(DWORD_PTR)lpInfo[0], *lpMenuId, MF_BYCOMMAND | MF_UNCHECKED);
587 
588  /* hide control */
589  lpMenuId++;
590  SetWindowPos (GetDlgItem (hwnd, *lpMenuId), 0, 0, 0, 0, 0,
592  }
593  else {
594  /* check menu item */
595  CheckMenuItem ((HMENU)(DWORD_PTR)lpInfo[0], *lpMenuId, MF_BYCOMMAND | MF_CHECKED);
596 
597  /* show control */
598  lpMenuId++;
599  SetWindowPos (GetDlgItem (hwnd, *lpMenuId), 0, 0, 0, 0, 0,
601  }
602 
603  return TRUE;
604 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define TRUE
Definition: types.h:120
#define MF_BYCOMMAND
Definition: winuser.h:202
UINT WINAPI GetMenuState(_In_ HMENU, _In_ UINT, _In_ UINT)
UINT uFlags
Definition: api.c:60
#define SWP_HIDEWINDOW
Definition: winuser.h:1226
smooth NULL
Definition: ftsmooth.c:416
#define MF_CHECKED
Definition: winuser.h:132
#define TRACE(s)
Definition: solgame.cpp:4
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
DWORD WINAPI CheckMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
uint32_t DWORD_PTR
Definition: typedefs.h:63
#define MF_UNCHECKED
Definition: winuser.h:204
#define SWP_SHOWWINDOW
Definition: winuser.h:1233
#define MFS_CHECKED
Definition: winuser.h:742
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
int * LPINT
Definition: windef.h:178

◆ unregister_versioned_classes()

static void unregister_versioned_classes ( void  )
static

Definition at line 305 of file commctrl.c.

306 {
307 #define VERSION "6.0.2600.2982!"
308  static const char *classes[] =
309  {
312  VERSION "ComboLBox",
316  };
317  int i;
318 
319  for (i = 0; i < ARRAY_SIZE(classes); i++)
320  UnregisterClassA(classes[i], NULL);
321 
322 #undef VERSION
323 }
#define WC_STATICA
Definition: commctrl.h:4650
#define WC_COMBOBOXA
Definition: commctrl.h:4687
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 WC_EDITA
Definition: commctrl.h:4657
smooth NULL
Definition: ftsmooth.c:416
#define WC_BUTTONA
Definition: commctrl.h:4594
#define ARRAY_SIZE(a)
Definition: main.h:24
#define WC_LISTBOXA
Definition: commctrl.h:4681
BOOL WINAPI UnregisterClassA(_In_ LPCSTR, HINSTANCE)
#define VERSION

Referenced by DllMain().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( commctrl  )

Variable Documentation

◆ comctl32_color

◆ COMCTL32_hModule

◆ COMCTL32_hPattern55AABitmap

HBITMAP COMCTL32_hPattern55AABitmap = NULL
static

Definition at line 84 of file commctrl.c.

Referenced by DllMain().

◆ COMCTL32_hPattern55AABrush

HBRUSH COMCTL32_hPattern55AABrush = NULL

Definition at line 81 of file commctrl.c.

Referenced by DllMain(), TAB_EraseTabInterior(), TOOLBAR_DrawButton(), and TRACKBAR_DrawThumb().

◆ COMCTL32_uiLang

LANGID COMCTL32_uiLang = MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL)
static

Definition at line 80 of file commctrl.c.

Referenced by GetMUILanguage(), and InitMUILanguage().

◆ COMCTL32_wSubclass

LPWSTR COMCTL32_wSubclass = NULL
static

◆ strCC32SubclassInfo

const WCHAR strCC32SubclassInfo[]
static
Initial value:
= {
'C','C','3','2','S','u','b','c','l','a','s','s','I','n','f','o',0
}

Definition at line 92 of file commctrl.c.

Referenced by DllMain().

◆ wPattern55AA

const WORD wPattern55AA[]
static
Initial value:
=
{
0x5555, 0xaaaa, 0x5555, 0xaaaa,
0x5555, 0xaaaa, 0x5555, 0xaaaa
}

Definition at line 86 of file commctrl.c.

Referenced by DllMain(), and UserInitialize().