WS_EX_DLGMODALFRAME alone does not mean title bar, you still have to
specify WS_CAPTION.
diff --git a/windows/nonclient.c b/windows/nonclient.c
index 0e41482..d7a2b95 100644
--- a/windows/nonclient.c
+++ b/windows/nonclient.c
@@ -98,8 +98,8 @@
{
if (!(style & WS_CHILD) && Options.managed &&
(((style & WS_CAPTION) == WS_CAPTION) ||
- (style & WS_THICKFRAME) ||
- (exStyle & WS_EX_DLGMODALFRAME))) return TRUE;
+ (style & WS_THICKFRAME)))
+ return TRUE;
return FALSE;
}
@@ -861,9 +861,7 @@
if (!PtInRect16( &rect, pt ))
{
/* Check system menu */
- if ((wndPtr->dwStyle & WS_SYSMENU) &&
- (((HICON) GetClassLongA(wndPtr->hwndSelf, GCL_HICONSM)) ||
- ((HICON) GetClassLongA(wndPtr->hwndSelf, GCL_HICON))))
+ if ((wndPtr->dwStyle & WS_SYSMENU) && (!(wndPtr->dwStyle & DS_MODALFRAME)))
rect.left += GetSystemMetrics(SM_CYCAPTION) - 1;
if (pt.x < rect.left) return HTSYSMENU;
@@ -1061,6 +1059,12 @@
hIcon = (HICON) GetClassLongA(wndPtr->hwndSelf, GCL_HICONSM);
if(!hIcon) hIcon = (HICON) GetClassLongA(wndPtr->hwndSelf, GCL_HICON);
+ /* If there is no hIcon specified or this is not a modal dialog, */
+ /* get the default one. */
+ if(hIcon == 0)
+ if (!(wndPtr->dwStyle & DS_MODALFRAME))
+ hIcon = LoadImageA(0, MAKEINTRESOURCEA(OIC_WINEICON), IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR);
+
if (hIcon)
DrawIconEx (hdc, rect.left + 2, rect.top + 2, hIcon,
GetSystemMetrics(SM_CXSMICON),