ReactOS 0.4.15-dev-8116-gf69e256
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}
#define DPRINT1
Definition: precomp.h:8
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES IN DWORD Unknown3
Definition: conport.c:37

◆ 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.

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,
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}
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define LOWORD(l)
Definition: pedump.c:82
int32_t INT_PTR
Definition: typedefs.h:64
#define WM_CLOSE
Definition: winuser.h:1621
#define IDCANCEL
Definition: winuser.h:831
#define WM_COMMAND
Definition: winuser.h:1740
#define WM_INITDIALOG
Definition: winuser.h:1739
#define IDOK
Definition: winuser.h:830
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)

Referenced by ClbStyleW().

◆ 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}

◆ ClbStyleW()

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

Definition at line 209 of file clb.c.

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

Referenced by CustomControlInfoW().

◆ ClbWndProc()

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

Definition at line 117 of file clb.c.

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:
155HandleDefMsg:
156 Ret = DefWindowProc(hwnd,
157 uMsg,
158 wParam,
159 lParam);
160 break;
161 }
162
163 return Ret;
164}
struct _CLB_PRIVATEDATA * PCLB_PRIVATEDATA
#define NULL
Definition: types.h:112
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
#define LRESULT
Definition: ole.h:14
#define DefWindowProc
Definition: ros2win.h:31
HWND hwnd
Definition: clb.c:37
#define GetWindowLongPtr
Definition: treelist.c:73
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LRESULT
Definition: windef.h:209
#define WM_CREATE
Definition: winuser.h:1608
#define WM_DESTROY
Definition: winuser.h:1609

Referenced by DllMain().

◆ 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,
231
232 CustomControlInfo->Zero1 = 0;
233
234 wcscpy(CustomControlInfo->ClassName2,
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}
static const WCHAR ClbColumns[]
Definition: clb.c:33
static const WCHAR ClbClassName[]
Definition: clb.c:32
INT_PTR WINAPI ClbStyleW(IN HWND hWndParent, IN LPARAM dwInitParam)
Definition: clb.c:209
static const CLBS_INFO ClbsSupportedStyles[]
Definition: clb.c:40
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)

◆ 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 {
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,
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
301 break;
302
305 hinstDLL);
306 break;
307 }
308 return Ret;
309}
DWORD dwReason
Definition: misc.cpp:154
LRESULT CALLBACK ClbWndProc(IN HWND hwnd, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
Definition: clb.c:117
VOID WINAPI InitCommonControls(void)
Definition: commctrl.c:863
#define DLL_THREAD_DETACH
Definition: compat.h:133
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
#define DLL_PROCESS_DETACH
Definition: compat.h:130
#define DLL_THREAD_ATTACH
Definition: compat.h:132
unsigned int BOOL
Definition: ntddk_ex.h:94
HBRUSH hbrBackground
Definition: winuser.h:3170
HICON hIcon
Definition: winuser.h:3168
HINSTANCE hInstance
Definition: winuser.h:3167
HCURSOR hCursor
Definition: winuser.h:3169
int cbWndExtra
Definition: winuser.h:3166
UINT style
Definition: winuser.h:3163
LPCSTR lpszMenuName
Definition: winuser.h:3171
LPCSTR lpszClassName
Definition: winuser.h:3172
WNDPROC lpfnWndProc
Definition: winuser.h:3164
int cbClsExtra
Definition: winuser.h:3165
#define IDC_ARROW
Definition: winuser.h:687
#define UnregisterClass
Definition: winuser.h:5861
#define LoadCursor
Definition: winuser.h:5812
#define CS_GLOBALCLASS
Definition: winuser.h:652
#define CS_OWNDC
Definition: winuser.h:655
#define RegisterClass
Definition: winuser.h:5836
WCHAR * LPWSTR
Definition: xmlstorage.h:184

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