mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-26 15:24:35 +02:00
[BUG_FIXED] Fix Document Map Docking dialog dropped/switching/close problems.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@861 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
76c1a650c5
commit
7c23050155
@ -272,7 +272,7 @@ bool Notepad_plus::doSave(BufferID id, const TCHAR * filename, bool isCopy)
|
|||||||
if (!res)
|
if (!res)
|
||||||
_nativeLangSpeaker.messageBox("FileLockedWarning",
|
_nativeLangSpeaker.messageBox("FileLockedWarning",
|
||||||
_pPublicInterface->getHSelf(),
|
_pPublicInterface->getHSelf(),
|
||||||
TEXT("Please check whether if this file is opened in another program"),
|
TEXT("Please check if this file is opened in another program."),
|
||||||
TEXT("Save failed"),
|
TEXT("Save failed"),
|
||||||
MB_OK);
|
MB_OK);
|
||||||
return res;
|
return res;
|
||||||
|
@ -1100,6 +1100,7 @@ void DockingCont::onSize()
|
|||||||
::SetWindowPos(((tTbData*)tcItem.lParam)->hClient, NULL,
|
::SetWindowPos(((tTbData*)tcItem.lParam)->hClient, NULL,
|
||||||
0, 0, rcTemp.right, rcTemp.bottom,
|
0, 0, rcTemp.right, rcTemp.bottom,
|
||||||
SWP_NOZORDER);
|
SWP_NOZORDER);
|
||||||
|
::SendMessage(((tTbData*)tcItem.lParam)->hClient, WM_SIZE, 0, MAKELONG(rcTemp.right, rcTemp.bottom));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1291,6 +1292,13 @@ void DockingCont::SelectTab(int iTab)
|
|||||||
::ShowWindow(((tTbData*)tcItem.lParam)->hClient, SW_SHOW);
|
::ShowWindow(((tTbData*)tcItem.lParam)->hClient, SW_SHOW);
|
||||||
::SetFocus(((tTbData*)tcItem.lParam)->hClient);
|
::SetFocus(((tTbData*)tcItem.lParam)->hClient);
|
||||||
|
|
||||||
|
// Notify switch in
|
||||||
|
NMHDR nmhdr;
|
||||||
|
nmhdr.code = DMN_SWITCHIN;
|
||||||
|
nmhdr.hwndFrom = _hSelf;
|
||||||
|
nmhdr.idFrom = 0;
|
||||||
|
::SendMessage(((tTbData*)tcItem.lParam)->hClient, WM_NOTIFY, nmhdr.idFrom, (LPARAM)&nmhdr);
|
||||||
|
|
||||||
if ((unsigned int)iTab != _prevItem)
|
if ((unsigned int)iTab != _prevItem)
|
||||||
{
|
{
|
||||||
// hide previous dialog
|
// hide previous dialog
|
||||||
@ -1299,6 +1307,13 @@ void DockingCont::SelectTab(int iTab)
|
|||||||
if (!tcItem.lParam)
|
if (!tcItem.lParam)
|
||||||
return;
|
return;
|
||||||
::ShowWindow(((tTbData*)tcItem.lParam)->hClient, SW_HIDE);
|
::ShowWindow(((tTbData*)tcItem.lParam)->hClient, SW_HIDE);
|
||||||
|
|
||||||
|
// Notify switch off
|
||||||
|
NMHDR nmhdr;
|
||||||
|
nmhdr.code = DMN_SWITCHOFF;
|
||||||
|
nmhdr.hwndFrom = _hSelf;
|
||||||
|
nmhdr.idFrom = 0;
|
||||||
|
::SendMessage(((tTbData*)tcItem.lParam)->hClient, WM_NOTIFY, nmhdr.idFrom, (LPARAM)&nmhdr);
|
||||||
}
|
}
|
||||||
|
|
||||||
// resize tab item
|
// resize tab item
|
||||||
|
@ -57,7 +57,11 @@
|
|||||||
//nmhdr.hwndFrom = hwndNpp;
|
//nmhdr.hwndFrom = hwndNpp;
|
||||||
//nmhdr.idFrom = ctrlIdNpp;
|
//nmhdr.idFrom = ctrlIdNpp;
|
||||||
|
|
||||||
|
#define DMN_SWITCHIN (DMN_FIRST + 4)
|
||||||
|
#define DMN_SWITCHOFF (DMN_FIRST + 5)
|
||||||
|
//nmhdr.code = DWORD(DMN_XXX, 0);
|
||||||
|
//nmhdr.hwndFrom = DockingCont::_hself;
|
||||||
|
//nmhdr.idFrom = 0;
|
||||||
|
|
||||||
#endif //DOCKING_RESOURCE_H
|
#endif //DOCKING_RESOURCE_H
|
||||||
|
|
||||||
|
@ -161,6 +161,24 @@ BOOL CALLBACK DocumentMap::run_dlgProc(UINT message, WPARAM wParam, LPARAM lPara
|
|||||||
{
|
{
|
||||||
switch (((LPNMHDR)lParam)->code)
|
switch (((LPNMHDR)lParam)->code)
|
||||||
{
|
{
|
||||||
|
case DMN_CLOSE:
|
||||||
|
{
|
||||||
|
_vzDlg.display(false);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
case DMN_SWITCHIN:
|
||||||
|
{
|
||||||
|
_vzDlg.display();
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
case DMN_SWITCHOFF:
|
||||||
|
{
|
||||||
|
_vzDlg.display(false);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
case NM_DBLCLK:
|
case NM_DBLCLK:
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -91,6 +91,7 @@ public:
|
|||||||
|
|
||||||
virtual void display(bool toShow = true) const {
|
virtual void display(bool toShow = true) const {
|
||||||
DockingDlgInterface::display(toShow);
|
DockingDlgInterface::display(toShow);
|
||||||
|
_vzDlg.display();
|
||||||
};
|
};
|
||||||
|
|
||||||
void setParent(HWND parent2set){
|
void setParent(HWND parent2set){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user