[Issue 21655] win32 dialog app, main dialog box is not centered

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Mar 1 04:38:15 UTC 2021


https://issues.dlang.org/show_bug.cgi?id=21655

--- Comment #2 from Tao <top398 at 139.com> ---
Of course I have.

dlg.rc:

#include <windows.h>
#include <commctrl.h>
#include <richedit.h>
#include "resource.h"

LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
IDD_DIALOG1 DIALOG 0, 0, 186, 95
STYLE DS_3DLOOK | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_CAPTION |
WS_VISIBLE | WS_POPUP | WS_SYSMENU
CAPTION "Dialog"
FONT 8, "Ms Shell Dlg"
{
    PUSHBUTTON      "Cancel", IDCANCEL, 129, 24, 50, 14, 0, WS_EX_LEFT
    DEFPUSHBUTTON   "OK", IDOK, 129, 7, 50, 14, 0, WS_EX_LEFT
}

----------

resource.h:

#ifndef IDC_STATIC
#define IDC_STATIC (-1)
#endif

#define IDD_DIALOG1                             100

----------

Resource is compiled with vc2010's rc.exe.
dlg.d is compiled with "dmd dlg.d dlg.res"

--


More information about the Digitalmars-d-bugs mailing list