[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
|
||||
_currentIndex = 0;
|
||||
|
||||
if (getCurrentBuffer()._unicodeMode != uni8Bit)
|
||||
execute(SCI_SETCODEPAGE, SC_CP_UTF8);
|
||||
|
||||
return _buffers[_currentIndex]._fullPathName;
|
||||
}
|
||||
|
||||
|
@ -109,12 +109,24 @@ void DockingCont::doDialog(bool willBeShown, bool isFloating)
|
||||
::ShowWindow(_hCaption, SW_SHOW);
|
||||
}
|
||||
|
||||
_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");
|
||||
//If you want to use titlebar metrics
|
||||
//NONCLIENTMETRICS ncm;
|
||||
//ncm.cbSize = sizeof(ncm);
|
||||
//if (SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, &ncm, 0)) {
|
||||
// ncm.lfCaptionFont.lfWeight = FW_NORMAL;
|
||||
// _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);
|
||||
|
@ -189,7 +189,7 @@ public :
|
||||
_rbBand.hwndChild = _pToolBar->getHSelf();
|
||||
int dwBtnSize = SendMessage(_pToolBar->getHSelf(), TB_GETBUTTONSIZE, 0,0);
|
||||
_rbBand.cyMinChild = HIWORD(dwBtnSize);
|
||||
::SendMessage(_hSelf, RB_INSERTBAND, (WPARAM)0, (LPARAM)&_rbBand);
|
||||
::SendMessage(_hSelf, RB_SETBANDINFO, (WPARAM)0, (LPARAM)&_rbBand);
|
||||
};
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user