#include <shlguid.h>
#include <shlwapi.h>
#include <shlobj.h>
+#include <prsht.h>
#include <wine/unicode.h>
#include <wine/debug.h>
smartkey3
};
+static const WCHAR PropSheetInfoStr[] =
+ {'P','r','o','p','e','r','t','y','S','h','e','e','t','I','n','f','o',0 };
+
+typedef struct tagPropPageInfo
+{
+ HPROPSHEETPAGE hpage; /* to keep track of pages not passed to PropertySheet */
+ HWND hwndPage;
+ BOOL isDirty;
+ LPCWSTR pszText;
+ BOOL hasHelp;
+ BOOL useCallback;
+ BOOL hasIcon;
+} PropPageInfo;
+
+typedef struct tagPropSheetInfo
+{
+ HWND hwnd;
+ PROPSHEETHEADERW ppshheader;
+ BOOL unicode;
+ LPWSTR strPropertiesFor;
+ int nPages;
+ int active_page;
+ BOOL isModeless;
+ BOOL hasHelp;
+ BOOL hasApply;
+ BOOL hasFinish;
+ BOOL usePropPage;
+ BOOL useCallback;
+ BOOL activeValid;
+ PropPageInfo* proppage;
+ HFONT hFont;
+ HFONT hFontBold;
+ int width;
+ int height;
+ HIMAGELIST hImageList;
+ BOOL ended;
+ INT result;
+} PropSheetInfo;
+
static int file_exists(LPCWSTR filename)
{
HANDLE file;
SendMessage(GetParent(dialog), PSM_CHANGED, 0, 0);
}
+static void set_restart_param (HWND dialog)
+{
+ PropSheetInfo* psInfo = GetPropW(GetParent(dialog), PropSheetInfoStr);
+
+ if (!psInfo) return;
+ psInfo->result = ID_PSREBOOTSYSTEM;
+}
+
INT_PTR CALLBACK
DongleDlgProc (HWND dialog, UINT msg, WPARAM wParam, LPARAM lParam)
{
if (HIWORD(wParam) != BN_CLICKED) break;
if (!get_start(num))
+ {
+ set_restart_param(dialog);
on_load_click(dialog, num);
+ }
break;
case IDC_BUTTON_UNLOAD:
num = get_list_selection(dialog);
if (HIWORD(wParam) != BN_CLICKED) break;
if (get_start(num))
+ {
+ set_restart_param(dialog);
on_unload_click(dialog, num);
+ }
break;
}
break;