mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-23 22:04:55 +02:00
parent
b73721f0b4
commit
f821f73110
@ -302,7 +302,8 @@ void DocumentMap::doMove()
|
|||||||
{
|
{
|
||||||
RECT rc;
|
RECT rc;
|
||||||
::GetClientRect (_hwndScintilla, & 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);
|
::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()
|
void ViewZoneDlg::doDialog()
|
||||||
{
|
{
|
||||||
if (!isCreated())
|
if (!isCreated())
|
||||||
create(IDD_VIEWZONE);
|
{
|
||||||
|
bool win10 = (NppParameters::getInstance()).getWinVersion() >= WV_WIN10;
|
||||||
|
create(win10 ? IDD_VIEWZONE : IDD_VIEWZONE_CLASSIC);
|
||||||
|
}
|
||||||
display();
|
display();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -41,5 +41,12 @@ IDD_VIEWZONE DIALOGEX 26, 41, 200, 200
|
|||||||
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
|
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
|
||||||
FONT 8, "MS Sans Serif", 0, 0, 0x0
|
FONT 8, "MS Sans Serif", 0, 0, 0x0
|
||||||
BEGIN
|
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
|
END
|
||||||
|
@ -28,5 +28,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define IDD_DOCUMENTMAP 3300
|
#define IDD_DOCUMENTMAP 3300
|
||||||
#define IDD_VIEWZONE 3320
|
#define IDD_VIEWZONE_CLASSIC 3320
|
||||||
|
#define IDD_VIEWZONE 3321
|
||||||
#define IDC_VIEWZONECANVAS (IDD_VIEWZONE + 1)
|
#define IDC_VIEWZONECANVAS (IDD_VIEWZONE + 1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user