473,466 Members | 1,296 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Help me with CStatic


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!!!...

--
MorAdan
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

Feb 8 '06 #1
4 1345
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.
br**********************@hotmail.com
Remove only "_nos_pam"
Feb 8 '06 #2
"MorAdan" <Mo************@mail.codecomments.com> wrote in message
news:Mo************@mail.codecomments.com...

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?
--
Jeff Partch [VC++ MVP]
Feb 8 '06 #3


--

Kind regards,
Bruno.
br**********************@hotmail.com
Remove only "_nos_pam"
"Jeff Partch [MVP]" <je***@mvps.org> wrote in message
news:eM**************@TK2MSFTNGP11.phx.gbl...
"MorAdan" <Mo************@mail.codecomments.com> wrote in message
news:Mo************@mail.codecomments.com...

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?
--
Jeff Partch [VC++ MVP]

Feb 9 '06 #4
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.
Feb 9 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: mattigiat | last post by:
Sorry for being such a newbie in this respect, but here's my question: I have Visual Studio, with VB6 ent., with msdn help installed. Is there any way to downgrade to just using the VB5 help, on...
21
by: Dave | last post by:
After following Microsofts admonition to reformat my system before doing a final compilation of my app I got many warnings/errors upon compiling an rtf file created in word. I used the Help...
10
by: Jacek Generowicz | last post by:
Where can I find concise, clear documentation describing what one has to do in order to enable Python's internal help to be able to provide descriptions of Python keywords ? I am in a situation...
9
by: Tom | last post by:
A question for gui application programmers. . . I 've got some GUI programs, written in Python/wxPython, and I've got a help button and a help menu item. Also, I've got a compiled file made with...
0
by: python-help-bounces | last post by:
Your message for python-help@python.org, the Python programming language assistance line, has been received and is being delivered. This automated response is sent to those of you new to...
2
by: Eitan | last post by:
Hello, I am creating a new window class based on CWnd. I am placing it on the View (CFormView). How can I get the notification or any other indication that the cursor/mouse is not on this...
0
by: Eitan | last post by:
Hello, I am creating a new window class based on CWnd. I am placing it on the View (CFormView). How can I get the notification or any other indication that the cursor/mouse is not on this...
2
by: urneel | last post by:
Hi group, Iam able load image (*.bmp,&tiff, *jpg) on Cstatic box with bitmap property using GDI+ API's . problem is when tiff image of 80MB size or greater takes more time which is...
3
by: desktop | last post by:
When I try to compile this template I get an error in the line: "enum { Yes = sizeof(IsClassT<T>::test<T>(0)) == 1};" saying: blop.hpp:8: error: expected primary-expression before ‘>’ token...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.