Implemented DS_CENTER dialog style.
diff --git a/windows/dialog.c b/windows/dialog.c
index 49f42ce..d636937 100644
--- a/windows/dialog.c
+++ b/windows/dialog.c
@@ -622,8 +622,16 @@
}
else
{
- rect.left += template.x * xUnit / 4;
- rect.top += template.y * yUnit / 8;
+ if (template.style & DS_CENTER)
+ {
+ rect.left = (SYSMETRICS_CXSCREEN - rect.right) / 2;
+ rect.top = (SYSMETRICS_CYSCREEN - rect.bottom) / 2;
+ }
+ else
+ {
+ rect.left += template.x * xUnit / 4;
+ rect.top += template.y * yUnit / 8;
+ }
if ( !(template.style & WS_CHILD) )
{
INT16 dX, dY;