ReactOS 0.4.15-dev-7108-g1cf6ce6
openglcfg.c
Go to the documentation of this file.
1#include "openglcfg.h"
2
3#include <cpl.h>
4
6
7static int CALLBACK
9{
10 // NOTE: This callback is needed to set large icon correctly.
12 switch (uMsg)
13 {
15 {
17 SendMessageW(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM)hIcon);
18 break;
19 }
20 }
21 return 0;
22}
23
25{
28
29 ZeroMemory(&psp, sizeof(PROPSHEETPAGE));
30 psp.dwSize = sizeof(PROPSHEETPAGE);
31 psp.dwFlags = PSP_DEFAULT;
32 psp.hInstance = hApplet;
35
36 ZeroMemory(&psh, sizeof(PROPSHEETHEADER));
37 psh.dwSize = sizeof(PROPSHEETHEADER);
39 psh.hwndParent = hWnd;
40 psh.hInstance = hApplet;
43 psh.nPages = sizeof(psp) / sizeof(PROPSHEETPAGE);
44 psh.nStartPage = 0;
45 psh.ppsp = &psp;
47
48 return (LONG)(PropertySheet(&psh) != -1);
49}
50
51LONG CALLBACK CPlApplet(HWND hWnd, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
52{
53 switch (uMsg)
54 {
55 case CPL_INIT:
56 return TRUE;
57
58 case CPL_GETCOUNT:
59 return 1;
60
61 case CPL_INQUIRE:
62 {
63 CPLINFO *CPlInfo = (CPLINFO*)lParam2;
64 CPlInfo->lData = 0;
65 CPlInfo->idIcon = IDI_CPLICON;
66 CPlInfo->idInfo = IDS_CPLDESCRIPTION;
67 CPlInfo->idName = IDS_CPLNAME;
68 }
69 break;
70
71 case CPL_DBLCLK:
73 break;
74 }
75
76 return FALSE;
77}
78
79
81{
83
84 switch (dwReason)
85 {
88 hApplet = hinstDLL;
89 break;
90 }
91
92 return TRUE;
93}
HWND hWnd
Definition: settings.c:17
INT_PTR CALLBACK GeneralPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
DWORD dwReason
Definition: misc.cpp:154
LPARAM lParam
Definition: combotst.c:139
#define CPL_INQUIRE
Definition: cpl.h:14
#define CPL_DBLCLK
Definition: cpl.h:16
#define CPL_INIT
Definition: cpl.h:12
#define CPL_GETCOUNT
Definition: cpl.h:13
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define IDD_PROPPAGEGENERAL
Definition: resource.h:10
#define IDS_CPLNAME
Definition: resource.h:8
#define IDS_CPLDESCRIPTION
Definition: resource.h:9
#define IDI_CPLICON
Definition: resource.h:4
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
#define CALLBACK
Definition: compat.h:35
#define DLL_THREAD_ATTACH
Definition: compat.h:132
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
static IN DWORD IN LPVOID lpvReserved
static HICON
Definition: imagelist.c:84
HICON hIcon
Definition: msconfig.c:44
unsigned int UINT
Definition: ndis.h:50
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
static int CALLBACK PropSheetProc(HWND hwndDlg, UINT uMsg, LPARAM lParam)
Definition: openglcfg.c:8
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
Definition: openglcfg.c:80
LONG CALLBACK AppletInit(HWND hWnd)
Definition: openglcfg.c:24
HINSTANCE hApplet
Definition: openglcfg.c:5
long LONG
Definition: pedump.c:60
#define PROPSHEETHEADER
Definition: prsht.h:392
#define PSH_USECALLBACK
Definition: prsht.h:48
#define PSP_DEFAULT
Definition: prsht.h:22
#define PropertySheet
Definition: prsht.h:400
#define PSH_PROPSHEETPAGE
Definition: prsht.h:43
#define PSH_USEICONID
Definition: prsht.h:42
#define PSCB_INITIALIZED
Definition: prsht.h:75
#define PROPSHEETPAGE
Definition: prsht.h:389
LPCPROPSHEETPAGEW ppsp
Definition: prsht.h:308
HINSTANCE hInstance
Definition: prsht.h:296
DWORD dwSize
Definition: prsht.h:293
DWORD dwFlags
Definition: prsht.h:294
LPCWSTR pszIcon
Definition: prsht.h:299
HWND hwndParent
Definition: prsht.h:295
PFNPROPSHEETCALLBACK pfnCallback
Definition: prsht.h:311
UINT nStartPage
Definition: prsht.h:304
LPCWSTR pszCaption
Definition: prsht.h:301
DLGPROC pfnDlgProc
Definition: prsht.h:226
DWORD dwSize
Definition: prsht.h:214
DWORD dwFlags
Definition: prsht.h:215
LPCWSTR pszTemplate
Definition: prsht.h:218
HINSTANCE hInstance
Definition: prsht.h:216
Definition: cpl.h:24
LONG_PTR lData
Definition: cpl.h:28
int idName
Definition: cpl.h:26
int idInfo
Definition: cpl.h:27
int idIcon
Definition: cpl.h:25
#define ICON_BIG
Definition: tnclass.cpp:51
#define ZeroMemory
Definition: winbase.h:1712
LONG_PTR LPARAM
Definition: windef.h:208
#define WINAPI
Definition: msvc.h:6
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define MAKEINTRESOURCE
Definition: winuser.h:591
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE hInstance, _In_ LPCWSTR lpIconName)
Definition: cursoricon.c:2044
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)