ReactOS 0.4.16-dev-306-g647d351
openglcfg.h File Reference
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
#include <winuser.h>
#include <commctrl.h>
#include <strsafe.h>
#include "resource.h"
Include dependency graph for openglcfg.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define WIN32_NO_STATUS
 
#define MAX_KEY_LENGTH   256
 
#define RENDERER_DEFAULT   0
 
#define RENDERER_RSWR   1
 
#define DEBUG_SET   1
 
#define DEBUG_CLEAR   2
 
#define KEY_RENDERER   L"Software\\ReactOS\\OpenGL"
 
#define KEY_DRIVERS   L"Software\\Microsoft\\Windows NT\\CurrentVersion\\OpenGLDrivers"
 
#define KEY_DEBUG_CHANNEL   L"System\\CurrentControlSet\\Control\\Session Manager\\Environment"
 

Functions

INT_PTR CALLBACK GeneralPageProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 

Variables

HINSTANCE hApplet
 

Macro Definition Documentation

◆ DEBUG_CLEAR

#define DEBUG_CLEAR   2

Definition at line 20 of file openglcfg.h.

◆ DEBUG_SET

#define DEBUG_SET   1

Definition at line 19 of file openglcfg.h.

◆ KEY_DEBUG_CHANNEL

#define KEY_DEBUG_CHANNEL   L"System\\CurrentControlSet\\Control\\Session Manager\\Environment"

Definition at line 24 of file openglcfg.h.

◆ KEY_DRIVERS

#define KEY_DRIVERS   L"Software\\Microsoft\\Windows NT\\CurrentVersion\\OpenGLDrivers"

Definition at line 23 of file openglcfg.h.

◆ KEY_RENDERER

#define KEY_RENDERER   L"Software\\ReactOS\\OpenGL"

Definition at line 22 of file openglcfg.h.

◆ MAX_KEY_LENGTH

#define MAX_KEY_LENGTH   256

Definition at line 14 of file openglcfg.h.

◆ RENDERER_DEFAULT

#define RENDERER_DEFAULT   0

Definition at line 16 of file openglcfg.h.

◆ RENDERER_RSWR

#define RENDERER_RSWR   1

Definition at line 17 of file openglcfg.h.

◆ WIN32_NO_STATUS

#define WIN32_NO_STATUS

Definition at line 5 of file openglcfg.h.

Function Documentation

◆ GeneralPageProc()

INT_PTR CALLBACK GeneralPageProc ( HWND  hwndDlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 327 of file propsheet_general.c.

331{
332 PPAGEDATA pPageData;
333
334 /* Get the window context */
335 pPageData = (PPAGEDATA)GetWindowLongPtr(hwndDlg,
337 if (pPageData == NULL && uMsg != WM_INITDIALOG)
338 {
339 return FALSE;
340 }
341
342 switch (uMsg)
343 {
344 case WM_INITDIALOG:
345 pPageData = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(PAGEDATA));
346 if (pPageData != NULL)
347 {
348 SetWindowLongPtr(hwndDlg,
350 (LONG_PTR)pPageData);
351
352 pPageData->dlgInfo = (PSERVICEPROPSHEET)(((LPPROPSHEETPAGE)lParam)->lParam);
353 if (pPageData->dlgInfo != NULL)
354 {
355 InitGeneralPage(pPageData->dlgInfo, hwndDlg);
356 SetButtonStates(pPageData->dlgInfo, hwndDlg);
357 }
358 }
359 break;
360
361 case WM_DESTROY:
362 HeapFree(GetProcessHeap(), 0, pPageData);
363 break;
364
365 case WM_COMMAND:
366 switch(LOWORD(wParam))
367 {
368 case IDC_START_TYPE:
370 {
371 pPageData->bStartTypeChanged = TRUE;
372 PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
373 }
374 break;
375
376 case IDC_DISP_NAME:
377 if (HIWORD(wParam) == EN_CHANGE)
378 {
379 pPageData->bDisplayNameChanged = TRUE;
380 PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
381 }
382 break;
383
384 case IDC_DESCRIPTION:
385 if (HIWORD(wParam) == EN_CHANGE)
386 {
387 pPageData->bDescriptionChanged = TRUE;
388 PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
389 }
390 break;
391
392 case IDC_EXEPATH:
393 if (HIWORD(wParam) == EN_CHANGE)
394 {
395 pPageData->bBinaryPathChanged = TRUE;
396 PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
397 }
398 break;
399
400 case IDC_START:
401 {
402 WCHAR szStartParams[256];
403 LPWSTR lpStartParams = NULL;
404
405 if (GetDlgItemText(hwndDlg, IDC_START_PARAM, szStartParams, 256) > 0)
406 lpStartParams = szStartParams;
407
409
410 RunActionWithProgress(hwndDlg,
411 pPageData->dlgInfo->pService->lpServiceName,
412 pPageData->dlgInfo->pService->lpDisplayName,
414 lpStartParams);
415
417 ChangeListViewText(pPageData->dlgInfo->Info, pPageData->dlgInfo->pService, LVSTATUS);
418 SetButtonStates(pPageData->dlgInfo, hwndDlg);
419 SetServiceStatusText(pPageData->dlgInfo, hwndDlg);
420 break;
421 }
422
423 case IDC_STOP:
424 RunActionWithProgress(hwndDlg,
425 pPageData->dlgInfo->pService->lpServiceName,
426 pPageData->dlgInfo->pService->lpDisplayName,
428 NULL);
429
431 ChangeListViewText(pPageData->dlgInfo->Info, pPageData->dlgInfo->pService, LVSTATUS);
432 SetButtonStates(pPageData->dlgInfo, hwndDlg);
433 SetServiceStatusText(pPageData->dlgInfo, hwndDlg);
434 break;
435
436 case IDC_PAUSE:
437 RunActionWithProgress(hwndDlg,
438 pPageData->dlgInfo->pService->lpServiceName,
439 pPageData->dlgInfo->pService->lpDisplayName,
441 NULL);
442
444 ChangeListViewText(pPageData->dlgInfo->Info, pPageData->dlgInfo->pService, LVSTATUS);
445 SetButtonStates(pPageData->dlgInfo, hwndDlg);
446 SetServiceStatusText(pPageData->dlgInfo, hwndDlg);
447 break;
448
449 case IDC_RESUME:
450 RunActionWithProgress(hwndDlg,
451 pPageData->dlgInfo->pService->lpServiceName,
452 pPageData->dlgInfo->pService->lpDisplayName,
454 NULL);
455
457 ChangeListViewText(pPageData->dlgInfo->Info, pPageData->dlgInfo->pService, LVSTATUS);
458 SetButtonStates(pPageData->dlgInfo, hwndDlg);
459 SetServiceStatusText(pPageData->dlgInfo, hwndDlg);
460 break;
461
462 case IDC_EDIT:
467 break;
468 }
469 break;
470
471 case WM_NOTIFY:
472 switch (((LPNMHDR)lParam)->code)
473 {
474 case PSN_APPLY:
475 if (pPageData->bDisplayNameChanged ||
476 pPageData->bDescriptionChanged ||
477 pPageData->bBinaryPathChanged ||
478 pPageData->bStartTypeChanged)
479 {
480 SaveDlgInfo(pPageData, hwndDlg);
481 SetButtonStates(pPageData->dlgInfo, hwndDlg);
482 pPageData->bDisplayNameChanged = FALSE;
483 pPageData->bDescriptionChanged = FALSE;
484 pPageData->bBinaryPathChanged = FALSE;
485 pPageData->bStartTypeChanged = FALSE;
486 }
487 break;
488 }
489 break;
490 }
491
492 return FALSE;
493}
#define IDC_PAUSE
Definition: resource.h:75
#define IDC_STOP
Definition: resource.h:69
VOID ChangeListViewText(PMAIN_WND_INFO Info, ENUM_SERVICE_STATUS_PROCESS *pService, UINT Column)
Definition: listview.c:105
#define ACTION_START
Definition: precomp.h:40
BOOL RunActionWithProgress(HWND hParent, LPWSTR ServiceName, LPWSTR DisplayName, UINT Action, PVOID Param)
Definition: progress.c:372
#define ACTION_PAUSE
Definition: precomp.h:42
BOOL UpdateServiceStatus(ENUM_SERVICE_STATUS_PROCESS *pService)
Definition: query.c:373
#define LVSTATUS
Definition: precomp.h:31
struct _SERVICEPROPSHEET * PSERVICEPROPSHEET
#define ACTION_STOP
Definition: precomp.h:41
#define ACTION_RESUME
Definition: precomp.h:43
#define IDC_DESCRIPTION
Definition: resource.h:129
#define IDC_START
Definition: resource.h:135
#define IDC_EXEPATH
Definition: resource.h:130
#define IDC_EDIT
Definition: resource.h:134
#define IDC_RESUME
Definition: resource.h:138
#define IDC_START_TYPE
Definition: resource.h:131
#define IDC_START_PARAM
Definition: resource.h:133
#define IDC_DISP_NAME
Definition: resource.h:128
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define LOWORD(l)
Definition: pedump.c:82
static VOID InitGeneralPage(PSERVICEPROPSHEET dlgInfo, HWND hwndDlg)
static VOID SetButtonStates(PSERVICEPROPSHEET dlgInfo, HWND hwndDlg)
struct _PAGEDATA * PPAGEDATA
VOID SaveDlgInfo(PPAGEDATA pPageData, HWND hwndDlg)
static VOID SetServiceStatusText(PSERVICEPROPSHEET dlgInfo, HWND hwndDlg)
#define PropSheet_Changed(d, w)
Definition: prsht.h:344
#define PSN_APPLY
Definition: prsht.h:117
#define LPPROPSHEETPAGE
Definition: prsht.h:390
#define WM_NOTIFY
Definition: richedit.h:61
PSERVICEPROPSHEET dlgInfo
BOOL bDescriptionChanged
BOOL bDisplayNameChanged
BOOL bStartTypeChanged
BOOL bBinaryPathChanged
ENUM_SERVICE_STATUS_PROCESS * pService
Definition: precomp.h:132
PMAIN_WND_INFO Info
Definition: precomp.h:131
Definition: inflate.c:139
#define GetWindowLongPtr
Definition: treelist.c:73
#define SetWindowLongPtr
Definition: treelist.c:70
#define GWLP_USERDATA
Definition: treelist.c:63
#define HIWORD(l)
Definition: typedefs.h:247
#define EM_SETREADONLY
Definition: winuser.h:2018
#define GetDlgItemText
Definition: winuser.h:5797
#define WM_COMMAND
Definition: winuser.h:1743
#define WM_INITDIALOG
Definition: winuser.h:1742
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define CBN_SELCHANGE
Definition: winuser.h:1982
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
HWND WINAPI GetParent(_In_ HWND)
#define WM_DESTROY
Definition: winuser.h:1612
#define SendDlgItemMessage
Definition: winuser.h:5854
#define EN_CHANGE
Definition: winuser.h:2025
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Variable Documentation

◆ hApplet

HINSTANCE hApplet
extern

Definition at line 17 of file access.c.