Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to center a PropertySheet-Window?

48 views
Skip to first unread message

Andreas Schibilla

unread,
Aug 12, 1998, 3:00:00 AM8/12/98
to
Hallo everybody!
Does anybody know how I could center a Property-Sheet-Window. I used a
callback function for the main sheet-window and there I tried to use the
SetWindowsPos and MoveWindow functions in context with the message
WM_INITDIALOG but the Property-Sheet-Windows always starts at position 0,0!
Why? Must I use one of these function in every callback routine of each
Property-Page which is add to the main sheet or is it ok to do this only in
the main-sheet-function?
Thanks,
Andi.

Kimberly R. Greenlee

unread,
Aug 12, 1998, 3:00:00 AM8/12/98
to

Andreas Schibilla wrote in message <6qqo97$rht$1...@freeside.cls.net>...

I just call CenterWindow() in the property sheets OnInitDialog() method.

Kim Greenlee

Andreas Schibilla

unread,
Aug 12, 1998, 3:00:00 AM8/12/98
to
>
>I just call CenterWindow() in the property sheets OnInitDialog() method.
>
>Kim Greenlee

>
I don't know anything about the function CenterWindow(). Do you use MFC??? I
only use the Windows-API, so I think I must process the WM_INITDIALOG
message by my own. Do you know what the function CenterWindow() does?
Andi

Raymond Chen

unread,
Aug 13, 1998, 3:00:00 AM8/13/98
to
Remember that your WM_INITDIALOG talks about your page, not about
the sheet.

Use a PSPCB_PRECREATE callback and set the DS_CENTER dialog style
on the sheet.
--
(My return address is intentionally invalid; delete ".---" to get my real address.
My responses are not to be considered official technical support or advice.)

0 new messages