[BUG_FIXED] Fix the bug that the first new document is set as "New Document setting".
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@152 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
79db2731cc
commit
a03ca89d0b
@ -860,6 +860,9 @@ char * ScintillaEditView::attatchDefaultDoc(int nb)
|
|||||||
// set current index to 0
|
// set current index to 0
|
||||||
_currentIndex = 0;
|
_currentIndex = 0;
|
||||||
|
|
||||||
|
if (getCurrentBuffer()._unicodeMode != uni8Bit)
|
||||||
|
execute(SCI_SETCODEPAGE, SC_CP_UTF8);
|
||||||
|
|
||||||
return _buffers[_currentIndex]._fullPathName;
|
return _buffers[_currentIndex]._fullPathName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,12 +109,24 @@ void DockingCont::doDialog(bool willBeShown, bool isFloating)
|
|||||||
::ShowWindow(_hCaption, SW_SHOW);
|
::ShowWindow(_hCaption, SW_SHOW);
|
||||||
}
|
}
|
||||||
|
|
||||||
_hFont = ::CreateFont(14, 0, 0, 0,
|
//If you want to use titlebar metrics
|
||||||
FW_NORMAL, FALSE, FALSE, FALSE,
|
//NONCLIENTMETRICS ncm;
|
||||||
ANSI_CHARSET, OUT_DEFAULT_PRECIS,
|
//ncm.cbSize = sizeof(ncm);
|
||||||
CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY,
|
//if (SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, &ncm, 0)) {
|
||||||
DEFAULT_PITCH | FF_ROMAN,
|
// ncm.lfCaptionFont.lfWeight = FW_NORMAL;
|
||||||
"MS Shell Dlg");
|
// _hFont = ::CreateFontIndirect(&ncm.lfCaptionFont);
|
||||||
|
//}
|
||||||
|
|
||||||
|
//If you want defualt GUI font
|
||||||
|
_hFont = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
|
||||||
|
|
||||||
|
//If you want MS Shell Dlg
|
||||||
|
//_hFont = ::CreateFont(14, 0, 0, 0,
|
||||||
|
// FW_NORMAL, FALSE, FALSE, FALSE,
|
||||||
|
// ANSI_CHARSET, OUT_DEFAULT_PRECIS,
|
||||||
|
// CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY,
|
||||||
|
// DEFAULT_PITCH | FF_ROMAN,
|
||||||
|
// "MS Shell Dlg");
|
||||||
}
|
}
|
||||||
|
|
||||||
display(willBeShown);
|
display(willBeShown);
|
||||||
|
@ -189,7 +189,7 @@ public :
|
|||||||
_rbBand.hwndChild = _pToolBar->getHSelf();
|
_rbBand.hwndChild = _pToolBar->getHSelf();
|
||||||
int dwBtnSize = SendMessage(_pToolBar->getHSelf(), TB_GETBUTTONSIZE, 0,0);
|
int dwBtnSize = SendMessage(_pToolBar->getHSelf(), TB_GETBUTTONSIZE, 0,0);
|
||||||
_rbBand.cyMinChild = HIWORD(dwBtnSize);
|
_rbBand.cyMinChild = HIWORD(dwBtnSize);
|
||||||
::SendMessage(_hSelf, RB_INSERTBAND, (WPARAM)0, (LPARAM)&_rbBand);
|
::SendMessage(_hSelf, RB_SETBANDINFO, (WPARAM)0, (LPARAM)&_rbBand);
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user