Control ID's 
Author Message
 Control ID's

In the past, applications I have created with VC have called various
dialog boxes, which were 'drawn' using the VC resource editor.
I now wish to create a control within a dialog box which I create with
the normal constructor/create functions. Not drawn in the editor. No
problem.
Except. I'm having trouble handling control messages. When a control is
drawn using the editor, its ID appears in ClassWizard and this allows
you to handle any messages.
How the hell do I do this now?
Interestingly, I can get around it by first creating the control via the
create function, carefully noting an ID name. Then create the same kind
of control using the editor, specifying the same name. Then deleting the
drawn control. This works. But I can't imagine it's supposed to.
Any help greatly appreciated.
Thanks  


Thu, 05 Dec 2002 03:00:00 GMT  
 Control ID's

Quote:
>Interestingly, I can get around it by first creating the control via the
>create function, carefully noting an ID name.

The Create methods let you specify the ID value directly, so you
shouldn't need to "note" the ID. You just have to avoid clashes with
other control on your dialog.

Quote:
> Then create the same kind
>of control using the editor, specifying the same name. Then deleting the
>drawn control. This works. But I can't imagine it's supposed to.

What you're doing sounds perfectly reasonable to me. As far as I know
there's no Wizard support for dynamically created controls.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.



Fri, 06 Dec 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Class Wizard - Missing Control ID's

2. Newbie - Control ID's not showing on member variables tab

3. mapping many control ID's to the same function

4. Controls ID's in a CFileDialog

5. Control ID's in a CFileDialog

6. Finding Control ID's own Dialog_Control_ID (Window to ID) ?

7. URGENT! Are all control id's unique ?

8. URGENT! Are all control id's unique ?

9. Are dialog control ID's meant to be unique per project?

10. Control's ID

11. Find a control type base on it's ID in dialogbox

12. Resource ID doesn't associate with control

 

 
Powered by phpBB® Forum Software