ReactOS 0.4.15-dev-7788-g1ad9096
propsheet.cpp File Reference
#include "shellext.h"
#include <windows.h>
#include <strsafe.h>
#include <winternl.h>
#include <shlwapi.h>
#include <uxtheme.h>
#include "propsheet.h"
#include "resource.h"
Include dependency graph for propsheet.cpp:

Go to the source code of this file.

Classes

struct  _FILE_ACCESS_INFORMATION
 
struct  _FILE_STANDARD_INFORMATION
 
struct  _FILE_FS_SIZE_INFORMATION
 

Macros

#define ISOLATION_AWARE_ENABLED   1
 
#define STRSAFE_NO_DEPRECATE
 
#define NO_SHLWAPI_STRFCNS
 
#define SUBVOL_ROOT_INODE   0x100
 
#define FileAccessInformation   (FILE_INFORMATION_CLASS)8
 
#define FileStandardInformation   (FILE_INFORMATION_CLASS)5
 
#define major(rdev)   ((((rdev) >> 8) & 0xFFF) | ((uint32_t)((rdev) >> 32) & ~0xFFF))
 
#define minor(rdev)   (((rdev) & 0xFF) | ((uint32_t)((rdev) >> 12) & ~0xFF))
 

Typedefs

typedef struct _FILE_ACCESS_INFORMATION FILE_ACCESS_INFORMATION
 
typedef struct _FILE_ACCESS_INFORMATIONPFILE_ACCESS_INFORMATION
 
typedef struct _FILE_STANDARD_INFORMATION FILE_STANDARD_INFORMATION
 
typedef struct _FILE_STANDARD_INFORMATIONPFILE_STANDARD_INFORMATION
 
typedef struct _FILE_FS_SIZE_INFORMATION FILE_FS_SIZE_INFORMATION
 
typedef struct _FILE_FS_SIZE_INFORMATIONPFILE_FS_SIZE_INFORMATION
 

Functions

static DWORD WINAPI global_search_list_thread (LPVOID lpParameter)
 
static ULONG inode_type_to_string_ref (uint8_t type)
 
static INT_PTR CALLBACK SizeDetailsDlgProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
static void set_check_box (HWND hwndDlg, ULONG id, uint64_t min, uint64_t max)
 
static INT_PTR CALLBACK PropSheetDlgProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
void CALLBACK ShowPropSheetW (HWND hwnd, HINSTANCE hinst, LPWSTR lpszCmdLine, int nCmdShow)
 

Macro Definition Documentation

◆ FileAccessInformation

#define FileAccessInformation   (FILE_INFORMATION_CLASS)8

Definition at line 51 of file propsheet.cpp.

◆ FileStandardInformation

#define FileStandardInformation   (FILE_INFORMATION_CLASS)5

Definition at line 61 of file propsheet.cpp.

◆ ISOLATION_AWARE_ENABLED

#define ISOLATION_AWARE_ENABLED   1

Definition at line 18 of file propsheet.cpp.

◆ major

#define major (   rdev)    ((((rdev) >> 8) & 0xFFF) | ((uint32_t)((rdev) >> 32) & ~0xFFF))

Definition at line 928 of file propsheet.cpp.

◆ minor

#define minor (   rdev)    (((rdev) & 0xFF) | ((uint32_t)((rdev) >> 12) & ~0xFF))

Definition at line 929 of file propsheet.cpp.

◆ NO_SHLWAPI_STRFCNS

#define NO_SHLWAPI_STRFCNS

Definition at line 35 of file propsheet.cpp.

◆ STRSAFE_NO_DEPRECATE

#define STRSAFE_NO_DEPRECATE

Definition at line 19 of file propsheet.cpp.

◆ SUBVOL_ROOT_INODE

#define SUBVOL_ROOT_INODE   0x100

Definition at line 42 of file propsheet.cpp.

Typedef Documentation

◆ FILE_ACCESS_INFORMATION

◆ FILE_FS_SIZE_INFORMATION

◆ FILE_STANDARD_INFORMATION

◆ PFILE_ACCESS_INFORMATION

◆ PFILE_FS_SIZE_INFORMATION

◆ PFILE_STANDARD_INFORMATION

Function Documentation

◆ global_search_list_thread()

static DWORD WINAPI global_search_list_thread ( LPVOID  lpParameter)
static

Definition at line 166 of file propsheet.cpp.

166 {
167 BtrfsPropSheet* bps = (BtrfsPropSheet*)lpParameter;
168
169 return bps->search_list_thread();
170}
DWORD search_list_thread()
Definition: propsheet.cpp:154

Referenced by BtrfsPropSheet::Initialize(), and BtrfsPropSheet::set_cmdline().

◆ inode_type_to_string_ref()

static ULONG inode_type_to_string_ref ( uint8_t  type)
static

Definition at line 558 of file propsheet.cpp.

558 {
559 switch (type) {
560 case BTRFS_TYPE_FILE:
561 return IDS_INODE_FILE;
562
564 return IDS_INODE_DIR;
565
567 return IDS_INODE_CHAR;
568
570 return IDS_INODE_BLOCK;
571
572 case BTRFS_TYPE_FIFO:
573 return IDS_INODE_FIFO;
574
576 return IDS_INODE_SOCKET;
577
579 return IDS_INODE_SYMLINK;
580
581 default:
582 return IDS_INODE_UNKNOWN;
583 }
584}
#define IDS_INODE_SYMLINK
Definition: resource.h:26
#define IDS_INODE_UNKNOWN
Definition: resource.h:27
#define IDS_INODE_BLOCK
Definition: resource.h:23
#define IDS_INODE_DIR
Definition: resource.h:20
#define IDS_INODE_SOCKET
Definition: resource.h:25
#define IDS_INODE_FIFO
Definition: resource.h:24
#define IDS_INODE_CHAR
Definition: resource.h:22
#define IDS_INODE_FILE
Definition: resource.h:18
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define BTRFS_TYPE_FILE
Definition: shellext.h:85
#define BTRFS_TYPE_DIRECTORY
Definition: shellext.h:86
#define BTRFS_TYPE_SOCKET
Definition: shellext.h:90
#define BTRFS_TYPE_FIFO
Definition: shellext.h:89
#define BTRFS_TYPE_SYMLINK
Definition: shellext.h:91
#define BTRFS_TYPE_CHARDEV
Definition: shellext.h:87
#define BTRFS_TYPE_BLOCKDEV
Definition: shellext.h:88

Referenced by BtrfsPropSheet::init_propsheet().

◆ PropSheetDlgProc()

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

Definition at line 1102 of file propsheet.cpp.

1102 {
1103 try {
1104 switch (uMsg) {
1105 case WM_INITDIALOG:
1106 {
1108 BtrfsPropSheet* bps = (BtrfsPropSheet*)psp->lParam;
1109
1111
1113
1114 bps->init_propsheet(hwndDlg);
1115
1116 return false;
1117 }
1118
1119 case WM_COMMAND:
1120 {
1122
1123 if (bps && !bps->readonly) {
1124 switch (HIWORD(wParam)) {
1125 case BN_CLICKED: {
1126 switch (LOWORD(wParam)) {
1127 case IDC_NODATACOW:
1129 break;
1130
1131 case IDC_COMPRESS:
1133
1135 break;
1136
1137 case IDC_USERR:
1138 bps->change_perm_flag(hwndDlg, S_IRUSR, IsDlgButtonChecked(hwndDlg, LOWORD(wParam)));
1139 break;
1140
1141 case IDC_USERW:
1142 bps->change_perm_flag(hwndDlg, S_IWUSR, IsDlgButtonChecked(hwndDlg, LOWORD(wParam)));
1143 break;
1144
1145 case IDC_USERX:
1146 bps->change_perm_flag(hwndDlg, S_IXUSR, IsDlgButtonChecked(hwndDlg, LOWORD(wParam)));
1147 break;
1148
1149 case IDC_GROUPR:
1150 bps->change_perm_flag(hwndDlg, S_IRGRP, IsDlgButtonChecked(hwndDlg, LOWORD(wParam)));
1151 break;
1152
1153 case IDC_GROUPW:
1154 bps->change_perm_flag(hwndDlg, S_IWGRP, IsDlgButtonChecked(hwndDlg, LOWORD(wParam)));
1155 break;
1156
1157 case IDC_GROUPX:
1158 bps->change_perm_flag(hwndDlg, S_IXGRP, IsDlgButtonChecked(hwndDlg, LOWORD(wParam)));
1159 break;
1160
1161 case IDC_OTHERR:
1162 bps->change_perm_flag(hwndDlg, S_IROTH, IsDlgButtonChecked(hwndDlg, LOWORD(wParam)));
1163 break;
1164
1165 case IDC_OTHERW:
1166 bps->change_perm_flag(hwndDlg, S_IWOTH, IsDlgButtonChecked(hwndDlg, LOWORD(wParam)));
1167 break;
1168
1169 case IDC_OTHERX:
1170 bps->change_perm_flag(hwndDlg, S_IXOTH, IsDlgButtonChecked(hwndDlg, LOWORD(wParam)));
1171 break;
1172
1173 case IDC_SETUID:
1174 bps->change_perm_flag(hwndDlg, S_ISUID, IsDlgButtonChecked(hwndDlg, LOWORD(wParam)));
1175 break;
1176
1177 case IDC_SETGID:
1178 bps->change_perm_flag(hwndDlg, S_ISGID, IsDlgButtonChecked(hwndDlg, LOWORD(wParam)));
1179 break;
1180
1181 case IDC_STICKY:
1182 bps->change_perm_flag(hwndDlg, S_ISVTX, IsDlgButtonChecked(hwndDlg, LOWORD(wParam)));
1183 break;
1184
1185 case IDC_SUBVOL_RO:
1186 switch (IsDlgButtonChecked(hwndDlg, LOWORD(wParam))) {
1187 case BST_CHECKED:
1188 bps->ro_subvol = true;
1189 bps->ro_changed = true;
1190 break;
1191
1192 case BST_UNCHECKED:
1193 bps->ro_subvol = false;
1194 bps->ro_changed = true;
1195 break;
1196
1197 case BST_INDETERMINATE:
1198 bps->ro_changed = false;
1199 break;
1200 }
1201
1202 SendMessageW(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0);
1203 break;
1204
1205 case IDC_OPEN_ADMIN:
1206 bps->open_as_admin(hwndDlg);
1207 break;
1208 }
1209
1210 break;
1211 }
1212
1213 case EN_CHANGE: {
1214 switch (LOWORD(wParam)) {
1215 case IDC_UID: {
1216 WCHAR s[255];
1217
1218 GetDlgItemTextW(hwndDlg, LOWORD(wParam), s, sizeof(s) / sizeof(WCHAR));
1219
1220 bps->change_uid(hwndDlg, _wtoi(s));
1221 break;
1222 }
1223
1224 case IDC_GID: {
1225 WCHAR s[255];
1226
1227 GetDlgItemTextW(hwndDlg, LOWORD(wParam), s, sizeof(s) / sizeof(WCHAR));
1228
1229 bps->change_gid(hwndDlg, _wtoi(s));
1230 break;
1231 }
1232 }
1233
1234 break;
1235 }
1236
1237 case CBN_SELCHANGE: {
1238 switch (LOWORD(wParam)) {
1239 case IDC_COMPRESS_TYPE: {
1240 auto sel = SendMessageW(GetDlgItem(hwndDlg, LOWORD(wParam)), CB_GETCURSEL, 0, 0);
1241
1242 if (bps->min_compression_type != bps->max_compression_type) {
1243 if (sel == 0)
1244 bps->compress_type_changed = false;
1245 else {
1246 bps->compress_type = (uint8_t)(sel - 1);
1247 bps->compress_type_changed = true;
1248 }
1249 } else {
1250 bps->compress_type = (uint8_t)sel;
1251 bps->compress_type_changed = true;
1252 }
1253
1254 SendMessageW(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0);
1255
1256 break;
1257 }
1258 }
1259
1260 break;
1261 }
1262 }
1263 }
1264
1265 break;
1266 }
1267
1268 case WM_NOTIFY:
1269 {
1270 switch (((LPNMHDR)lParam)->code) {
1271 case PSN_KILLACTIVE:
1272 SetWindowLongPtrW(hwndDlg, DWLP_MSGRESULT, false);
1273 break;
1274
1275 case PSN_APPLY: {
1277
1278 bps->apply_changes(hwndDlg);
1280 break;
1281 }
1282
1283 case NM_CLICK:
1284 case NM_RETURN: {
1285 if (((LPNMHDR)lParam)->hwndFrom == GetDlgItem(hwndDlg, IDC_SIZE_ON_DISK)) {
1286 PNMLINK pNMLink = (PNMLINK)lParam;
1287
1288 if (pNMLink->item.iLink == 0)
1290 }
1291 break;
1292 }
1293 }
1294 }
1295
1296 case WM_TIMER:
1297 {
1299
1300 if (bps) {
1301 bps->set_size_on_disk(hwndDlg);
1302
1303 if (!bps->thread)
1304 KillTimer(hwndDlg, 1);
1305 }
1306
1307 break;
1308 }
1309 }
1310 } catch (const exception& e) {
1311 error_message(hwndDlg, e.what());
1312 }
1313
1314 return false;
1315}
void change_perm_flag(HWND hDlg, ULONG perm, UINT state)
Definition: propsheet.cpp:771
uint8_t max_compression_type
Definition: propsheet.h:179
void change_gid(HWND hDlg, uint32_t gid)
Definition: propsheet.cpp:796
void change_uid(HWND hDlg, uint32_t uid)
Definition: propsheet.cpp:787
void init_propsheet(HWND hwndDlg)
Definition: propsheet.cpp:931
HANDLE thread
Definition: propsheet.h:175
uint8_t min_compression_type
Definition: propsheet.h:179
void apply_changes(HWND hDlg)
Definition: propsheet.cpp:698
void set_size_on_disk(HWND hwndDlg)
Definition: propsheet.cpp:730
bool compress_type_changed
Definition: propsheet.h:181
void open_as_admin(HWND hwndDlg)
Definition: propsheet.cpp:883
void change_inode_flag(HWND hDlg, uint64_t flag, UINT state)
Definition: propsheet.cpp:586
uint8_t compress_type
Definition: propsheet.h:179
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
void error_message(HWND hwnd, const char *msg)
Definition: main.cpp:783
#define IDC_STICKY
Definition: resource.h:234
#define IDC_NODATACOW
Definition: resource.h:220
#define IDC_GROUPW
Definition: resource.h:215
#define IDC_OTHERX
Definition: resource.h:219
#define IDC_GID
Definition: resource.h:210
#define IDC_COMPRESS
Definition: resource.h:224
#define IDC_GROUPX
Definition: resource.h:218
#define IDC_OPEN_ADMIN
Definition: resource.h:276
#define IDC_GROUPR
Definition: resource.h:212
#define IDC_USERW
Definition: resource.h:214
#define IDC_SIZE_ON_DISK
Definition: resource.h:225
#define IDC_UID
Definition: resource.h:209
#define IDD_SIZE_DETAILS
Definition: resource.h:8
#define IDC_OTHERW
Definition: resource.h:216
#define IDC_USERX
Definition: resource.h:217
#define IDC_USERR
Definition: resource.h:211
#define IDC_OTHERR
Definition: resource.h:213
#define IDC_SETGID
Definition: resource.h:231
#define IDC_SETUID
Definition: resource.h:228
#define IDC_SUBVOL_RO
Definition: resource.h:320
#define IDC_COMPRESS_TYPE
Definition: resource.h:318
#define ETDT_ENABLETAB
Definition: dxdiag.c:30
GLdouble s
Definition: gl.h:2039
_Check_return_ _CRTIMP int __cdecl _wtoi(_In_z_ const wchar_t *_Str)
#define e
Definition: ke_i.h:82
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define uint8_t
Definition: nsiface.idl:59
#define LOWORD(l)
Definition: pedump.c:82
static INT_PTR CALLBACK SizeDetailsDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: propsheet.cpp:821
#define S_IXGRP
Definition: propsheet.h:49
#define S_IROTH
Definition: propsheet.h:53
#define BTRFS_INODE_COMPRESS
Definition: propsheet.h:87
#define S_ISUID
Definition: propsheet.h:65
#define S_IXOTH
Definition: propsheet.h:61
#define S_IRGRP
Definition: propsheet.h:41
#define S_IWOTH
Definition: propsheet.h:57
#define S_IRUSR
Definition: propsheet.h:29
#define S_ISVTX
Definition: propsheet.h:73
#define BTRFS_INODE_NODATACOW
Definition: propsheet.h:77
#define S_ISGID
Definition: propsheet.h:69
#define S_IWUSR
Definition: propsheet.h:33
#define S_IWGRP
Definition: propsheet.h:45
#define S_IXUSR
Definition: propsheet.h:37
#define PSM_CHANGED
Definition: prsht.h:164
#define PSN_KILLACTIVE
Definition: prsht.h:116
#define PSN_APPLY
Definition: prsht.h:117
#define PSNRET_NOERROR
Definition: prsht.h:129
struct tagNMLINK * PNMLINK
#define NM_CLICK
Definition: commctrl.h:130
#define NM_RETURN
Definition: commctrl.h:132
#define WM_NOTIFY
Definition: richedit.h:61
LPARAM lParam
Definition: prsht.h:227
Definition: inflate.c:139
int iLink
Definition: commctrl.h:4753
#define GWLP_USERDATA
Definition: treelist.c:63
#define HIWORD(l)
Definition: typedefs.h:247
HRESULT WINAPI EnableThemeDialogTexture(_In_ HWND hwnd, _In_ DWORD dwFlags)
Definition: uxthemesupp.c:55
UINT WINAPI GetDlgItemTextW(HWND hDlg, int nIDDlgItem, LPWSTR lpString, int nMaxCount)
Definition: dialog.c:2263
UINT_PTR WPARAM
Definition: windef.h:207
#define BST_INDETERMINATE
Definition: winuser.h:198
#define GetWindowLongPtrW
Definition: winuser.h:4829
#define BST_UNCHECKED
Definition: winuser.h:199
#define WM_COMMAND
Definition: winuser.h:1740
#define WM_INITDIALOG
Definition: winuser.h:1739
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define CBN_SELCHANGE
Definition: winuser.h:1979
UINT WINAPI IsDlgButtonChecked(_In_ HWND, _In_ int)
#define WM_TIMER
Definition: winuser.h:1742
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
HWND WINAPI GetParent(_In_ HWND)
#define DWLP_MSGRESULT
Definition: winuser.h:870
#define BN_CLICKED
Definition: winuser.h:1925
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
#define CB_GETCURSEL
Definition: winuser.h:1943
#define SetWindowLongPtrW
Definition: winuser.h:5346
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define BST_CHECKED
Definition: winuser.h:197
INT_PTR WINAPI DialogBoxParamW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
#define EN_CHANGE
Definition: winuser.h:2022
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by BtrfsPropSheet::AddPages(), BtrfsVolPropSheet::AddPages(), and ShowPropSheetW().

◆ set_check_box()

static void set_check_box ( HWND  hwndDlg,
ULONG  id,
uint64_t  min,
uint64_t  max 
)
static

Definition at line 866 of file propsheet.cpp.

866 {
867 if (min && max) {
869 } else if (!min && !max) {
871 } else {
873
875 style &= ~BS_AUTOCHECKBOX;
878
880 }
881}
Arabic default style
Definition: afstyles.h:94
#define min(a, b)
Definition: monoChain.cc:55
#define BS_AUTO3STATE
Definition: pedump.c:657
#define max(a, b)
Definition: svc.c:63
#define BM_SETCHECK
Definition: winuser.h:1921
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define GWL_STYLE
Definition: winuser.h:852

Referenced by BtrfsPropSheet::init_propsheet().

◆ ShowPropSheetW()

void CALLBACK ShowPropSheetW ( HWND  hwnd,
HINSTANCE  hinst,
LPWSTR  lpszCmdLine,
int  nCmdShow 
)

Definition at line 1368 of file propsheet.cpp.

1368 {
1369 try {
1370 BtrfsPropSheet bps;
1371 PROPSHEETPAGEW psp;
1372 PROPSHEETHEADERW psh;
1374 wstring title;
1375
1376 set_dpi_aware();
1377
1379
1380 bps.set_cmdline(lpszCmdLine);
1381
1382 icex.dwSize = sizeof(icex);
1383 icex.dwICC = ICC_LINK_CLASS;
1384
1385 if (!InitCommonControlsEx(&icex))
1387
1388 psp.dwSize = sizeof(psp);
1389 psp.dwFlags = PSP_USETITLE;
1390 psp.hInstance = module;
1392 psp.hIcon = 0;
1395 psp.pfnCallback = nullptr;
1396 psp.lParam = (LPARAM)&bps;
1397
1398 memset(&psh, 0, sizeof(PROPSHEETHEADERW));
1399
1400 psh.dwSize = sizeof(PROPSHEETHEADERW);
1402 psh.hwndParent = hwnd;
1403 psh.hInstance = psp.hInstance;
1404 psh.pszCaption = title.c_str();
1405 psh.nPages = 1;
1406 psh.ppsp = &psp;
1407
1408 if (PropertySheetW(&psh) < 0)
1409 throw last_error(GetLastError());
1410 } catch (const exception& e) {
1411 error_message(hwnd, e.what());
1412 }
1413}
void set_cmdline(const wstring &cmdline)
Definition: propsheet.cpp:414
BOOL WINAPI InitCommonControlsEx(const INITCOMMONCONTROLSEX *lpInitCtrls)
Definition: commctrl.c:893
#define DLGPROC
Definition: maze.c:62
void set_dpi_aware()
Definition: main.cpp:50
#define IDS_STANDALONE_PROPSHEET_TITLE
Definition: resource.h:127
#define IDD_PROP_SHEET
Definition: resource.h:15
#define IDS_PROP_SHEET_TITLE
Definition: resource.h:16
#define IDS_INITCOMMONCONTROLSEX_FAILED
Definition: resource.h:205
INT_PTR WINAPI PropertySheetW(LPCPROPSHEETHEADERW lppsh)
Definition: propsheet.c:2913
static int load_string(HINSTANCE hModule, UINT resId, LPWSTR pwszBuffer, INT cMaxChars)
Definition: muireg.c:10
static INT_PTR CALLBACK PropSheetDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: propsheet.cpp:1102
#define PSP_USETITLE
Definition: prsht.h:26
#define PSH_PROPSHEETPAGE
Definition: prsht.h:43
struct _PROPSHEETHEADERW PROPSHEETHEADERW
static char title[]
Definition: ps.c:92
#define ICC_LINK_CLASS
Definition: commctrl.h:74
#define memset(x, y, z)
Definition: compat.h:39
LPCPROPSHEETPAGEW ppsp
Definition: prsht.h:308
HINSTANCE hInstance
Definition: prsht.h:296
DWORD dwSize
Definition: prsht.h:293
DWORD dwFlags
Definition: prsht.h:294
HWND hwndParent
Definition: prsht.h:295
LPCWSTR pszCaption
Definition: prsht.h:301
DLGPROC pfnDlgProc
Definition: prsht.h:226
DWORD dwSize
Definition: prsht.h:214
DWORD dwFlags
Definition: prsht.h:215
HICON hIcon
Definition: prsht.h:222
LPCWSTR pszTemplate
Definition: prsht.h:218
LPCWSTR pszTitle
Definition: prsht.h:225
HINSTANCE hInstance
Definition: prsht.h:216
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LPARAM
Definition: windef.h:208

◆ SizeDetailsDlgProc()

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

Definition at line 821 of file propsheet.cpp.

821 {
822 try {
823 switch (uMsg) {
824 case WM_INITDIALOG:
825 {
827
829
830 bps->update_size_details_dialog(hwndDlg);
831
832 if (bps->thread)
833 SetTimer(hwndDlg, 1, 250, nullptr);
834
835 return true;
836 }
837
838 case WM_COMMAND:
839 if (HIWORD(wParam) == BN_CLICKED && (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)) {
840 EndDialog(hwndDlg, 0);
841 return true;
842 }
843 break;
844
845 case WM_TIMER:
846 {
848
849 if (bps) {
850 bps->update_size_details_dialog(hwndDlg);
851
852 if (!bps->thread)
853 KillTimer(hwndDlg, 1);
854 }
855
856 break;
857 }
858 }
859 } catch (const exception& e) {
860 error_message(hwndDlg, e.what());
861 }
862
863 return false;
864}
void update_size_details_dialog(HWND hDlg)
Definition: propsheet.cpp:805
#define IDCANCEL
Definition: winuser.h:831
#define IDOK
Definition: winuser.h:830
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)

Referenced by PropSheetDlgProc().