mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
TopWindow::NoCloseBox
git-svn-id: svn://ultimatepp.org/upp/trunk@1353 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
531b18675a
commit
4a3ee5449b
3 changed files with 6 additions and 3 deletions
|
|
@ -105,10 +105,11 @@ void TopWindow::SyncCaption0()
|
|||
if(frameless)
|
||||
style = (style & ~WS_CAPTION) | WS_POPUP;
|
||||
else
|
||||
if(IsNull(icon) && !maximizebox && !minimizebox) {
|
||||
if(IsNull(icon) && !maximizebox && !minimizebox || noclosebox) {
|
||||
style |= WS_POPUPWINDOW|WS_DLGFRAME;
|
||||
exstyle |= WS_EX_DLGMODALFRAME;
|
||||
style &= ~WS_SYSMENU;
|
||||
if(noclosebox)
|
||||
style &= ~WS_SYSMENU;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -504,7 +504,7 @@ TopWindow::TopWindow()
|
|||
class_hint = XAllocClassHint();
|
||||
topmost = false;
|
||||
#endif
|
||||
maximizebox = minimizebox = sizeable = tool = false;
|
||||
maximizebox = minimizebox = sizeable = tool = noclosebox = false;
|
||||
state = OVERLAPPED;
|
||||
WhenClose = THISBACK(Close);
|
||||
overlapped.Clear();
|
||||
|
|
|
|||
|
|
@ -116,6 +116,7 @@ private:
|
|||
WString title;
|
||||
bool minimizebox:1;
|
||||
bool maximizebox:1;
|
||||
bool noclosebox:1;
|
||||
bool sizeable:1;
|
||||
bool tool:1;
|
||||
bool frameless:1;
|
||||
|
|
@ -203,6 +204,7 @@ public:
|
|||
TopWindow& FrameLess(bool b = true) { frameless = b; return *this; }
|
||||
bool IsFrameLess() const { return frameless; }
|
||||
TopWindow& NoAccessKeysDistribution() { dokeys = false; return *this; }
|
||||
TopWindow& NoCloseBox(bool b = true) { noclosebox = b; return *this; }
|
||||
|
||||
TopWindow& Icon(const Image& m);
|
||||
TopWindow& LargeIcon(const Image& m);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue