On Mon, Feb 20, 2012 at 4:07 PM, Oliver Sims
<oliver.s...@simsassociates.co.uk> wrote:

> Using ResEdit, I specified a dialog with a Minimize box and a Maximize box
> (the boxes at the right of the title bar).
>
> Looking at the .rc file, and after some experimentation, it appears that the
> Min Box was specified by dialog style WS_GROUP, and the max box by dialog
> style WS_TABSTOP.
>
> This seemed odd, so I looked up the MSDN resource, which said that the
> styles to use were WS_MINIMIZEBOX  and WS_MAXIMIZEBOX - which made more
> sense. So I edited the .rc file and changed WS_GROUP to WS_MINIMIZEBOX and
> WS_TABSTOP to WS_MAXIMIZEBOX. Then I ran ResEdit against the .rc file - and
> the min/max boxes were there OK.
>
> But would ooDialog be OK with such a change? So I changed the styles in the
> .rc file that one of my ooDialog programs uses - WS_GROUP to WS_MINIMIZEBOX
> (the dialog didn't have a maxbox). It worked fine.
>
> So I conclude that for Dialog styles in a .rc file, to get a min box I can
> use either style, and ditto for a maxbox.
>
> Is this a valid conclusion?

Oliver,

>From WinUser.h

#define WS_GROUP            0x00020000L
#define WS_TABSTOP          0x00010000L

#define WS_MINIMIZEBOX      0x00020000L
#define WS_MAXIMIZEBOX      0x00010000L

So, at the time the OS actually creates a dialog, the style flags are
a number.  The OS won't know if you specified WS_GROUP or
WS_MINIMIZEBOX, it will just see 0x00020000.

Now, for ooDialog, remember that ooDialog parses the .rc file (for a
RcDialgo) and creates the dialog template in memory.  It wouldn't have
surprised me if ooDialog did not parse both of them correctly, but
apparently it does.  If it didn't, we'd just add to the parser so it
got it correct.

If you were using a ResDialog, the resource compiler would have
already translate things into a number and it wouldn't make any
difference.

Also, a lot of stuff in Windows is a holdover from years ago.  This is
one of those things.  Probably in Windows 3.1 you specified WS_TABSTOP
and WS_GROUP for a dialog to get the min and max buttons.  Then when
things went to 32 bit and they added WS_MAXIMIZEBOX and WS_MINIMIZEBOX
they had to keep the numbers the same for backwards compatibility.

--
Mark Miesfeld

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Oorexx-users mailing list
Oorexx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-users

Reply via email to