Click here to Skip to main content
15,893,594 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generaladding a cbutton to a custom control Pin
mindows2-Nov-03 17:11
mindows2-Nov-03 17:11 
GeneralRe: adding a cbutton to a custom control Pin
Antti Keskinen2-Nov-03 23:03
Antti Keskinen2-Nov-03 23:03 
GeneralRe: adding a cbutton to a custom control Pin
mindows3-Nov-03 11:54
mindows3-Nov-03 11:54 
GeneralRe: adding a cbutton to a custom control Pin
Antti Keskinen5-Nov-03 1:44
Antti Keskinen5-Nov-03 1:44 
QuestionHow to manage objects unknown at run-time Pin
Steve Messer2-Nov-03 16:42
Steve Messer2-Nov-03 16:42 
AnswerRe: How to manage objects unknown at run-time Pin
Christian Graus2-Nov-03 17:08
protectorChristian Graus2-Nov-03 17:08 
GeneralRe: How to manage objects unknown at run-time Pin
Steve Messer2-Nov-03 21:26
Steve Messer2-Nov-03 21:26 
GeneralRe: How to manage objects unknown at run-time Pin
Christian Graus3-Nov-03 9:07
protectorChristian Graus3-Nov-03 9:07 
smesser wrote:
So, your saying keep a list of each kind of objects for example.

No, I'm saying keep one list of all objects, by deriving them all from a base class which defines the common functionality, such as a Draw() method.

smesser wrote:
I don't understand how to create a dynamic list of CTextButton's for looping thru.
Sorry for being so dense.


Look up my STL articles, basically you put them in a std::list or std::vector, and then use for_each to step through them and call the required method, such as Draw in OnPaint.

smesser wrote:
PS: As a side question how do you determine the length of text that you have drawn?

A HDC or CDC has a method for doing that, but I don't recall what it's called, sorry.



Christian

I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
GeneralRe: How to manage objects unknown at run-time Pin
Steve Messer3-Nov-03 10:23
Steve Messer3-Nov-03 10:23 
GeneralRe: How to manage objects unknown at run-time Pin
Steve S3-Nov-03 23:02
Steve S3-Nov-03 23:02 
GeneralFloat window in MDI application Pin
novachen2-Nov-03 16:35
novachen2-Nov-03 16:35 
QuestionHow can I put my window under any other application window? Pin
golden06062-Nov-03 16:24
golden06062-Nov-03 16:24 
GeneralText in the taskbar vs. title bar Pin
Vancouver2-Nov-03 15:21
Vancouver2-Nov-03 15:21 
GeneralFoundation Problem, #include Problem Pin
Mehran Ziadloo2-Nov-03 15:12
Mehran Ziadloo2-Nov-03 15:12 
GeneralRe: Foundation Problem, #include Problem Pin
ZoogieZork2-Nov-03 15:21
ZoogieZork2-Nov-03 15:21 
GeneralRe: Foundation Problem, #include Problem Pin
Christian Graus2-Nov-03 15:22
protectorChristian Graus2-Nov-03 15:22 
GeneralProblem with CAsyncSocket Pin
Daniel13242-Nov-03 14:30
Daniel13242-Nov-03 14:30 
GeneralHelp with file management... Pin
Snyp2-Nov-03 14:18
Snyp2-Nov-03 14:18 
GeneralRe: Help with file management... Pin
Ravi Bhavnani2-Nov-03 15:03
professionalRavi Bhavnani2-Nov-03 15:03 
GeneralRe: Help with file management... Pin
Christian Graus2-Nov-03 15:21
protectorChristian Graus2-Nov-03 15:21 
GeneralPlease help me Pin
golden06062-Nov-03 14:03
golden06062-Nov-03 14:03 
GeneralRe: Please help me Pin
Christian Graus2-Nov-03 15:24
protectorChristian Graus2-Nov-03 15:24 
GeneralRe: Please help me Pin
golden06062-Nov-03 15:42
golden06062-Nov-03 15:42 
GeneralRe: Please help me Pin
Christian Graus2-Nov-03 15:44
protectorChristian Graus2-Nov-03 15:44 
GeneralRe: Please help me Pin
golden06062-Nov-03 16:00
golden06062-Nov-03 16:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.