Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Seperate Forms 1

Status
Not open for further replies.

XerxesTheMighty

Programmer
Jun 15, 2003
72
0
0
US
How would I make two seperate 'forms' on the same window?
For example:

I have four radio buttons. It switches between all four them (see below):
*0 blah, blah,......¯|
0 blah, blah,...... |switches between these four
0 blah, blah,...... |
0 blah, blah,......_|

But I want two of them to be seperate from the others. Like below:

*0 blah, blah,...... ¯|
0 blah, blah,...... _| Switch between these two.


*0 blah, blah,...... ¯|
0 blah, blah,...... _| Switch between these two seperately.

*=filled radio button

How would you accomplish this task?





Apocalyptic Programmer
 
Remove the Option Buttons.
Insert 2 frames.
Insert 2 option buttons in each frame. Draw them directly in the frame, don't drop them on the form and drag into the frame!


________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
Radio buttons can be grouped using the WS_GROUP style

-pete
 
WS_GROUP screws it up. What is a frame and how do you code it? I don't use gui/visual. I do all code. FAQ222-2244 doesn't exist any more or the link is broken.

Apocalyptic Programmer
 
The FAQ link worked fine for me.

If you don't use gui/visual, then what method are you using to build your interface screens? Perhaps if you posted your code which creates the instance of a radio button, we can provide some help in how to group the buttons together.

As suggested by johnwm a frame is one control that can be used to accomplish such grouping. Once we know how your creating your controls, we might be able to help you code for a frame.


Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Oh... are you developing in VB? If so i should be the last person to be helping [lol]

Also about the FAQ link, if you tried to open in a new window that does not work, just click it and it will work.

Good luck

-pete
 
HWND radio1 = CreateWindow("Button", "This is a radio button", WS_CHILD | WS_VISIBLE | BS_AUTORADIO, 1,2,3,4,hwnd,NULL,hInstance,NULL);

HWND radio2 = CreateWindow("Button", "This is a radio button", WS_CHILD | WS_VISIBLE | BS_AUTORADIO, 1,2,3,4,hwnd,NULL,hInstance,NULL);

HWND radio3 = CreateWindow("Button", "This is a radio button", WS_CHILD | WS_VISIBLE | BS_AUTORADIO, 1,2,3,4,hwnd,NULL,hInstance,NULL);

HWND radio4 = CreateWindow("Button", "This is a radio button", WS_CHILD | WS_VISIBLE | BS_AUTORADIO, 1,2,3,4,hwnd,NULL,hInstance,NULL);





Apocalyptic Programmer
 
Use the same CreateWindow API, but use "Frame" as the Class Type. Also, change the Parent Window parameter for the radio button to be the associated frame. All of the Radio Buttons that are to be grouped together should have the same parent window, ie - the same frame. Each frame would then represent the grouping of radio buttons.

Hope this helps.

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top