parent
b73721f0b4
commit
f821f73110
|
@ -302,7 +302,8 @@ void DocumentMap::doMove()
|
|||
{
|
||||
RECT rc;
|
||||
::GetClientRect (_hwndScintilla, & rc);
|
||||
::MapWindowPoints (_hwndScintilla, _pMapView->getHParent(), reinterpret_cast<POINT*>(& rc), 2);
|
||||
bool isChild = (::GetWindowLongPtr (_vzDlg.getHSelf(), GWL_STYLE) & WS_CHILD) != 0;
|
||||
::MapWindowPoints (_hwndScintilla, isChild ? _pMapView->getHParent() : HWND_DESKTOP, reinterpret_cast<POINT*>(& rc), 2);
|
||||
::MoveWindow(_vzDlg.getHSelf(), rc.left, rc.top, (rc.right - rc.left), (rc.bottom - rc.top), TRUE);
|
||||
}
|
||||
|
||||
|
@ -478,7 +479,10 @@ void ViewZoneDlg::drawPreviewZone(DRAWITEMSTRUCT *pdis)
|
|||
void ViewZoneDlg::doDialog()
|
||||
{
|
||||
if (!isCreated())
|
||||
create(IDD_VIEWZONE);
|
||||
{
|
||||
bool win10 = (NppParameters::getInstance()).getWinVersion() >= WV_WIN10;
|
||||
create(win10 ? IDD_VIEWZONE : IDD_VIEWZONE_CLASSIC);
|
||||
}
|
||||
display();
|
||||
};
|
||||
|
||||
|
|
|
@ -41,5 +41,12 @@ IDD_VIEWZONE DIALOGEX 26, 41, 200, 200
|
|||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
|
||||
FONT 8, "MS Sans Serif", 0, 0, 0x0
|
||||
BEGIN
|
||||
CONTROL "",IDC_VIEWZONECANVAS,"Static",SS_OWNERDRAW,0,0,50,14
|
||||
CONTROL "",IDC_VIEWZONECANVAS,"Static",SS_OWNERDRAW,0,0,50,14
|
||||
END
|
||||
|
||||
IDD_VIEWZONE_CLASSIC DIALOGEX 0, 0, 0, 0
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP
|
||||
FONT 8, "MS Sans Serif", 0, 0, 0x0
|
||||
BEGIN
|
||||
CONTROL "",IDC_VIEWZONECANVAS,"Static",SS_OWNERDRAW,0,0,50,14
|
||||
END
|
||||
|
|
|
@ -28,5 +28,6 @@
|
|||
#pragma once
|
||||
|
||||
#define IDD_DOCUMENTMAP 3300
|
||||
#define IDD_VIEWZONE 3320
|
||||
#define IDD_VIEWZONE_CLASSIC 3320
|
||||
#define IDD_VIEWZONE 3321
|
||||
#define IDC_VIEWZONECANVAS (IDD_VIEWZONE + 1)
|
||||
|
|
Loading…
Reference in New Issue