Help me with CStatic

  • Thread starter Thread starter MorAdan
  • Start date Start date
M

MorAdan

Now Begin to learn Visual C++ and have a problem...
How to change the properties of CStatic object in the program-code?
I can't create a member variable associated with this object (as I did
with, for instance, CButton...)
Help me, please!!!...
 
Now Begin to learn Visual C++ and have a problem...
How to change the properties of CStatic object in the program-code?
I can't create a member variable associated with this object (as I did
with, for instance, CButton...)

static text on an MFC dialog is just meant to be used as a label or
something like that.
you cannot attach anything a variable to it.
you can attach CStatic to a group box, though i don't know why the MFC
designers used that name. it is easily confused with somthing that you
expect to attach to a static text object.
if you want statics to change during program execution, use an edit box
without an edge.

--

Kind regards,
Bruno.
(e-mail address removed)
Remove only "_nos_pam"
 
MorAdan said:
Now Begin to learn Visual C++ and have a problem...
How to change the properties of CStatic object in the program-code?
I can't create a member variable associated with this object (as I did
with, for instance, CButton...)
Help me, please!!!...

Have you given your STATIC controls unique IDs other that IDC_STATIC?
 
previous reply to Jeff empty due to spurious baby interrupt :)
Have you given your STATIC controls unique IDs other that IDC_STATIC?

Jeff was right. if you change the ID, you can attach a CStatic variable to
the static text.
My solution was making your own static the hard way :)

Kind regards,
Bruno.
 
Back
Top