Jump to content

WS_GROUP-question


 Share

Recommended Posts

:D

Hi,

only one question: why it was so important to hardcode the "ws_group"-style for gui-creation?

I mean that:

HWND CGuiBox::CreateGUI(const char *Caption, int X, int Y, int W, int H, int Style, int Exstyle)
{
   HWND A;
   RECT rect;

   if ( Style==-1 )
       Style = WS_MINIMIZEBOX|WS_GROUP|WS_CAPTION|WS_POPUP|WS_SYSMENU;
   Style |= WS_GROUP | WS_CLIPSIBLINGS;
...

Does someone know that?

I can't find informationen about that thing anymore...

So, in the "GUI"-section someone (and maybe more) has a problem with that:

How can I create a gui with only a closing-button?...hmmm....I don't know at the moment...

Thanks and regards Holger :):huh2:

Edited by Holger
Link to comment
Share on other sites

  • Administrators

I'm going to add a GuiSetGroup command to sort out a lot of the problems here. Everythig should have WS_GROUP and TABSTOP but when you have a "group" of radio/checkboxes you have to do it differently: The FIRST radio box should have WS_GROUP and TABSTOP but the rest should NOT so that TABing works properly.

I was thinking of having all the controls by default us eGROUP/TABSTOP (as they do now) but when you issue a "GuiSetGroup(1)" command the defaults are changed until you issue a "GuiSetGroup(0)" so that tabbing works properly with minimum fuss.

Edited by Jon
Link to comment
Share on other sites

  • 2 weeks later...

Hmmm... and why WS_Group is used in the CreateGUI-function? :D

So if you use only the line:

Style |= WS_CLIPSIBLINGS;

instead of:

Style |= WS_GROUP | WS_CLIPSIBLINGS;

Then we are able to create for instance GUIBoxes with only a closing button like "About-Boxes" in many programs:

Global $DS_MODALFRAME = 0x80
Global $WS_POPUP = 0x80000000
Global $WS_VISIBLE = 0x10000000
Global $WS_CAPTION = 0x00C00000
Global $WS_SYSMENU = 0x00080000

GUICreate("Test",-1,-1,-1,-1,$DS_MODALFRAME + $WS_POPUP + $WS_CAPTION + $WS_SYSMENU)
GUIWaitClose()

Confusing...I don't understand the reason why WS_Group have to be at GUICreate...or is that (what I maybe think) to leave this attribute from the main-object (the GUI) to the child-objects?

Edited by Holger
Link to comment
Share on other sites

  • Administrators

I just created a dialog in VC and clicked every style box and this is the list of valid ones. Unless someone knows otherwise I guess the WS_GROUP in the GuiCreate is a mistake:

Default VC dialog has: DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU

All options:

STYLE

DS_ABSALIGN

DS_SYSMODAL

DS_LOCALEDIT

DS_MODALFRAME

DS_NOIDLEMSG

DS_SETFOREGROUND

DS_3DLOOK

DS_NOFAILCREATE

DS_CONTROL

DS_CENTER

DS_CENTERMOUSE

DS_CONTEXTHELP

WS_MINIMIZEBOX

WS_MAXIMIZEBOX

WS_POPUP

WS_VISIBLE

WS_DISABLED

WS_CLIPSIBLINGS

WS_CLIPCHILDREN

WS_CAPTION

WS_VSCROLL

WS_HSCROLL

WS_SYSMENU

EXSTYLE

WS_EX_NOPARENTNOTIFY

WS_EX_ACCEPTFILES

WS_EX_TRANSPARENT

WS_EX_TOOLWINDOW

WS_EX_CLIENTEDGE

WS_EX_CONTEXTHELP

WS_EX_RIGHT

WS_EX_RTLREADING

WS_EX_LEFTSCROLLBAR

WS_EX_CONTROLPARENT

WS_EX_STATICEDGE

WS_EX_LAYOUT_RTL

WS_EX_NOINHERIT_LAYOUT

Edited by Jon
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...