Destroy the header font
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7220 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
75a41ba8d7
commit
0f2f08439d
3 changed files with 12 additions and 3 deletions
|
@ -687,7 +687,7 @@ INT_PTR CALLBACK DialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam
|
|||
}
|
||||
case IDM_WNDSPY:
|
||||
{
|
||||
extern int ShowWndSpy(HWND hOwner);
|
||||
extern INT_PTR ShowWndSpy(HWND hOwner);
|
||||
return ShowWndSpy(g_sdata.hwnd);
|
||||
}
|
||||
case IDM_GUIDGEN:
|
||||
|
@ -943,6 +943,7 @@ static INT_PTR CALLBACK AboutProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
|
|||
}
|
||||
break;
|
||||
case WM_DESTROY:
|
||||
DeleteObject(dd.hHeaderFont);
|
||||
DeleteObject(dd.hFont);
|
||||
DeleteObject(dd.hBoldFont);
|
||||
break;
|
||||
|
|
|
@ -32,6 +32,14 @@
|
|||
#endif
|
||||
#define COUNTOF(a) (sizeof(a)/sizeof(a[0]))
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1200
|
||||
EXTERN_C IMAGE_DOS_HEADER __ImageBase;
|
||||
#define HINST_THISCOMPONENT ( (HINSTANCE) &__ImageBase )
|
||||
#define HINST_APPLICATION HINST_THISCOMPONENT
|
||||
#else
|
||||
#define HINST_APPLICATION ( (HINSTANCE) GetModuleHandle(NULL) )
|
||||
#endif
|
||||
|
||||
#define MRU_LIST_SIZE 5
|
||||
#define MRU_DISPLAY_LENGTH 40
|
||||
#define SYMSETNAME_MAXLEN 40
|
||||
|
|
|
@ -380,12 +380,12 @@ struct ScopedThreadDpiAwarenessContext { // Note: Assumes InitializeDpiApi() has
|
|||
int m_AC; // Canonical "active" DPI_AWARENESS_CONTEXT
|
||||
};
|
||||
|
||||
int ShowWndSpy(HWND hOwner)
|
||||
INT_PTR ShowWndSpy(HWND hOwner)
|
||||
{
|
||||
InitializeDpiApi();
|
||||
ScopedThreadDpiAwarenessContext::List aclist;
|
||||
ScopedThreadDpiAwarenessContext stdac(aclist << DPI::ac_pm2 << DPI::ac_system);
|
||||
DIALOGDATA dd;
|
||||
dd.DialogAwarenessContext = stdac.GetCanonicalActiveAwarenessContext();
|
||||
return DialogBoxParam(GetModuleHandle(NULL), MAKEINTRESOURCE(DLG_WNDSPY), hOwner, SpyDlgProc, (LPARAM) &dd);
|
||||
return DialogBoxParam(HINST_APPLICATION, MAKEINTRESOURCE(DLG_WNDSPY), hOwner, SpyDlgProc, (LPARAM) &dd);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue