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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

list of controls 1

Status
Not open for further replies.

BeerFizz

Technical User
Jan 23, 2004
28
0
0
H,

I finally got my "owner draw" control to work... somewhat. I need to do some grouping stuff, a bit like a radio button.

How do I get a hold of the (linked list?) list of controls in a dialog box, so I can scan backwards and forwards for the beginning and end of the group?

thanks again in adavance
Phil
 
grouping is a bit weird

Go to the dialog
Press ctrl-d
A bunch of numbers will appear for tab order
The first control you want in the group gets the group flag
The control AFTER the last control in the group gets a group flag
The order of first and last is based on tab order.

You can reorder the tab order by clicking

To programattically get the tab order is something I have not done but I would not doubt that a method exists.

Matt
 
Thanks Zyrenthian,

I appreciate that response. Actually, after much screwing around with the grouping mechanism, I finally found a little note (a one liner) burried deep somewhere in the SDK which expalined why I was having a difficult time.

You are quite right about the group flag at the beginning and at the end of the group, however, the members of the group are only those that were created in a consecutive order. What this really means is that there is a linked list of controls, a group flag marks the beginning and the end and and those between ON THE LIST are in the group. For example, if you created a group of controls and later after creating a number of other controls, you decide to insert a contol into (what you beleive is the middle of) the original group, it actually would not belong to that group. Confused yet? :) I am not sure how the tab order comes into play.

What I need, if anyone out there knows, is a techinque for transversing that lsit, so I can find who is in the group and who isn't myself, in my owner draw control. I would simply a radio button, but they don't appear to have ownerdraw.

Thanks everybody for your help
Phil
 
Must the control itself know that? Couldnt you have a list in the dlg keeping track of the group membership? You could then shuffle membership about at will with affecting the controls themselves.

Not sure my reply makes sense :) never used a linked list of controls, so...

/Per
[sub]
"It was a work of art, flawless, sublime. A triumph equaled only by its monumental failure."[/sub]
 
Thanks PurfNurt,

it does make sense.

If I can't find out how to acces the list, then I can pass over my own list of controls which belong to a specific group, but that, I think, would be a little clumsey. That might be what I have to do... :-(

Anyother ideas?
 
Try these... in the parent window call

GetNextDlgGroupItem
GetNextDlgTabItem

Matt
 
>If I can't find out how to acces the list

This I don't really understand. What list are you talking about? What/where/how is the list defined?
I thought your program makes a list of controls, ie getting access to the list would be obvious.

We're talking about VC6, right? I have no clue about VC.Net stuff...

/Per
[sub]
"It was a work of art, flawless, sublime. A triumph equaled only by its monumental failure."[/sub]
 
Thanks Zyre,

that might work.

Phil
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top