ReactOS  0.4.12-dev-75-g00dd17e
clb.c File Reference
#include <precomp.h>
Include dependency graph for clb.c:

Go to the source code of this file.

Classes

struct  _CLB_PRIVATEDATA
 

Typedefs

typedef struct _CLB_PRIVATEDATA CLB_PRIVATEDATA
 
typedef struct _CLB_PRIVATEDATAPCLB_PRIVATEDATA
 

Functions

DWORD WINAPI ClbAddData (IN DWORD Unknown1, IN DWORD Unknown2, IN DWORD Unknown3)
 
DWORD WINAPI ClbSetColumnWidths (IN DWORD Unknown1, IN DWORD Unknown2, IN DWORD Unknown3)
 
LRESULT CALLBACK ClbWndProc (IN HWND hwnd, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
 
static INT_PTR CALLBACK ClbpStyleDlgProc (IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
 
INT_PTR WINAPI ClbStyleW (IN HWND hWndParent, IN LPARAM dwInitParam)
 
BOOL WINAPI CustomControlInfoW (OUT LPCUSTOM_CONTROL_INFO CustomControlInfo OPTIONAL)
 
BOOL WINAPI DllMain (IN HINSTANCE hinstDLL, IN DWORD dwReason, IN LPVOID lpvReserved)
 

Variables

static HINSTANCE hDllInstance
 
static const WCHAR ClbClassName [] = L"ColumnListBox"
 
static const WCHAR ClbColumns [] = L"Column1;Column2;Column3"
 
static const CLBS_INFO ClbsSupportedStyles []
 

Typedef Documentation

◆ CLB_PRIVATEDATA

◆ PCLB_PRIVATEDATA

Function Documentation

◆ ClbAddData()

DWORD WINAPI ClbAddData ( IN DWORD  Unknown1,
IN DWORD  Unknown2,
IN DWORD  Unknown3 
)

Definition at line 89 of file clb.c.

92 {
93  DPRINT1("ClbAddData(0x%x, 0x%x, 0x%x)\n", Unknown1, Unknown2, Unknown3);
94  return 0;
95 }
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES IN DWORD Unknown3
Definition: conport.c:35
#define DPRINT1
Definition: precomp.h:8

◆ ClbpStyleDlgProc()

static INT_PTR CALLBACK ClbpStyleDlgProc ( IN HWND  hwndDlg,
IN UINT  uMsg,
IN WPARAM  wParam,
IN LPARAM  lParam 
)
static

Definition at line 168 of file clb.c.

Referenced by ClbStyleW().

172 {
173  INT_PTR Ret = FALSE;
174 
175  DPRINT1("ClbpStyleDlgProc(0x%p, 0x%x, 0x%p, 0x%p)\n", hwndDlg, uMsg, wParam, lParam);
176 
177  switch (uMsg)
178  {
179  case WM_COMMAND:
180  switch (LOWORD(wParam))
181  {
182  case IDOK:
183  case IDCANCEL:
184  EndDialog(hwndDlg,
185  (INT_PTR)LOWORD(wParam));
186  break;
187  }
188  break;
189 
190  case WM_CLOSE:
191  EndDialog(hwndDlg,
192  IDCANCEL);
193  break;
194 
195  case WM_INITDIALOG:
196  Ret = TRUE;
197  break;
198  }
199 
200  return Ret;
201 }
#define TRUE
Definition: types.h:120
#define IDOK
Definition: winuser.h:824
int32_t INT_PTR
Definition: typedefs.h:62
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
WPARAM wParam
Definition: combotst.c:138
#define WM_CLOSE
Definition: winuser.h:1603
#define WM_COMMAND
Definition: winuser.h:1716
#define DPRINT1
Definition: precomp.h:8
#define IDCANCEL
Definition: winuser.h:825
#define WM_INITDIALOG
Definition: winuser.h:1715
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82

◆ ClbSetColumnWidths()

DWORD WINAPI ClbSetColumnWidths ( IN DWORD  Unknown1,
IN DWORD  Unknown2,
IN DWORD  Unknown3 
)

Definition at line 103 of file clb.c.

106 {
107  DPRINT1("ClbSetColumnWidths(0x%x, 0x%x, 0x%x)\n", Unknown1, Unknown2, Unknown3);
108  return 0;
109 }
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES IN DWORD Unknown3
Definition: conport.c:35
#define DPRINT1
Definition: precomp.h:8

◆ ClbStyleW()

INT_PTR WINAPI ClbStyleW ( IN HWND  hWndParent,
IN LPARAM  dwInitParam 
)

Definition at line 209 of file clb.c.

Referenced by CustomControlInfoW().

211 {
214  hWndParent,
216  dwInitParam);
217 }
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define IDD_COLUMNLISTBOXSTYLES
Definition: resource.h:3
static HINSTANCE hDllInstance
Definition: clb.c:30
static INT_PTR CALLBACK ClbpStyleDlgProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
Definition: clb.c:168
#define DialogBoxParam
Definition: winuser.h:5630

◆ ClbWndProc()

LRESULT CALLBACK ClbWndProc ( IN HWND  hwnd,
IN UINT  uMsg,
IN WPARAM  wParam,
IN LPARAM  lParam 
)

Definition at line 117 of file clb.c.

Referenced by DllMain().

121 {
122  PCLB_PRIVATEDATA PrivData;
123  LRESULT Ret = 0;
124 
125  DPRINT1("ClbWndProc(0x%p, 0x%x, 0x%p, 0x%p)\n", hwnd, uMsg, wParam, lParam);
126 
128  0);
129  if (PrivData == NULL && uMsg != WM_CREATE)
130  {
131  goto HandleDefMsg;
132  }
133 
134  switch (uMsg)
135  {
136  case WM_CREATE:
137  PrivData = HeapAlloc(GetProcessHeap(),
138  0,
139  sizeof(CLB_PRIVATEDATA));
140  if (PrivData == NULL)
141  {
142  Ret = (LRESULT)-1;
143  break;
144  }
145  PrivData->hwnd = hwnd;
146  break;
147 
148  case WM_DESTROY:
150  0,
151  PrivData);
152  break;
153 
154  default:
155 HandleDefMsg:
156  Ret = DefWindowProc(hwnd,
157  uMsg,
158  wParam,
159  lParam);
160  break;
161  }
162 
163  return Ret;
164 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define LRESULT
Definition: msvc.h:49
HWND hwnd
Definition: clb.c:37
struct _CLB_PRIVATEDATA * PCLB_PRIVATEDATA
WPARAM wParam
Definition: combotst.c:138
smooth NULL
Definition: ftsmooth.c:416
#define DefWindowProc
Definition: ros2win.h:31
#define WM_DESTROY
Definition: winuser.h:1591
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define DPRINT1
Definition: precomp.h:8
#define WM_CREATE
Definition: winuser.h:1590
#define GetWindowLongPtr
Definition: treelist.c:73
LONG_PTR LRESULT
Definition: windef.h:209
LPARAM lParam
Definition: combotst.c:139
#define HeapFree(x, y, z)
Definition: compat.h:394

◆ CustomControlInfoW()

BOOL WINAPI CustomControlInfoW ( OUT LPCUSTOM_CONTROL_INFO CustomControlInfo  OPTIONAL)

Definition at line 225 of file clb.c.

226 {
227  if (CustomControlInfo != NULL)
228  {
229  wcscpy(CustomControlInfo->ClassName,
230  ClbClassName);
231 
232  CustomControlInfo->Zero1 = 0;
233 
234  wcscpy(CustomControlInfo->ClassName2,
235  ClbClassName);
236 
237  CustomControlInfo->Unknown1 = 0x60; /* FIXME - ??? */
238  CustomControlInfo->Unknown2 = 0x50; /* FIXME - ??? */
239  CustomControlInfo->Unknown3 = 0x50A10013; /* FIXME - ??? */
240 
241  CustomControlInfo->Zero2 = 0;
242  CustomControlInfo->Zero3 = 0;
243 
244  CustomControlInfo->StylesCount = sizeof(ClbsSupportedStyles) / sizeof(ClbsSupportedStyles[0]);
245  CustomControlInfo->SupportedStyles = ClbsSupportedStyles;
246 
247  wcscpy(CustomControlInfo->Columns,
248  ClbColumns);
249 
250  CustomControlInfo->ClbStyleW = ClbStyleW;
251 
252  CustomControlInfo->Zero4 = 0;
253  CustomControlInfo->Zero5 = 0;
254  CustomControlInfo->Zero6 = 0;
255  }
256 
257  return TRUE;
258 }
#define TRUE
Definition: types.h:120
static const CLBS_INFO ClbsSupportedStyles[]
Definition: clb.c:40
smooth NULL
Definition: ftsmooth.c:416
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
static const WCHAR ClbColumns[]
Definition: clb.c:33
INT_PTR WINAPI ClbStyleW(IN HWND hWndParent, IN LPARAM dwInitParam)
Definition: clb.c:209
static const WCHAR ClbClassName[]
Definition: clb.c:32

◆ DllMain()

BOOL WINAPI DllMain ( IN HINSTANCE  hinstDLL,
IN DWORD  dwReason,
IN LPVOID  lpvReserved 
)

Definition at line 262 of file clb.c.

265 {
266  BOOL Ret = TRUE;
267 
268  switch (dwReason)
269  {
270  case DLL_PROCESS_ATTACH:
271  {
272  WNDCLASS ClbWndClass;
273 
274  hDllInstance = hinstDLL;
275 
277 
278  /* register the control's window class */
279  ClbWndClass.style = CS_GLOBALCLASS | CS_OWNDC;
280  ClbWndClass.lpfnWndProc = ClbWndProc;
281  ClbWndClass.cbClsExtra = 0;
282  ClbWndClass.cbWndExtra = sizeof(PCLB_PRIVATEDATA);
283  ClbWndClass.hInstance = hinstDLL,
284  ClbWndClass.hIcon = NULL;
285  ClbWndClass.hCursor = LoadCursor(NULL,
286  (LPWSTR)IDC_ARROW);
287  ClbWndClass.hbrBackground = NULL;
288  ClbWndClass.lpszMenuName = NULL;
289  ClbWndClass.lpszClassName = ClbClassName;
290 
291  if (!RegisterClass(&ClbWndClass))
292  {
293  Ret = FALSE;
294  break;
295  }
296  break;
297  }
298 
299  case DLL_THREAD_ATTACH:
300  case DLL_THREAD_DETACH:
301  break;
302 
303  case DLL_PROCESS_DETACH:
305  hinstDLL);
306  break;
307  }
308  return Ret;
309 }
#define TRUE
Definition: types.h:120
#define DLL_THREAD_ATTACH
Definition: compat.h:121
int cbClsExtra
Definition: winuser.h:3118
LPCSTR lpszMenuName
Definition: winuser.h:3124
#define DLL_PROCESS_ATTACH
Definition: compat.h:120
HBRUSH hbrBackground
Definition: winuser.h:3123
#define CS_OWNDC
Definition: winuser.h:650
struct _CLB_PRIVATEDATA * PCLB_PRIVATEDATA
#define DLL_THREAD_DETACH
Definition: compat.h:122
DWORD dwReason
Definition: misc.cpp:154
int cbWndExtra
Definition: winuser.h:3119
HCURSOR hCursor
Definition: winuser.h:3122
smooth NULL
Definition: ftsmooth.c:416
#define DLL_PROCESS_DETACH
Definition: compat.h:119
static HINSTANCE hDllInstance
Definition: clb.c:30
unsigned int BOOL
Definition: ntddk_ex.h:94
#define CS_GLOBALCLASS
Definition: winuser.h:647
LPCSTR lpszClassName
Definition: winuser.h:3125
#define LoadCursor
Definition: winuser.h:5678
UINT style
Definition: winuser.h:3116
HINSTANCE hInstance
Definition: winuser.h:3120
WNDPROC lpfnWndProc
Definition: winuser.h:3117
LRESULT CALLBACK ClbWndProc(IN HWND hwnd, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
Definition: clb.c:117
#define IDC_ARROW
Definition: winuser.h:682
VOID WINAPI InitCommonControls(void)
Definition: commctrl.c:863
#define RegisterClass
Definition: winuser.h:5702
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define UnregisterClass
Definition: winuser.h:5727
static const WCHAR ClbClassName[]
Definition: clb.c:32
HICON hIcon
Definition: winuser.h:3121

Variable Documentation

◆ ClbClassName

const WCHAR ClbClassName[] = L"ColumnListBox"
static

Definition at line 32 of file clb.c.

Referenced by CustomControlInfoW(), and DllMain().

◆ ClbColumns

const WCHAR ClbColumns[] = L"Column1;Column2;Column3"
static

Definition at line 33 of file clb.c.

Referenced by CustomControlInfoW().

◆ ClbsSupportedStyles

const CLBS_INFO ClbsSupportedStyles[]
static

Definition at line 40 of file clb.c.

Referenced by CustomControlInfoW().

◆ hDllInstance