Added additional border style for dialogs

This commit is contained in:
rods%netscape.com 1998-11-02 16:58:55 +00:00
Родитель f817c58313
Коммит 42462ddadd
2 изменённых файлов: 14 добавлений и 8 удалений

Просмотреть файл

@ -95,7 +95,9 @@ enum nsBorderStyle {
///no border
eBorderStyle_none,
///dialog box border + title area
eBorderStyle_dialog
eBorderStyle_dialog,
///window border
eBorderStyle_window
};
/**
@ -132,12 +134,14 @@ enum nsCursor { ///(normal cursor, usually rendered as an arrow)
struct nsWidgetInitData {
nsWidgetInitData()
: clipChildren(PR_FALSE)
: clipChildren(PR_FALSE),
mBorderStyle(eBorderStyle_window)
{
}
// when painting exclude area occupied by child windows
PRPackedBool clipChildren;
nsBorderStyle mBorderStyle;
};
/**

Просмотреть файл

@ -483,17 +483,19 @@ nsresult nsWindow::StandardWindowCreate(nsIWidget *aParent,
}
HWND parent;
if (nsnull != aParent) {
// has a nsIWidget parent
if (nsnull != aParent) { // has a nsIWidget parent
parent = ((aParent) ? (HWND)aParent->GetNativeData(NS_NATIVE_WINDOW) : nsnull);
aParent->AddChild(this);
}
else {
// has a nsNative parent
} else { // has a nsNative parent
parent = (HWND)aNativeParent;
}
mWnd = ::CreateWindowEx(WindowExStyle(),
DWORD extendedStyle = WindowExStyle();
if (nsnull != aInitData && aInitData->mBorderStyle == eBorderStyle_dialog) {
extendedStyle = 0;
}
mWnd = ::CreateWindowEx(extendedStyle,
WindowClass(),
"",
style,