Added resize gripper....finally.
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1060 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
07b87eb653
commit
898e6bb120
3 changed files with 20 additions and 4 deletions
|
@ -153,6 +153,7 @@ Version History
|
||||||
- Bunch of other stuff not worth mentioning
|
- Bunch of other stuff not worth mentioning
|
||||||
- Added some simple tool tips
|
- Added some simple tool tips
|
||||||
- Added Context Menu in log window
|
- Added Context Menu in log window
|
||||||
|
- Added resize gripper
|
||||||
|
|
||||||
|
|
||||||
Copyright Information
|
Copyright Information
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include "noclib.h"
|
#include "noclib.h"
|
||||||
|
|
||||||
static RECT resizeRect;
|
static RECT resizeRect;
|
||||||
|
static RECT g_griprect;
|
||||||
static int dx;
|
static int dx;
|
||||||
static int dy;
|
static int dy;
|
||||||
|
|
||||||
|
@ -91,6 +92,17 @@ BOOL CALLBACK DialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
|
||||||
CompileNSISScript();
|
CompileNSISScript();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
case WM_PAINT:
|
||||||
|
{
|
||||||
|
PAINTSTRUCT ps;
|
||||||
|
GetClientRect(g_hwnd, &g_griprect);
|
||||||
|
HDC hdc = BeginPaint(g_hwnd, &ps);
|
||||||
|
g_griprect.left = g_griprect.right - GetSystemMetrics(SM_CXVSCROLL);
|
||||||
|
g_griprect.top = g_griprect.bottom - GetSystemMetrics(SM_CYVSCROLL);
|
||||||
|
DrawFrameControl(hdc, &g_griprect, DFC_SCROLL, DFCS_SCROLLSIZEGRIP);
|
||||||
|
EndPaint(g_hwnd,&ps);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
case WM_DESTROY:
|
case WM_DESTROY:
|
||||||
{
|
{
|
||||||
SaveWindowPos(g_hwnd);
|
SaveWindowPos(g_hwnd);
|
||||||
|
@ -158,12 +170,15 @@ BOOL CALLBACK DialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
|
||||||
RECT rSize;
|
RECT rSize;
|
||||||
if (hwndDlg == g_hwnd) {
|
if (hwndDlg == g_hwnd) {
|
||||||
GetClientRect(g_hwnd, &rSize);
|
GetClientRect(g_hwnd, &rSize);
|
||||||
if (((rSize.right==0)&&(rSize.bottom==0))||((resizeRect.right==0)&&(resizeRect.bottom==0)))
|
if (((rSize.right==0)&&(rSize.bottom==0))||((resizeRect.right==0)&&(resizeRect.bottom==0))) return TRUE;
|
||||||
return TRUE;
|
|
||||||
dx = rSize.right - resizeRect.right;
|
dx = rSize.right - resizeRect.right;
|
||||||
dy = rSize.bottom - resizeRect.bottom;
|
dy = rSize.bottom - resizeRect.bottom;
|
||||||
EnumChildWindows(g_hwnd, DialogResize, (LPARAM)0);
|
EnumChildWindows(g_hwnd, DialogResize, (LPARAM)0);
|
||||||
resizeRect = rSize;
|
resizeRect = rSize;
|
||||||
|
GetClientRect(g_hwnd, &g_griprect);
|
||||||
|
g_griprect.left = g_griprect.right - GetSystemMetrics(SM_CXVSCROLL);
|
||||||
|
g_griprect.top = g_griprect.bottom - GetSystemMetrics(SM_CYVSCROLL);
|
||||||
|
InvalidateRect(g_hwnd,&g_griprect,TRUE);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,8 +141,8 @@ BEGIN
|
||||||
WS_VSCROLL,7,4,345,186
|
WS_VSCROLL,7,4,345,186
|
||||||
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,7,202,346,1
|
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,7,202,346,1
|
||||||
LTEXT "",IDC_VERSION,7,212,200,12,WS_DISABLED
|
LTEXT "",IDC_VERSION,7,212,200,12,WS_DISABLED
|
||||||
DEFPUSHBUTTON "Clo&se",IDC_CLOSE,303,208,49,15
|
DEFPUSHBUTTON "Clo&se",IDC_CLOSE,301,208,49,15
|
||||||
PUSHBUTTON "&Test",IDC_TEST,247,208,50,15,WS_DISABLED
|
PUSHBUTTON "&Test",IDC_TEST,245,208,50,15,WS_DISABLED
|
||||||
END
|
END
|
||||||
|
|
||||||
DLG_ABOUT DIALOG DISCARDABLE 0, 0, 235, 86
|
DLG_ABOUT DIALOG DISCARDABLE 0, 0, 235, 86
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue