ReactOS  0.4.14-dev-552-g2fad488
control.c File Reference
#include <assert.h>
#include <windef.h>
#include <winbase.h>
#include <shlwapi.h>
#include <shellapi.h>
#include <wine/debug.h>
#include <strsafe.h>
#include "cpanel.h"
#include "wine/unicode.h"
Include dependency graph for control.c:

Go to the source code of this file.

Macros

#define WIN32_NO_STATUS
 
#define _INC_WINDOWS
 
#define NO_SHLWAPI_REG
 
#define IDC_LISTVIEW   1000
 
#define IDC_STATUSBAR   1001
 
#define NUM_COLUMNS   2
 
#define LISTVIEW_DEFSTYLE
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (shlctrl)
 
void Control_UnloadApplet (CPlApplet *applet)
 
CPlAppletControl_LoadApplet (HWND hWnd, LPCWSTR cmd, CPanel *panel)
 
static BOOL Control_CreateListView (CPanel *panel)
 
static void Control_WndProc_Create (HWND hWnd, const CREATESTRUCTW *cs)
 
static void Control_FreeCPlItems (HWND hWnd, CPanel *panel)
 
static void Control_UpdateListViewStyle (CPanel *panel, UINT style, UINT id)
 
static CPlItemControl_GetCPlItem_From_MenuID (HWND hWnd, UINT id)
 
static CPlItemControl_GetCPlItem_From_ListView (CPanel *panel)
 
static void Control_StartApplet (HWND hWnd, CPlItem *item)
 
static LRESULT WINAPI Control_WndProc (HWND hWnd, UINT wMsg, WPARAM lParam1, LPARAM lParam2)
 
static void Control_DoInterface (CPanel *panel, HWND hWnd, HINSTANCE hInst)
 
static void Control_RegisterRegistryApplets (HWND hWnd, CPanel *panel, HKEY hkey_root, LPCWSTR szRepPath)
 
static void Control_DoWindow (CPanel *panel, HWND hWnd, HINSTANCE hInst)
 
static void Control_DoLaunch (CPanel *panel, HWND hWnd, LPCWSTR wszCmd)
 
void WINAPI Control_RunDLLW (HWND hWnd, HINSTANCE hInst, LPCWSTR cmd, DWORD nCmdShow)
 
void WINAPI Control_RunDLLA (HWND hWnd, HINSTANCE hInst, LPCSTR cmd, DWORD nCmdShow)
 
HRESULT WINAPI Control_FillCache_RunDLLW (HWND hWnd, HANDLE hModule, DWORD w, DWORD x)
 
HRESULT WINAPI Control_FillCache_RunDLLA (HWND hWnd, HANDLE hModule, DWORD w, DWORD x)
 
DWORD WINAPI CallCPLEntry16 (HMODULE hMod, FARPROC pFunc, DWORD dw3, DWORD dw4, DWORD dw5, DWORD dw6)
 

Macro Definition Documentation

◆ _INC_WINDOWS

#define _INC_WINDOWS

Definition at line 24 of file control.c.

◆ IDC_LISTVIEW

#define IDC_LISTVIEW   1000

Definition at line 212 of file control.c.

◆ IDC_STATUSBAR

#define IDC_STATUSBAR   1001

Definition at line 213 of file control.c.

◆ LISTVIEW_DEFSTYLE

#define LISTVIEW_DEFSTYLE
Value:
LVS_SORTASCENDING | LVS_AUTOARRANGE | LVS_SINGLESEL)
#define WS_CHILD
Definition: pedump.c:617
#define LVS_AUTOARRANGE
Definition: commctrl.h:2268
#define LVS_SINGLESEL
Definition: commctrl.h:2262
#define WS_TABSTOP
Definition: pedump.c:634
#define WS_VISIBLE
Definition: pedump.c:620

Definition at line 216 of file control.c.

◆ NO_SHLWAPI_REG

#define NO_SHLWAPI_REG

Definition at line 28 of file control.c.

◆ NUM_COLUMNS

#define NUM_COLUMNS   2

Definition at line 215 of file control.c.

◆ WIN32_NO_STATUS

#define WIN32_NO_STATUS

Definition at line 23 of file control.c.

Function Documentation

◆ CallCPLEntry16()

DWORD WINAPI CallCPLEntry16 ( HMODULE  hMod,
FARPROC  pFunc,
DWORD  dw3,
DWORD  dw4,
DWORD  dw5,
DWORD  dw6 
)

Definition at line 947 of file control.c.

948 {
949  FIXME("(%p, %p, %08x, %08x, %08x, %08x): stub.\n", hMod, pFunc, dw3, dw4, dw5, dw6);
950  return 0x0deadbee;
951 }
#define FIXME(fmt,...)
Definition: debug.h:110

◆ Control_CreateListView()

static BOOL Control_CreateListView ( CPanel panel)
static

Definition at line 219 of file control.c.

220 {
221  RECT ws, sb;
222  WCHAR empty_string[] = {0};
224  LVCOLUMNW lvc;
225 
226  /* Create list view */
227  GetClientRect(panel->hWndStatusBar, &sb);
228  GetClientRect(panel->hWnd, &ws);
229 
231  empty_string, LISTVIEW_DEFSTYLE | LVS_ICON,
232  0, 0, ws.right - ws.left, ws.bottom - ws.top -
233  (sb.bottom - sb.top), panel->hWnd,
234  (HMENU) IDC_LISTVIEW, panel->hInst, NULL);
235 
236  if (!panel->hWndListView)
237  return FALSE;
238 
239  /* Create image lists for list view */
244 
247 
248  /* Create columns for list view */
250  lvc.pszText = buf;
251  lvc.fmt = LVCFMT_LEFT;
252 
253  /* Name column */
254  lvc.iSubItem = 0;
255  lvc.cx = (ws.right - ws.left) / 3;
256  LoadStringW(shell32_hInstance, IDS_CPANEL_NAME, buf, sizeof(buf) / sizeof(buf[0]));
257 
258  if (ListView_InsertColumnW(panel->hWndListView, 0, &lvc) == -1)
259  return FALSE;
260 
261  /* Description column */
262  lvc.iSubItem = 1;
263  lvc.cx = ((ws.right - ws.left) / 3) * 2;
264  LoadStringW(shell32_hInstance, IDS_CPANEL_DESCRIPTION, buf, sizeof(buf) /
265  sizeof(buf[0]));
266 
267  if (ListView_InsertColumnW(panel->hWndListView, 1, &lvc) == -1)
268  return FALSE;
269 
270  return(TRUE);
271 }
HWND hWndListView
Definition: cpanel.h:61
#define TRUE
Definition: types.h:120
const char * ws
Definition: skip_ws.cpp:7
#define LVCF_WIDTH
Definition: commctrl.h:2583
#define LVSIL_SMALL
Definition: commctrl.h:2295
#define LVCF_TEXT
Definition: commctrl.h:2584
HWND hWnd
Definition: cpanel.h:58
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
superblock * sb
Definition: btrfs.c:4137
HIMAGELIST hImageListSmall
Definition: cpanel.h:63
#define WC_LISTVIEWW
Definition: commctrl.h:2253
#define LVCFMT_LEFT
Definition: commctrl.h:2594
#define SM_CYSMICON
Definition: winuser.h:1003
HINSTANCE hInst
Definition: cpanel.h:59
#define MAX_STRING_LEN
Definition: precomp.h:36
#define LISTVIEW_DEFSTYLE
Definition: control.c:216
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
#define ILC_COLOR32
Definition: commctrl.h:354
#define LVCF_SUBITEM
Definition: commctrl.h:2585
HIMAGELIST WINAPI ImageList_Create(INT cx, INT cy, UINT flags, INT cInitial, INT cGrow)
Definition: imagelist.c:804
HWND hWndStatusBar
Definition: cpanel.h:64
HINSTANCE shell32_hInstance
Definition: misc.cpp:82
#define SM_CXICON
Definition: winuser.h:962
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
__wchar_t WCHAR
Definition: xmlstorage.h:180
LPWSTR pszText
Definition: commctrl.h:2563
int WINAPI GetSystemMetrics(_In_ int)
#define LVS_ICON
Definition: commctrl.h:2257
#define SM_CXSMICON
Definition: winuser.h:1002
#define SM_CYICON
Definition: winuser.h:963
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 ILC_MASK
Definition: commctrl.h:347
#define LVSIL_NORMAL
Definition: commctrl.h:2294
#define LVM_SETIMAGELIST
Definition: commctrl.h:2299
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define LVCF_FMT
Definition: commctrl.h:2582
#define WS_EX_CLIENTEDGE
Definition: winuser.h:384
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HIMAGELIST hImageListLarge
Definition: cpanel.h:62
#define IDC_LISTVIEW
Definition: control.c:212
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60

Referenced by Control_WndProc_Create().

◆ Control_DoInterface()

static void Control_DoInterface ( CPanel panel,
HWND  hWnd,
HINSTANCE  hInst 
)
static

Definition at line 635 of file control.c.

636 {
637  WNDCLASSEXW wc;
638  MSG msg;
640  const WCHAR className[] = {'S','h','e','l','l','_','C','o','n','t','r','o',
641  'l','_','W','n','d','C','l','a','s','s',0};
642 
643  LoadStringW(shell32_hInstance, IDS_CPANEL_TITLE, appName, sizeof(appName) / sizeof(appName[0]));
644 
645  wc.cbSize = sizeof(wc);
648  wc.cbClsExtra = 0;
649  wc.cbWndExtra = sizeof(CPlApplet*);
650  wc.hInstance = panel->hInst = hInst;
652  wc.hCursor = LoadCursorW( 0, (LPWSTR)IDC_ARROW );
654  wc.lpszMenuName = NULL;
655  wc.lpszClassName = className;
658 
659  if (!RegisterClassExW(&wc)) return;
660 
665  hWnd, NULL, hInst, panel);
666  if (!panel->hWnd) return;
667 
668  while (GetMessageW(&msg, panel->hWnd, 0, 0)) {
671  }
672 }
HGDIOBJ WINAPI GetStockObject(_In_ int)
BOOL WINAPI TranslateMessage(_In_ const MSG *)
#define LR_SHARED
Definition: winuser.h:1090
#define IMAGE_ICON
Definition: winuser.h:212
int cbWndExtra
Definition: winuser.h:3195
HWND hWnd
Definition: cpanel.h:58
#define IDI_SHELL_CONTROL_PANEL
Definition: shresdef.h:497
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
HWND hWnd
Definition: settings.c:17
#define CS_HREDRAW
Definition: winuser.h:648
#define SM_CYSMICON
Definition: winuser.h:1003
HICON hIcon
Definition: winuser.h:3197
HINSTANCE hInst
Definition: cpanel.h:59
#define WHITE_BRUSH
Definition: wingdi.h:901
#define MAX_STRING_LEN
Definition: precomp.h:36
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
ATOM WINAPI RegisterClassExW(_In_ CONST WNDCLASSEXW *)
LPCWSTR lpszMenuName
Definition: winuser.h:3200
HINSTANCE shell32_hInstance
Definition: misc.cpp:82
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_ UINT, _In_ int, _In_ int, _In_ UINT)
Definition: cursoricon.c:2172
#define CW_USEDEFAULT
Definition: winuser.h:225
smooth NULL
Definition: ftsmooth.c:416
int cbClsExtra
Definition: winuser.h:3194
LPCWSTR lpszClassName
Definition: winuser.h:3201
#define CS_VREDRAW
Definition: winuser.h:653
__wchar_t WCHAR
Definition: xmlstorage.h:180
HBRUSH hbrBackground
Definition: winuser.h:3199
UINT cbSize
Definition: winuser.h:3191
int WINAPI GetSystemMetrics(_In_ int)
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2074
HINSTANCE hInstance
Definition: winuser.h:3196
#define SM_CXSMICON
Definition: winuser.h:1002
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)
HCURSOR hCursor
Definition: winuser.h:3198
UINT style
Definition: winuser.h:3192
WNDPROC lpfnWndProc
Definition: winuser.h:3193
static LRESULT WINAPI Control_WndProc(HWND hWnd, UINT wMsg, WPARAM lParam1, LPARAM lParam2)
Definition: control.c:470
HINSTANCE hInst
Definition: dxdiag.c:13
BOOL WINAPI GetMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
HICON hIconSm
Definition: winuser.h:3202
#define msg(x)
Definition: auth_time.c:54
#define IDC_ARROW
Definition: winuser.h:682
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2044
const char * appName(const char *argv0)
Definition: loadlib.c:89
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define WS_VISIBLE
Definition: pedump.c:620

Referenced by Control_DoWindow().

◆ Control_DoLaunch()

static void Control_DoLaunch ( CPanel panel,
HWND  hWnd,
LPCWSTR  wszCmd 
)
static

Definition at line 742 of file control.c.

751 {
752  LPWSTR buffer;
753  LPWSTR beg = NULL;
754  LPWSTR end;
755  WCHAR ch;
756  LPWSTR ptr;
757  signed sp = -1;
758  LPWSTR extraPmtsBuf = NULL;
759  LPWSTR extraPmts = NULL;
760  BOOL quoted = FALSE;
761  CPlApplet *applet;
762 
763  buffer = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(wszCmd) + 1) * sizeof(*wszCmd));
764  if (!buffer) return;
765 
766  end = lstrcpyW(buffer, wszCmd);
767 
768  for (;;) {
769  ch = *end;
770  if (ch == '"') quoted = !quoted;
771  if (!quoted && (ch == ' ' || ch == ',' || ch == '\0')) {
772  *end = '\0';
773  if (beg) {
774  if (*beg == '@') {
775  sp = atoiW(beg + 1);
776  } else if (*beg == '\0') {
777  sp = -1;
778  } else {
779  extraPmtsBuf = beg;
780  }
781  }
782  if (ch == '\0') break;
783  beg = end + 1;
784  if (ch == ' ') while (end[1] == ' ') end++;
785  }
786  end++;
787  }
788  while ((ptr = StrChrW(buffer, '"')))
789  memmove(ptr, ptr+1, lstrlenW(ptr)*sizeof(WCHAR));
790 
791  /* now check for any quotes in extraPmtsBuf and remove */
792  if (extraPmtsBuf != NULL)
793  {
794  beg = end = extraPmtsBuf;
795  quoted = FALSE;
796 
797  for (;;) {
798  ch = *end;
799  if (ch == '"') quoted = !quoted;
800  if (!quoted && (ch == ' ' || ch == ',' || ch == '\0')) {
801  *end = '\0';
802  if (beg) {
803  if (*beg != '\0') {
804  extraPmts = beg;
805  }
806  }
807  if (ch == '\0') break;
808  beg = end + 1;
809  if (ch == ' ') while (end[1] == ' ') end++;
810  }
811  end++;
812  }
813 
814  while ((ptr = StrChrW(extraPmts, '"')))
815  memmove(ptr, ptr+1, lstrlenW(ptr)*sizeof(WCHAR));
816 
817  if (extraPmts == NULL)
818  extraPmts = extraPmtsBuf;
819  }
820 
821  /* Now check if there had been a numerical value in the extra params */
822  if ((extraPmts) && (*extraPmts == '@') && (sp == -1)) {
823  sp = atoiW(extraPmts + 1);
824  }
825 
826  TRACE("cmd %s, extra %s, sp %d\n", debugstr_w(buffer), debugstr_w(extraPmts), sp);
827 
828  applet = Control_LoadApplet(hWnd, buffer, panel);
829  if (applet)
830  {
831 #ifdef __REACTOS__
832  ULONG_PTR cookie;
833  BOOL bActivated;
834 #endif
835  /* we've been given a textual parameter (or none at all) */
836  if (sp == -1) {
837  while ((++sp) != applet->count) {
838  TRACE("sp %d, name %s\n", sp, debugstr_w(applet->info[sp].name));
839 
840  if (StrCmpIW(extraPmts, applet->info[sp].name) == 0)
841  break;
842  }
843  }
844 
845  if (sp >= applet->count) {
846  WARN("Out of bounds (%u >= %u), setting to 0\n", sp, applet->count);
847  sp = 0;
848  }
849 
850 #ifdef __REACTOS__
851  bActivated = (applet->hActCtx != INVALID_HANDLE_VALUE ? ActivateActCtx(applet->hActCtx, &cookie) : FALSE);
852 #endif
853 
854  if (!applet->proc(applet->hWnd, CPL_STARTWPARMSW, sp, (LPARAM)extraPmts))
855  applet->proc(applet->hWnd, CPL_DBLCLK, sp, applet->info[sp].data);
856 
857  Control_UnloadApplet(applet);
858 
859 #ifdef __REACTOS__
860  if (bActivated)
861  DeactivateActCtx(0, cookie);
862 #endif
863 
864  }
865 
867 }
BOOL WINAPI ActivateActCtx(IN HANDLE hActCtx, OUT PULONG_PTR ulCookie)
Definition: actctx.c:237
#define memmove(s1, s2, n)
Definition: mkisofs.h:881
struct applet_info info[1]
Definition: cpanel.h:52
#define WARN(fmt,...)
Definition: debug.h:111
HWND hWnd
Definition: settings.c:17
#define INVALID_HANDLE_VALUE
Definition: compat.h:399
GLuint buffer
Definition: glext.h:5915
GLuint GLuint end
Definition: gl.h:1545
#define lstrlenW
Definition: compat.h:415
#define CPL_DBLCLK
Definition: cpl.h:16
uint32_t ULONG_PTR
Definition: typedefs.h:63
BOOL WINAPI DeactivateActCtx(IN DWORD dwFlags, IN ULONG_PTR ulCookie)
Definition: actctx.c:268
APPLET_PROC proc
Definition: cpanel.h:51
unsigned int BOOL
Definition: ntddk_ex.h:94
#define debugstr_w
Definition: kernel32.h:32
static PVOID ptr
Definition: dispmode.c:27
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned count
Definition: cpanel.h:49
void Control_UnloadApplet(CPlApplet *applet)
Definition: control.c:40
#define CPL_STARTWPARMSW
Definition: cpl.h:21
HWND hWnd
Definition: cpanel.h:47
#define lstrcpyW
Definition: compat.h:414
LPWSTR WINAPI StrChrW(LPCWSTR lpszStr, WCHAR ch)
Definition: string.c:468
CPlApplet * Control_LoadApplet(HWND hWnd, LPCWSTR cmd, CPanel *panel)
Definition: control.c:56
static const WCHAR sp[]
Definition: suminfo.c:288
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define HeapFree(x, y, z)
Definition: compat.h:402
int WINAPI StrCmpIW(LPCWSTR lpszStr, LPCWSTR lpszComp)
Definition: string.c:353
WINE_UNICODE_INLINE int atoiW(const WCHAR *str)
Definition: unicode.h:315

Referenced by Control_RunDLLW().

◆ Control_DoWindow()

static void Control_DoWindow ( CPanel panel,
HWND  hWnd,
HINSTANCE  hInst 
)
static

Definition at line 698 of file control.c.

699 {
700  HANDLE h;
703  static const WCHAR wszAllCpl[] = {'*','.','c','p','l',0};
704  static const WCHAR wszRegPath[] = {'S','O','F','T','W','A','R','E','\\','M','i','c','r','o','s','o','f','t',
705  '\\','W','i','n','d','o','w','s','\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n',
706  '\\','C','o','n','t','r','o','l',' ','P','a','n','e','l','\\','C','p','l','s',0};
707  WCHAR *p;
708 
709  /* first add .cpl files in the system directory */
711  p = buffer + strlenW(buffer);
712  *p++ = '\\';
713  lstrcpyW(p, wszAllCpl);
714 
716  do {
717  lstrcpyW(p, fd.cFileName);
718  Control_LoadApplet(hWnd, buffer, panel);
719  } while (FindNextFileW(h, &fd));
720  FindClose(h);
721  }
722 
723  /* now check for cpls in the registry */
726 
727  Control_DoInterface(panel, hWnd, hInst);
728 }
BOOL WINAPI FindNextFileW(IN HANDLE hFindFile, OUT LPWIN32_FIND_DATAW lpFindFileData)
Definition: find.c:382
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
#define HKEY_CURRENT_USER
Definition: winreg.h:11
HWND hWnd
Definition: settings.c:17
static void Control_DoInterface(CPanel *panel, HWND hWnd, HINSTANCE hInst)
Definition: control.c:635
#define INVALID_HANDLE_VALUE
Definition: compat.h:399
GLuint buffer
Definition: glext.h:5915
static int fd
Definition: io.c:51
static void Control_RegisterRegistryApplets(HWND hWnd, CPanel *panel, HKEY hkey_root, LPCWSTR szRepPath)
Definition: control.c:674
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define MAX_PATH
Definition: compat.h:26
HINSTANCE hInst
Definition: dxdiag.c:13
#define lstrcpyW
Definition: compat.h:414
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
Definition: path.c:2312
CPlApplet * Control_LoadApplet(HWND hWnd, LPCWSTR cmd, CPanel *panel)
Definition: control.c:56
GLfloat GLfloat p
Definition: glext.h:8902
HANDLE WINAPI FindFirstFileW(IN LPCWSTR lpFileName, OUT LPWIN32_FIND_DATAW lpFindFileData)
Definition: find.c:320
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
BOOL WINAPI FindClose(HANDLE hFindFile)
Definition: find.c:502

Referenced by Control_RunDLLW().

◆ Control_FillCache_RunDLLA()

HRESULT WINAPI Control_FillCache_RunDLLA ( HWND  hWnd,
HANDLE  hModule,
DWORD  w,
DWORD  x 
)

Definition at line 921 of file control.c.

922 {
924 }
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6102
HWND hWnd
Definition: settings.c:17
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
HRESULT WINAPI Control_FillCache_RunDLLW(HWND hWnd, HANDLE hModule, DWORD w, DWORD x)
Definition: control.c:911
HMODULE hModule
Definition: animate.c:44

◆ Control_FillCache_RunDLLW()

HRESULT WINAPI Control_FillCache_RunDLLW ( HWND  hWnd,
HANDLE  hModule,
DWORD  w,
DWORD  x 
)

Definition at line 911 of file control.c.

912 {
913  FIXME("%p %p 0x%08x 0x%08x stub\n", hWnd, hModule, w, x);
914  return S_OK;
915 }
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6102
HWND hWnd
Definition: settings.c:17
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define FIXME(fmt,...)
Definition: debug.h:110
#define S_OK
Definition: intsafe.h:59
HMODULE hModule
Definition: animate.c:44

Referenced by Control_FillCache_RunDLLA().

◆ Control_FreeCPlItems()

static void Control_FreeCPlItems ( HWND  hWnd,
CPanel panel 
)
static

Definition at line 367 of file control.c.

368 {
369  HMENU hMenu, hSubMenu;
370  MENUITEMINFOW mii;
371  unsigned int i;
372 
373  /* get the File menu */
374  hMenu = GetMenu(hWnd);
375 
376  if (!hMenu)
377  return;
378 
379  hSubMenu = GetSubMenu(hMenu, 0);
380 
381  if (!hSubMenu)
382  return;
383 
384  /* loop and free the item data */
385  for (i = IDM_CPANEL_APPLET_BASE; i <= IDM_CPANEL_APPLET_BASE + panel->total_subprogs; i++)
386  {
387  mii.cbSize = sizeof(MENUITEMINFOW);
388  mii.fMask = MIIM_DATA;
389 
390  if (!GetMenuItemInfoW(hSubMenu, i, FALSE, &mii))
391  continue;
392 
394  }
395 }
HWND hWnd
Definition: settings.c:17
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
BOOL WINAPI GetMenuItemInfoW(_In_ HMENU, _In_ UINT, _In_ BOOL, _Inout_ LPMENUITEMINFOW)
#define GetProcessHeap()
Definition: compat.h:403
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
unsigned total_subprogs
Definition: cpanel.h:60
#define MIIM_DATA
Definition: winuser.h:721
HMENU WINAPI GetMenu(_In_ HWND)
ULONG_PTR dwItemData
Definition: winuser.h:3243
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
struct tagMENUITEMINFOW MENUITEMINFOW
#define HeapFree(x, y, z)
Definition: compat.h:402

Referenced by Control_WndProc().

◆ Control_GetCPlItem_From_ListView()

static CPlItem* Control_GetCPlItem_From_ListView ( CPanel panel)
static

Definition at line 436 of file control.c.

437 {
438  LVITEMW lvItem;
439  int selitem;
440 
442  | LVNI_SELECTED);
443 
444  if (selitem != -1)
445  {
446  lvItem.iItem = selitem;
447  lvItem.mask = LVIF_PARAM;
448 
449  if (SendMessageW(panel->hWndListView, LVM_GETITEMW, 0, (LPARAM) &lvItem))
450  return (CPlItem *) lvItem.lParam;
451  }
452 
453  return NULL;
454 }
HWND hWndListView
Definition: cpanel.h:61
#define LVNI_SELECTED
Definition: commctrl.h:2420
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
#define LVNI_FOCUSED
Definition: commctrl.h:2419
UINT mask
Definition: commctrl.h:2356
Definition: cpanel.h:68
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define LVM_GETITEMW
Definition: commctrl.h:2386
#define LVIF_PARAM
Definition: commctrl.h:2307
#define LVM_GETNEXTITEM
Definition: commctrl.h:2429

Referenced by Control_WndProc().

◆ Control_GetCPlItem_From_MenuID()

static CPlItem* Control_GetCPlItem_From_MenuID ( HWND  hWnd,
UINT  id 
)
static

Definition at line 411 of file control.c.

412 {
413  HMENU hMenu, hSubMenu;
414  MENUITEMINFOW mii;
415 
416  /* retrieve the CPlItem structure from the menu item data */
417  hMenu = GetMenu(hWnd);
418 
419  if (!hMenu)
420  return NULL;
421 
422  hSubMenu = GetSubMenu(hMenu, 0);
423 
424  if (!hSubMenu)
425  return NULL;
426 
427  mii.cbSize = sizeof(MENUITEMINFOW);
428  mii.fMask = MIIM_DATA;
429 
430  if (!GetMenuItemInfoW(hSubMenu, id, FALSE, &mii))
431  return NULL;
432 
433  return (CPlItem *) mii.dwItemData;
434 }
HWND hWnd
Definition: settings.c:17
smooth NULL
Definition: ftsmooth.c:416
BOOL WINAPI GetMenuItemInfoW(_In_ HMENU, _In_ UINT, _In_ BOOL, _Inout_ LPMENUITEMINFOW)
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
Definition: cpanel.h:68
#define MIIM_DATA
Definition: winuser.h:721
HMENU WINAPI GetMenu(_In_ HWND)
ULONG_PTR dwItemData
Definition: winuser.h:3243
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
struct tagMENUITEMINFOW MENUITEMINFOW

Referenced by Control_WndProc().

◆ Control_LoadApplet()

CPlApplet* Control_LoadApplet ( HWND  hWnd,
LPCWSTR  cmd,
CPanel panel 
)

Definition at line 56 of file control.c.

57 {
58 #ifdef __REACTOS__
59  ACTCTXW ActCtx = {sizeof(ACTCTX), ACTCTX_FLAG_RESOURCE_NAME_VALID};
60  ULONG_PTR cookie;
61  BOOL bActivated;
62  WCHAR fileBuffer[MAX_PATH];
63 #endif
64  CPlApplet* applet;
65  DWORD len;
66  unsigned i;
67  CPLINFO info;
68  NEWCPLINFOW newinfo;
69 
70  if (!(applet = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*applet))))
71  return applet;
72 
74  if (len > 0)
75  {
76  if (!(applet->cmd = HeapAlloc(GetProcessHeap(), 0, (len+1) * sizeof(WCHAR))))
77  {
78  WARN("Cannot allocate memory for applet path\n");
79  goto theError;
80  }
81  ExpandEnvironmentStringsW(cmd, applet->cmd, len+1);
82  }
83  else
84  {
85  WARN("Cannot expand applet path\n");
86  goto theError;
87  }
88 
89  applet->hWnd = hWnd;
90 
91 #ifdef __REACTOS__
92  StringCchCopy(fileBuffer, MAX_PATH, applet->cmd);
93  if (PathIsFileSpecW(fileBuffer))
94  SearchPath(NULL, fileBuffer, NULL, MAX_PATH, fileBuffer, NULL);
95  ActCtx.lpSource = fileBuffer;
96  ActCtx.lpResourceName = (LPCWSTR)123;
97  applet->hActCtx = CreateActCtx(&ActCtx);
98  bActivated = (applet->hActCtx != INVALID_HANDLE_VALUE ? ActivateActCtx(applet->hActCtx, &cookie) : FALSE);
99 #endif
100 
101  if (!(applet->hModule = LoadLibraryW(applet->cmd))) {
102  WARN("Cannot load control panel applet %s\n", debugstr_w(applet->cmd));
103  goto theError;
104  }
105  if (!(applet->proc = (APPLET_PROC)GetProcAddress(applet->hModule, "CPlApplet"))) {
106  WARN("Not a valid control panel applet %s\n", debugstr_w(applet->cmd));
107  goto theError;
108  }
109  if (!applet->proc(hWnd, CPL_INIT, 0L, 0L)) {
110  WARN("Init of applet has failed\n");
111  goto theError;
112  }
113  if ((applet->count = applet->proc(hWnd, CPL_GETCOUNT, 0L, 0L)) == 0) {
114  WARN("No subprogram in applet\n");
115  applet->proc(applet->hWnd, CPL_EXIT, 0, 0);
116  goto theError;
117  }
118 
119  applet = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, applet,
120  FIELD_OFFSET( CPlApplet, info[applet->count] ));
121 
122  for (i = 0; i < applet->count; i++) {
123  ZeroMemory(&newinfo, sizeof(newinfo));
124  newinfo.dwSize = sizeof(NEWCPLINFOA);
125  applet->info[i].helpfile[0] = 0;
126  /* proc is supposed to return a null value upon success for
127  * CPL_INQUIRE and CPL_NEWINQUIRE
128  * However, real drivers don't seem to behave like this
129  * So, use introspection rather than return value
130  */
131  applet->proc(hWnd, CPL_INQUIRE, i, (LPARAM)&info);
132  applet->info[i].data = info.lData;
133 #ifdef __REACTOS__
134  applet->info[i].idIcon = info.idIcon;
135 #endif
136 
137  if (info.idIcon != CPL_DYNAMIC_RES)
138  applet->info[i].icon = LoadIconW(applet->hModule, MAKEINTRESOURCEW(info.idIcon));
139  if (info.idName != CPL_DYNAMIC_RES)
140  LoadStringW(applet->hModule, info.idName,
141  applet->info[i].name, sizeof(applet->info[i].name) / sizeof(WCHAR));
142  if (info.idInfo != CPL_DYNAMIC_RES)
143  LoadStringW(applet->hModule, info.idInfo,
144  applet->info[i].info, sizeof(applet->info[i].info) / sizeof(WCHAR));
145 
146  /* some broken control panels seem to return incorrect values in CPL_INQUIRE,
147  but proper data in CPL_NEWINQUIRE. if we get an empty string or a null
148  icon, see what we can get from CPL_NEWINQUIRE */
149 
150  if (!applet->info[i].name[0]) info.idName = CPL_DYNAMIC_RES;
151 
152  /* zero-length szInfo may not be a buggy applet, but it doesn't hurt for us
153  to check anyway */
154 
155  if (!applet->info[i].info[0]) info.idInfo = CPL_DYNAMIC_RES;
156 
157  if (applet->info[i].icon == NULL)
158  info.idIcon = CPL_DYNAMIC_RES;
159 
160  if ((info.idIcon == CPL_DYNAMIC_RES) || (info.idName == CPL_DYNAMIC_RES) ||
161  (info.idInfo == CPL_DYNAMIC_RES)) {
162  applet->proc(hWnd, CPL_NEWINQUIRE, i, (LPARAM)&newinfo);
163 
164  applet->info[i].data = newinfo.lData;
165  if (info.idIcon == CPL_DYNAMIC_RES) {
166  if (!newinfo.hIcon) WARN("couldn't get icon for applet %u\n", i);
167  applet->info[i].icon = newinfo.hIcon;
168  }
169  if (newinfo.dwSize == sizeof(NEWCPLINFOW)) {
170  if (info.idName == CPL_DYNAMIC_RES)
171  memcpy(applet->info[i].name, newinfo.szName, sizeof(newinfo.szName));
172  if (info.idInfo == CPL_DYNAMIC_RES)
173  memcpy(applet->info[i].info, newinfo.szInfo, sizeof(newinfo.szInfo));
174  memcpy(applet->info[i].helpfile, newinfo.szHelpFile, sizeof(newinfo.szHelpFile));
175  } else {
176  if (info.idName == CPL_DYNAMIC_RES)
178  sizeof(((LPNEWCPLINFOA)&newinfo)->szName) / sizeof(CHAR),
179  applet->info[i].name, sizeof(applet->info[i].name) / sizeof(WCHAR));
180  if (info.idInfo == CPL_DYNAMIC_RES)
181  MultiByteToWideChar(CP_ACP, 0, ((LPNEWCPLINFOA)&newinfo)->szInfo,
182  sizeof(((LPNEWCPLINFOA)&newinfo)->szInfo) / sizeof(CHAR),
183  applet->info[i].info, sizeof(applet->info[i].info) / sizeof(WCHAR));
185  sizeof(((LPNEWCPLINFOA)&newinfo)->szHelpFile) / sizeof(CHAR),
186  applet->info[i].helpfile,
187  sizeof(applet->info[i].helpfile) / sizeof(WCHAR));
188  }
189  }
190  }
191 
192 #ifdef __REACTOS__
193  if (bActivated)
194  DeactivateActCtx(0, cookie);
195 #endif
196 
197 #ifndef __REACTOS__
198  list_add_head( &panel->applets, &applet->entry );
199 #endif
200 
201  return applet;
202 
203  theError:
204  FreeLibrary(applet->hModule);
205  HeapFree(GetProcessHeap(), 0, applet->cmd);
206  HeapFree(GetProcessHeap(), 0, applet);
207  return NULL;
208 }
BOOL WINAPI ActivateActCtx(IN HANDLE hActCtx, OUT PULONG_PTR ulCookie)
Definition: actctx.c:237
struct applet_info info[1]
Definition: cpanel.h:52
Definition: cpl.h:24
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
Definition: ftp_var.h:139
#define CP_ACP
Definition: compat.h:99
char CHAR
Definition: xmlstorage.h:175
LONG(APIENTRY * APPLET_PROC)(HWND, UINT, LPARAM, LPARAM)
Definition: cpl.h:23
#define WARN(fmt,...)
Definition: debug.h:111
struct list entry
Definition: cpanel.h:43
__WINE_SERVER_LIST_INLINE void list_add_head(struct list *list, struct list *elem)
Definition: list.h:96
HWND hWnd
Definition: settings.c:17
#define INVALID_HANDLE_VALUE
Definition: compat.h:399
#define ZeroMemory
Definition: winbase.h:1642
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
#define SearchPath
Definition: winbase.h:3734
struct _test_info info[]
Definition: SetCursorPos.c:19
uint32_t ULONG_PTR
Definition: typedefs.h:63
BOOL WINAPI DeactivateActCtx(IN DWORD dwFlags, IN ULONG_PTR ulCookie)
Definition: actctx.c:268
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
APPLET_PROC proc
Definition: cpanel.h:51
unsigned int BOOL
Definition: ntddk_ex.h:94
#define CPL_DYNAMIC_RES
Definition: cpl.h:11
#define debugstr_w
Definition: kernel32.h:32
#define CPL_NEWINQUIRE
Definition: cpl.h:19
BOOL WINAPI PathIsFileSpecW(LPCWSTR lpszPath)
Definition: path.c:2112
#define LoadLibraryW(x)
Definition: compat.h:412
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
#define FreeLibrary(x)
Definition: compat.h:413
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define CPL_EXIT
Definition: cpl.h:18
__wchar_t WCHAR
Definition: xmlstorage.h:180
LPWSTR cmd
Definition: cpanel.h:48
#define MAX_PATH
Definition: compat.h:26
unsigned count
Definition: cpanel.h:49
unsigned long DWORD
Definition: ntddk_ex.h:95
DWORD dwSize
Definition: cpl.h:41
_In_ PCWSTR _Out_ PVOID * ActCtx
Definition: ldrtypes.h:247
#define CPL_INIT
Definition: cpl.h:12
TCHAR szHelpFile[]
Definition: scrnsave.c:30
#define CPL_INQUIRE
Definition: cpl.h:14
static const WCHAR L[]
Definition: oid.c:1250
#define StringCchCopy
Definition: strsafe.h:139
struct tagNEWCPLINFOA NEWCPLINFOA
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum GLsizei len
Definition: glext.h:6722
struct list applets
Definition: cpanel.h:57
HWND hWnd
Definition: cpanel.h:47
#define HeapReAlloc
Definition: compat.h:401
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254
DWORD WINAPI ExpandEnvironmentStringsW(IN LPCWSTR lpSrc, IN LPWSTR lpDst, IN DWORD nSize)
Definition: environ.c:519
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
#define MultiByteToWideChar
Definition: compat.h:100
HMODULE hModule
Definition: cpanel.h:50
static const WCHAR szName[]
Definition: msipriv.h:1194
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2044
#define GetProcAddress(x, y)
Definition: compat.h:418
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define HeapFree(x, y, z)
Definition: compat.h:402
#define CPL_GETCOUNT
Definition: cpl.h:13

Referenced by Control_DoLaunch(), Control_DoWindow(), Control_RegisterRegistryApplets(), and CControlPanelEnum::RegisterCPanelApp().

◆ Control_RegisterRegistryApplets()

static void Control_RegisterRegistryApplets ( HWND  hWnd,
CPanel panel,
HKEY  hkey_root,
LPCWSTR  szRepPath 
)
static

Definition at line 674 of file control.c.

675 {
678  HKEY hkey;
679 
680  if (RegOpenKeyW(hkey_root, szRepPath, &hkey) == ERROR_SUCCESS)
681  {
682  int idx = 0;
683 
684  for(;; ++idx)
685  {
686  DWORD nameLen = MAX_PATH;
687  DWORD valueLen = MAX_PATH;
688 
689  if (RegEnumValueW(hkey, idx, name, &nameLen, NULL, NULL, (LPBYTE)value, &valueLen) != ERROR_SUCCESS)
690  break;
691 
692  Control_LoadApplet(hWnd, value, panel);
693  }
694  RegCloseKey(hkey);
695  }
696 }
#define ERROR_SUCCESS
Definition: deptool.c:10
HWND hWnd
Definition: settings.c:17
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
unsigned char * LPBYTE
Definition: typedefs.h:52
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:3296
unsigned int idx
Definition: utils.c:41
LONG WINAPI RegEnumValueW(_In_ HKEY hKey, _In_ DWORD index, _Out_ LPWSTR value, _Inout_ PDWORD val_count, _Reserved_ PDWORD reserved, _Out_opt_ PDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ PDWORD count)
Definition: reg.c:2853
smooth NULL
Definition: ftsmooth.c:416
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define MAX_PATH
Definition: compat.h:26
unsigned long DWORD
Definition: ntddk_ex.h:95
CPlApplet * Control_LoadApplet(HWND hWnd, LPCWSTR cmd, CPanel *panel)
Definition: control.c:56
Definition: name.c:38

Referenced by Control_DoWindow().

◆ Control_RunDLLA()

void WINAPI Control_RunDLLA ( HWND  hWnd,
HINSTANCE  hInst,
LPCSTR  cmd,
DWORD  nCmdShow 
)

Definition at line 896 of file control.c.

897 {
898  DWORD len = MultiByteToWideChar(CP_ACP, 0, cmd, -1, NULL, 0 );
899  LPWSTR wszCmd = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
900  if (wszCmd && MultiByteToWideChar(CP_ACP, 0, cmd, -1, wszCmd, len ))
901  {
902  Control_RunDLLW(hWnd, hInst, wszCmd, nCmdShow);
903  }
904  HeapFree(GetProcessHeap(), 0, wszCmd);
905 }
Definition: ftp_var.h:139
#define CP_ACP
Definition: compat.h:99
HWND hWnd
Definition: settings.c:17
VOID WINAPI Control_RunDLLW(HWND hWnd, HINSTANCE hInst, LPCWSTR cmd, DWORD nCmdShow)
Definition: control.c:873
smooth NULL
Definition: ftsmooth.c:416
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned long DWORD
Definition: ntddk_ex.h:95
GLenum GLsizei len
Definition: glext.h:6722
HINSTANCE hInst
Definition: dxdiag.c:13
#define MultiByteToWideChar
Definition: compat.h:100
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define HeapFree(x, y, z)
Definition: compat.h:402

◆ Control_RunDLLW()

void WINAPI Control_RunDLLW ( HWND  hWnd,
HINSTANCE  hInst,
LPCWSTR  cmd,
DWORD  nCmdShow 
)

Definition at line 873 of file control.c.

874 {
875  CPanel panel;
876 
877  TRACE("(%p, %p, %s, 0x%08x)\n",
878  hWnd, hInst, debugstr_w(cmd), nCmdShow);
879 
880 #ifndef __REACTOS__
881  memset(&panel, 0, sizeof(panel));
882  list_init( &panel.applets );
883 #endif
884 
885  if (!cmd || !*cmd) {
886  Control_DoWindow(&panel, hWnd, hInst);
887  } else {
888  Control_DoLaunch(&panel, hWnd, cmd);
889  }
890 }
Definition: ftp_var.h:139
HWND hWnd
Definition: settings.c:17
#define debugstr_w
Definition: kernel32.h:32
#define TRACE(s)
Definition: solgame.cpp:4
static void Control_DoLaunch(CPanel *panel, HWND hWnd, LPCWSTR wszCmd)
Definition: control.c:742
struct list applets
Definition: cpanel.h:57
Definition: cpanel.h:56
HINSTANCE hInst
Definition: dxdiag.c:13
static void Control_DoWindow(CPanel *panel, HWND hWnd, HINSTANCE hInst)
Definition: control.c:698
__WINE_SERVER_LIST_INLINE void list_init(struct list *list)
Definition: list.h:149
#define memset(x, y, z)
Definition: compat.h:39

Referenced by Control_RunDLLA(), FinishDlgProc(), RunControlPanel(), and START_TEST().

◆ Control_StartApplet()

static void Control_StartApplet ( HWND  hWnd,
CPlItem item 
)
static

Definition at line 456 of file control.c.

457 {
458  WCHAR verbOpen[] = {'c','p','l','o','p','e','n',0};
459  WCHAR format[] = {'@','%','d',0};
461 
462  /* execute the applet if item is valid */
463  if (item)
464  {
465  wsprintfW(param, format, item->id);
466  ShellExecuteW(hWnd, verbOpen, item->applet->cmd, param, NULL, SW_SHOW);
467  }
468 }
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
HWND hWnd
Definition: settings.c:17
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
smooth NULL
Definition: ftsmooth.c:416
#define SW_SHOW
Definition: winuser.h:769
__wchar_t WCHAR
Definition: xmlstorage.h:180
GLfloat param
Definition: glext.h:5796
#define MAX_PATH
Definition: compat.h:26
static ATOM item
Definition: dde.c:856
HINSTANCE WINAPI ShellExecuteW(HWND hwnd, LPCWSTR lpVerb, LPCWSTR lpFile, LPCWSTR lpParameters, LPCWSTR lpDirectory, INT nShowCmd)
Definition: shlexec.cpp:2246

Referenced by Control_WndProc().

◆ Control_UnloadApplet()

void Control_UnloadApplet ( CPlApplet applet)

Definition at line 40 of file control.c.

41 {
42  unsigned i;
43 
44  for (i = 0; i < applet->count; i++)
45  applet->proc(applet->hWnd, CPL_STOP, i, applet->info[i].data);
46 
47  if (applet->proc) applet->proc(applet->hWnd, CPL_EXIT, 0L, 0L);
48  FreeLibrary(applet->hModule);
49 #ifndef __REACTOS__
50  list_remove( &applet->entry );
51 #endif
52  HeapFree(GetProcessHeap(), 0, applet->cmd);
53  HeapFree(GetProcessHeap(), 0, applet);
54 }
struct applet_info info[1]
Definition: cpanel.h:52
#define CPL_STOP
Definition: cpl.h:17
struct list entry
Definition: cpanel.h:43
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
APPLET_PROC proc
Definition: cpanel.h:51
__WINE_SERVER_LIST_INLINE void list_remove(struct list *elem)
Definition: list.h:108
#define FreeLibrary(x)
Definition: compat.h:413
#define GetProcessHeap()
Definition: compat.h:403
#define CPL_EXIT
Definition: cpl.h:18
LPWSTR cmd
Definition: cpanel.h:48
unsigned count
Definition: cpanel.h:49
static const WCHAR L[]
Definition: oid.c:1250
HWND hWnd
Definition: cpanel.h:47
HMODULE hModule
Definition: cpanel.h:50
#define HeapFree(x, y, z)
Definition: compat.h:402

Referenced by Control_DoLaunch(), Control_WndProc(), and CControlPanelEnum::RegisterCPanelApp().

◆ Control_UpdateListViewStyle()

static void Control_UpdateListViewStyle ( CPanel panel,
UINT  style,
UINT  id 
)
static

Definition at line 397 of file control.c.

398 {
399  HMENU hMenu, hSubMenu;
400 
402 
403  /* update the menu */
404  hMenu = GetMenu(panel->hWnd);
405  hSubMenu = GetSubMenu(hMenu, 1);
406 
408  id, MF_BYCOMMAND);
409 }
HWND hWndListView
Definition: cpanel.h:61
#define MF_BYCOMMAND
Definition: winuser.h:202
HWND hWnd
Definition: cpanel.h:58
BOOL WINAPI CheckMenuRadioItem(_In_ HMENU, _In_ UINT, _In_ UINT, _In_ UINT, _In_ UINT)
#define LISTVIEW_DEFSTYLE
Definition: control.c:216
LONG WINAPI SetWindowLongW(_In_ HWND, _In_ int, _In_ LONG)
#define FCIDM_SHVIEW_REPORTVIEW
Definition: shresdef.h:760
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
#define FCIDM_SHVIEW_BIGICON
Definition: shresdef.h:757
#define GWL_STYLE
Definition: winuser.h:846
Arabic default style
Definition: afstyles.h:93
HMENU WINAPI GetMenu(_In_ HWND)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60

Referenced by Control_WndProc().

◆ Control_WndProc()

static LRESULT WINAPI Control_WndProc ( HWND  hWnd,
UINT  wMsg,
WPARAM  lParam1,
LPARAM  lParam2 
)
static

Definition at line 470 of file control.c.

472 {
473  CPanel* panel = (CPanel*)GetWindowLongPtrW(hWnd, 0);
474 
475  if (panel || wMsg == WM_CREATE) {
476  switch (wMsg) {
477  case WM_CREATE:
479  return 0;
480  case WM_DESTROY:
481  {
482  CPlApplet *applet, *next;
483  LIST_FOR_EACH_ENTRY_SAFE( applet, next, &panel->applets, CPlApplet, entry )
484  Control_UnloadApplet(applet);
485  }
486  Control_FreeCPlItems(hWnd, panel);
487  PostQuitMessage(0);
488  break;
489  case WM_COMMAND:
490  switch (LOWORD(lParam1))
491  {
492  case IDM_CPANEL_EXIT:
493  SendMessageW(hWnd, WM_CLOSE, 0, 0);
494  return 0;
495 
496  case IDM_CPANEL_ABOUT:
497  {
500  IMAGE_ICON, 48, 48, LR_SHARED);
501 
502  LoadStringW(shell32_hInstance, IDS_CPANEL_TITLE, appName,
503  sizeof(appName) / sizeof(appName[0]));
504  ShellAboutW(hWnd, appName, NULL, icon);
505 
506  return 0;
507  }
508 
511  return 0;
512 
515  return 0;
516 
519  return 0;
520 
523  return 0;
524 
525  default:
526  /* check if this is an applet */
527  if ((LOWORD(lParam1) >= IDM_CPANEL_APPLET_BASE) &&
528  (LOWORD(lParam1) <= IDM_CPANEL_APPLET_BASE + panel->total_subprogs))
529  {
531  return 0;
532  }
533 
534  break;
535  }
536 
537  break;
538 
539  case WM_NOTIFY:
540  {
541  LPNMHDR nmh = (LPNMHDR) lParam2;
542 
543  switch (nmh->idFrom)
544  {
545  case IDC_LISTVIEW:
546  switch (nmh->code)
547  {
548  case NM_RETURN:
549  case NM_DBLCLK:
550  {
552  return 0;
553  }
554  case LVN_ITEMCHANGED:
555  {
557 
558  /* update the status bar if item is valid */
559  if (item)
560  SetWindowTextW(panel->hWndStatusBar, item->applet->info[item->id].info);
561  else
563 
564  return 0;
565  }
566  }
567 
568  break;
569  }
570 
571  break;
572  }
573 
574  case WM_MENUSELECT:
575  /* check if this is an applet */
576  if ((LOWORD(lParam1) >= IDM_CPANEL_APPLET_BASE) &&
577  (LOWORD(lParam1) <= IDM_CPANEL_APPLET_BASE + panel->total_subprogs))
578  {
580 
581  /* update the status bar if item is valid */
582  if (item)
583  SetWindowTextW(panel->hWndStatusBar, item->applet->info[item->id].info);
584  }
585  else if ((HIWORD(lParam1) == 0xFFFF) && (lParam2 == 0))
586  {
587  /* reset status bar description to that of the selected icon */
589 
590  if (item)
591  SetWindowTextW(panel->hWndStatusBar, item->applet->info[item->id].info);
592  else
594 
595  return 0;
596  }
597  else
599 
600  return 0;
601 
602  case WM_SIZE:
603  {
604  HDWP hdwp;
605  RECT sb;
606 
607  hdwp = BeginDeferWindowPos(2);
608 
609  if (hdwp == NULL)
610  break;
611 
612  GetClientRect(panel->hWndStatusBar, &sb);
613 
614  hdwp = DeferWindowPos(hdwp, panel->hWndListView, NULL, 0, 0,
615  LOWORD(lParam2), HIWORD(lParam2) - (sb.bottom - sb.top),
617 
618  if (hdwp == NULL)
619  break;
620 
621  hdwp = DeferWindowPos(hdwp, panel->hWndStatusBar, NULL, 0, 0,
622  LOWORD(lParam2), LOWORD(lParam1), SWP_NOZORDER | SWP_NOMOVE);
623 
624  if (hdwp != NULL)
625  EndDeferWindowPos(hdwp);
626 
627  return 0;
628  }
629  }
630  }
631 
632  return DefWindowProcW(hWnd, wMsg, lParam1, lParam2);
633 }
HWND hWndListView
Definition: cpanel.h:61
static HICON
Definition: imagelist.c:84
HDWP WINAPI BeginDeferWindowPos(_In_ int)
#define FCIDM_SHVIEW_LISTVIEW
Definition: shresdef.h:759
#define LR_SHARED
Definition: winuser.h:1090
#define IMAGE_ICON
Definition: winuser.h:212
#define IDI_SHELL_CONTROL_PANEL
Definition: shresdef.h:497
superblock * sb
Definition: btrfs.c:4137
#define LVS_REPORT
Definition: commctrl.h:2258
#define LVN_ITEMCHANGED
Definition: commctrl.h:3127
HWND hWnd
Definition: settings.c:17
#define MAX_STRING_LEN
Definition: precomp.h:36
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
static void Control_StartApplet(HWND hWnd, CPlItem *item)
Definition: control.c:456
#define GetWindowLongPtrW
Definition: winuser.h:4804
static void Control_WndProc_Create(HWND hWnd, const CREATESTRUCTW *cs)
Definition: control.c:273
#define SWP_NOZORDER
Definition: winuser.h:1232
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
struct tagNMHDR * LPNMHDR
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
UINT code
Definition: winuser.h:3134
HWND hWndStatusBar
Definition: cpanel.h:64
HINSTANCE shell32_hInstance
Definition: misc.cpp:82
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_ UINT, _In_ int, _In_ int, _In_ UINT)
Definition: cursoricon.c:2172
static void Control_FreeCPlItems(HWND hWnd, CPanel *panel)
Definition: control.c:367
UINT_PTR idFrom
Definition: winuser.h:3133
BOOL WINAPI EndDeferWindowPos(_In_ HDWP)
#define WM_MENUSELECT
Definition: winuser.h:1729
smooth NULL
Definition: ftsmooth.c:416
#define LVS_LIST
Definition: commctrl.h:2260
#define WM_DESTROY
Definition: winuser.h:1591
HDWP WINAPI DeferWindowPos(_In_ HDWP, _In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define WM_SIZE
Definition: winuser.h:1593
#define FCIDM_SHVIEW_REPORTVIEW
Definition: shresdef.h:760
#define WM_CLOSE
Definition: winuser.h:1603
void Control_UnloadApplet(CPlApplet *applet)
Definition: control.c:40
#define LVS_ICON
Definition: commctrl.h:2257
static CPlItem * Control_GetCPlItem_From_ListView(CPanel *panel)
Definition: control.c:436
uint32_t entry
Definition: isohybrid.c:63
BOOL WINAPI ShellAboutW(HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff, HICON hIcon)
Definition: cpanel.h:68
#define WM_COMMAND
Definition: winuser.h:1722
struct list applets
Definition: cpanel.h:57
#define FCIDM_SHVIEW_BIGICON
Definition: shresdef.h:757
Definition: cpanel.h:56
#define NM_RETURN
Definition: commctrl.h:132
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
static unsigned __int64 next
Definition: rand_nt.c:6
static void Control_UpdateListViewStyle(CPanel *panel, UINT style, UINT id)
Definition: control.c:397
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204
static ATOM item
Definition: dde.c:856
#define NM_DBLCLK
Definition: commctrl.h:131
unsigned total_subprogs
Definition: cpanel.h:60
static CPlItem * Control_GetCPlItem_From_MenuID(HWND hWnd, UINT id)
Definition: control.c:411
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define IDC_LISTVIEW
Definition: control.c:212
#define WM_CREATE
Definition: winuser.h:1590
#define HIWORD(l)
Definition: typedefs.h:246
const char * appName(const char *argv0)
Definition: loadlib.c:89
#define SWP_NOMOVE
Definition: winuser.h:1229
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define FCIDM_SHVIEW_SMALLICON
Definition: shresdef.h:758
#define LOWORD(l)
Definition: pedump.c:82
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
#define WM_NOTIFY
Definition: richedit.h:61
#define LVS_SMALLICON
Definition: commctrl.h:2259

Referenced by Control_DoInterface().

◆ Control_WndProc_Create()

static void Control_WndProc_Create ( HWND  hWnd,
const CREATESTRUCTW cs 
)
static

Definition at line 273 of file control.c.

274 {
275  CPanel* panel = cs->lpCreateParams;
276  HMENU hMenu, hSubMenu;
277  CPlApplet* applet;
278  MENUITEMINFOW mii;
279  unsigned int i;
280  int menucount, index;
281  CPlItem *item;
282  LVITEMW lvItem;
284  INT sb_parts;
285  int itemidx;
286 
287  SetWindowLongPtrW(hWnd, 0, (LONG_PTR)panel);
288  panel->hWnd = hWnd;
289 
290  /* Initialise common control DLL */
291  icex.dwSize = sizeof(INITCOMMONCONTROLSEX);
293  InitCommonControlsEx(&icex);
294 
295  /* create the status bar */
297  return;
298 
299  sb_parts = -1;
300  SendMessageW(panel->hWndStatusBar, SB_SETPARTS, 1, (LPARAM) &sb_parts);
301 
302  /* create the list view */
303  if (!Control_CreateListView(panel))
304  return;
305 
306  hMenu = LoadMenuW(shell32_hInstance, MAKEINTRESOURCEW(MENU_CPANEL));
307 
308  /* insert menu items for applets */
309  hSubMenu = GetSubMenu(hMenu, 0);
310  menucount = 0;
311 
312  LIST_FOR_EACH_ENTRY( applet, &panel->applets, CPlApplet, entry )
313  {
314  for (i = 0; i < applet->count; i++) {
315  /* set up a CPlItem for this particular subprogram */
316  item = HeapAlloc(GetProcessHeap(), 0, sizeof(CPlItem));
317 
318  if (!item)
319  continue;
320 
321  item->applet = applet;
322  item->id = i;
323 
324  mii.cbSize = sizeof(MENUITEMINFOW);
326  mii.dwTypeData = applet->info[i].name;
327  mii.cch = sizeof(applet->info[i].name) / sizeof(WCHAR);
328  mii.wID = IDM_CPANEL_APPLET_BASE + menucount;
329  mii.dwItemData = (ULONG_PTR)item;
330 
331  if (InsertMenuItemW(hSubMenu, menucount, TRUE, &mii)) {
332  /* add the list view item */
333  HICON icon = applet->info[i].icon;
334  if (!icon) icon = LoadImageW( 0, (LPCWSTR)IDI_WINLOGO, IMAGE_ICON, 0, 0, LR_SHARED );
335  index = ImageList_AddIcon(panel->hImageListLarge, icon);
336  ImageList_AddIcon(panel->hImageListSmall, icon);
337 
338  lvItem.mask = LVIF_IMAGE | LVIF_TEXT | LVIF_PARAM;
339  lvItem.iItem = menucount;
340  lvItem.iSubItem = 0;
341  lvItem.pszText = applet->info[i].name;
342  lvItem.iImage = index;
343  lvItem.lParam = (LPARAM) item;
344 
345  itemidx = ListView_InsertItemW(panel->hWndListView, &lvItem);
346 
347  /* add the description */
348  ListView_SetItemTextW(panel->hWndListView, itemidx, 1, applet->info[i].info);
349 
350  /* update menu bar, increment count */
351  DrawMenuBar(hWnd);
352  menucount++;
353  }
354  }
355  }
356 
357  panel->total_subprogs = menucount;
358 
359  /* check the "large items" icon in the View menu */
360  hSubMenu = GetSubMenu(hMenu, 1);
363 
364  SetMenu(hWnd, hMenu);
365 }
HWND hWndListView
Definition: cpanel.h:61
static HICON
Definition: imagelist.c:84
int iImage
Definition: commctrl.h:2363
#define TRUE
Definition: types.h:120
struct applet_info info[1]
Definition: cpanel.h:52
#define LR_SHARED
Definition: winuser.h:1090
#define IMAGE_ICON
Definition: winuser.h:212
BOOL WINAPI DrawMenuBar(_In_ HWND)
#define MF_BYCOMMAND
Definition: winuser.h:202
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
HWND hWnd
Definition: cpanel.h:58
HIMAGELIST hImageListSmall
Definition: cpanel.h:63
BOOL WINAPI CheckMenuRadioItem(_In_ HMENU, _In_ UINT, _In_ UINT, _In_ UINT, _In_ UINT)
HWND hWnd
Definition: settings.c:17
LPWSTR dwTypeData
Definition: winuser.h:3244
#define WS_CHILD
Definition: pedump.c:617
struct tagINITCOMMONCONTROLSEX INITCOMMONCONTROLSEX
int32_t INT
Definition: typedefs.h:56
#define LVIF_TEXT
Definition: commctrl.h:2305
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
uint32_t cs
Definition: isohybrid.c:75
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 hWndStatusBar
Definition: cpanel.h:64
HINSTANCE shell32_hInstance
Definition: misc.cpp:82
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_ UINT, _In_ int, _In_ int, _In_ UINT)
Definition: cursoricon.c:2172
int iSubItem
Definition: commctrl.h:2358
HWND WINAPI CreateStatusWindowW(LONG style, LPCWSTR text, HWND parent, UINT wid)
Definition: commctrl.c:795
LPARAM lParam
Definition: commctrl.h:2364
#define IDC_STATUSBAR
Definition: control.c:213
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
static BOOL Control_CreateListView(CPanel *panel)
Definition: control.c:219
GLuint index
Definition: glext.h:6031
#define MIIM_ID
Definition: winuser.h:717
#define CCS_BOTTOM
Definition: commctrl.h:2240
#define ICC_BAR_CLASSES
Definition: commctrl.h:60
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define SBARS_SIZEGRIP
Definition: commctrl.h:1919
BOOL WINAPI SetMenu(_In_ HWND, _In_opt_ HMENU)
#define FCIDM_SHVIEW_REPORTVIEW
Definition: shresdef.h:760
LPWSTR pszText
Definition: commctrl.h:2361
#define LVIF_IMAGE
Definition: commctrl.h:2306
unsigned count
Definition: cpanel.h:49
#define IDI_WINLOGO
Definition: winuser.h:704
INT WINAPI ImageList_AddIcon(HIMAGELIST himl, HICON hIcon)
Definition: imagelist.c:540
UINT mask
Definition: commctrl.h:2356
#define index(s, c)
Definition: various.h:29
BOOL WINAPI InitCommonControlsEx(const INITCOMMONCONTROLSEX *lpInitCtrls)
Definition: commctrl.c:893
uint32_t entry
Definition: isohybrid.c:63
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
Definition: cpanel.h:68
struct list applets
Definition: cpanel.h:57
#define FCIDM_SHVIEW_BIGICON
Definition: shresdef.h:757
Definition: cpanel.h:56
#define MIIM_STRING
Definition: winuser.h:722
#define ICC_LISTVIEW_CLASSES
Definition: commctrl.h:58
static ATOM item
Definition: dde.c:856
unsigned total_subprogs
Definition: cpanel.h:60
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HIMAGELIST hImageListLarge
Definition: cpanel.h:62
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
BOOL WINAPI InsertMenuItemW(_In_ HMENU, _In_ UINT, _In_ BOOL, _In_ LPCMENUITEMINFOW)
#define SB_SETPARTS
Definition: commctrl.h:1950
#define LVIF_PARAM
Definition: commctrl.h:2307
HMENU WINAPI LoadMenuW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
#define ULONG_PTR
Definition: config.h:101
#define SetWindowLongPtrW
Definition: winuser.h:5321
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define MIIM_DATA
Definition: winuser.h:721
#define WS_VISIBLE
Definition: pedump.c:620
#define ListView_InsertItemW(hwnd, pitem)
Definition: commctrl.h:38
ULONG_PTR dwItemData
Definition: winuser.h:3243
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
struct tagMENUITEMINFOW MENUITEMINFOW

Referenced by Control_WndProc().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( shlctrl  )