ReactOS 0.4.15-dev-5836-g942b022
openglcfg.c File Reference
#include "openglcfg.h"
#include <cpl.h>
Include dependency graph for openglcfg.c:

Go to the source code of this file.

Functions

static int CALLBACK PropSheetProc (HWND hwndDlg, UINT uMsg, LPARAM lParam)
 
LONG CALLBACK AppletInit (HWND hWnd)
 
LONG CALLBACK CPlApplet (HWND hWnd, UINT uMsg, LPARAM lParam1, LPARAM lParam2)
 
BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
 

Variables

HINSTANCE hApplet = 0
 

Function Documentation

◆ AppletInit()

LONG CALLBACK AppletInit ( HWND  hWnd)

Definition at line 24 of file openglcfg.c.

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}
HWND hWnd
Definition: settings.c:17
INT_PTR CALLBACK GeneralPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
#define IDD_PROPPAGEGENERAL
Definition: resource.h:10
#define IDS_CPLNAME
Definition: resource.h:8
#define IDI_CPLICON
Definition: resource.h:4
static int CALLBACK PropSheetProc(HWND hwndDlg, UINT uMsg, LPARAM lParam)
Definition: openglcfg.c:8
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 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
#define ZeroMemory
Definition: winbase.h:1670
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define MAKEINTRESOURCE
Definition: winuser.h:591

Referenced by CPlApplet().

◆ CPlApplet()

LONG CALLBACK CPlApplet ( HWND  hWnd,
UINT  uMsg,
LPARAM  lParam1,
LPARAM  lParam2 
)

Definition at line 51 of file openglcfg.c.

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}
#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 IDS_CPLDESCRIPTION
Definition: resource.h:9
LONG CALLBACK AppletInit(HWND hWnd)
Definition: openglcfg.c:24
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

◆ DllMain()

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

Definition at line 80 of file openglcfg.c.

81{
83
84 switch (dwReason)
85 {
88 hApplet = hinstDLL;
89 break;
90 }
91
92 return TRUE;
93}
DWORD dwReason
Definition: misc.cpp:154
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
#define DLL_THREAD_ATTACH
Definition: compat.h:132
static IN DWORD IN LPVOID lpvReserved
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317

◆ PropSheetProc()

static int CALLBACK PropSheetProc ( HWND  hwndDlg,
UINT  uMsg,
LPARAM  lParam 
)
static

Definition at line 8 of file openglcfg.c.

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}
static HICON
Definition: imagelist.c:84
HICON hIcon
Definition: msconfig.c:44
#define PSCB_INITIALIZED
Definition: prsht.h:75
#define ICON_BIG
Definition: tnclass.cpp:51
LONG_PTR LPARAM
Definition: windef.h:208
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2044
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)

Referenced by AppletInit().

Variable Documentation

◆ hApplet

HINSTANCE hApplet = 0

Definition at line 5 of file openglcfg.c.

Referenced by AppletInit(), DllMain(), and PropSheetProc().