Disallow STARTF_USESHOWWINDOW+SW_MAXIMIZE
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7289 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
c28ef6a08b
commit
a2641b17d8
9 changed files with 39 additions and 4 deletions
|
@ -343,6 +343,10 @@ INT_PTR CALLBACK DialogProc(HWND hDlg, UINT Msg, WPARAM wp, LPARAM lp)
|
|||
HWND hCtl, hCtl2;
|
||||
switch(Msg)
|
||||
{
|
||||
case WM_SIZE:
|
||||
if (wp == SIZE_MAXIMIZED) ShowWindow(hDlg, SW_SHOWNOACTIVATE); // Disallow STARTF_USESHOWWINDOW+SW_MAXIMIZE
|
||||
break;
|
||||
|
||||
case WM_COMMAND:
|
||||
switch(wp)
|
||||
{
|
||||
|
|
|
@ -179,6 +179,9 @@ static INT_PTR CALLBACK LookupDlgProc(HWND hDlg, UINT Msg, WPARAM WParam, LPARAM
|
|||
|
||||
switch(Msg)
|
||||
{
|
||||
case WM_SIZE:
|
||||
if (WParam == SIZE_MAXIMIZED) ShowWindow(hDlg, SW_SHOWNOACTIVATE); // Disallow STARTF_USESHOWWINDOW+SW_MAXIMIZE
|
||||
break;
|
||||
case WM_INITDIALOG:
|
||||
DIALOGDATA::Set(hDlg, (pDD = (DIALOGDATA*) LParam));
|
||||
CenterOnParent(hDlg);
|
||||
|
|
|
@ -288,6 +288,9 @@ static INT_PTR CALLBACK SpyDlgProc(HWND hDlg, UINT Msg, WPARAM WParam, LPARAM LP
|
|||
DIALOGDATA*pDD = DIALOGDATA::Get(hDlg);
|
||||
switch(Msg)
|
||||
{
|
||||
case WM_SIZE:
|
||||
if (WParam == SIZE_MAXIMIZED) ShowWindow(hDlg, SW_SHOWNOACTIVATE); // Disallow STARTF_USESHOWWINDOW+SW_MAXIMIZE
|
||||
break;
|
||||
case WM_INITDIALOG:
|
||||
DIALOGDATA::Set(hDlg, (pDD = (DIALOGDATA*) LParam));
|
||||
CenterOnParent(hDlg);
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
#define PAT_GUID 5
|
||||
#define PAT_CALLBACK 6
|
||||
#define PAT_REGMEM 7
|
||||
#ifdef _UNICODE
|
||||
#ifdef _UNICODE
|
||||
#define PAT_TSTRING PAT_WSTRING
|
||||
#else
|
||||
#define PAT_TSTRING PAT_STRING
|
||||
|
|
|
@ -272,7 +272,7 @@
|
|||
!define /ifndef WS_CLIPSIBLINGS 0x04000000
|
||||
!define /ifndef WS_CLIPCHILDREN 0x02000000
|
||||
!define /ifndef WS_MAXIMIZE 0x01000000
|
||||
!define /ifndef WS_CAPTION 0x00C00000
|
||||
!define /ifndef WS_CAPTION 0x00C00000
|
||||
!define /ifndef WS_BORDER 0x00800000
|
||||
!define /ifndef WS_DLGFRAME 0x00400000
|
||||
!define /ifndef WS_VSCROLL 0x00200000
|
||||
|
|
|
@ -39,9 +39,12 @@ Header file for creating custom installer pages with nsDialogs
|
|||
!define /ifndef WS_CLIPSIBLINGS 0x04000000
|
||||
!define /ifndef WS_CLIPCHILDREN 0x02000000
|
||||
!define /ifndef WS_MAXIMIZE 0x01000000
|
||||
!define /ifndef WS_BORDER 0x00800000
|
||||
!define /ifndef WS_VSCROLL 0x00200000
|
||||
!define /ifndef WS_HSCROLL 0x00100000
|
||||
!define /ifndef WS_GROUP 0x00020000
|
||||
!define /ifndef WS_MINIMIZEBOX 0x00020000
|
||||
!define /ifndef WS_MAXIMIZEBOX 0x00010000
|
||||
!define /ifndef WS_TABSTOP 0x00010000
|
||||
|
||||
!define ES_LEFT 0x00000000
|
||||
|
|
|
@ -633,6 +633,9 @@ INT_PTR CALLBACK DlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
static HFONT hFont=0;
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_SIZE:
|
||||
if (wParam == SIZE_MAXIMIZED) ShowWindow(hwndDlg, SW_SHOWNOACTIVATE); // Disallow STARTF_USESHOWWINDOW+SW_MAXIMIZE
|
||||
break;
|
||||
case WM_INITDIALOG:
|
||||
g_hwnd=hwndDlg;
|
||||
CheckDlgButton(hwndDlg,IDC_LZMA,BST_CHECKED);
|
||||
|
|
|
@ -1,5 +1,19 @@
|
|||
\A{history} Changelog and Release Notes
|
||||
|
||||
\H{v3.08} 3.08
|
||||
|
||||
Released on ???? ??th, 20??
|
||||
|
||||
\S1{v3.08-rl} Release Notes
|
||||
|
||||
????????
|
||||
|
||||
\S1{v3.08-cl} Changelog
|
||||
|
||||
\S2{} Minor Changes
|
||||
|
||||
\b Disallow start maximized mode
|
||||
|
||||
\H{v3.07} 3.07
|
||||
|
||||
Released on July 24th, 2021
|
||||
|
|
|
@ -672,9 +672,14 @@ skipPage:
|
|||
}
|
||||
if (uMsg == WM_SIZE) {
|
||||
ShowWindow(m_bgwnd, wParam == SIZE_MINIMIZED ? SW_HIDE : SW_SHOW);
|
||||
#else //! NSIS_SUPPORT_BGBG
|
||||
if (uMsg == WM_SIZE) {
|
||||
#endif //~ NSIS_SUPPORT_BGBG
|
||||
if (wParam == SIZE_MAXIMIZED) {
|
||||
DWORD style = (DWORD) GetWindowLongPtr(hwndDlg, GWL_STYLE), mask = WS_MAXIMIZEBOX|WS_MAXIMIZE|WS_MINIMIZE;
|
||||
if ((style & mask) == WS_MAXIMIZE) ShowWindow(hwndDlg, SW_SHOWNOACTIVATE); // Disallow STARTF_USESHOWWINDOW+SW_MAXIMIZE unless someone does ${NSD_AddStyle} $hWndParent ${WS_MAXIMIZEBOX}
|
||||
}
|
||||
}
|
||||
#endif //NSIS_SUPPORT_BGBG
|
||||
|
||||
if (uMsg == WM_NOTIFY_CUSTOM_READY) {
|
||||
DestroyWindow(m_curwnd);
|
||||
m_curwnd = (HWND)wParam;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue