Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > Visual C++
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Visual C++ Questions specific to Microsoft's Visual C++. For questions not specific to this Microsoft version, use the C++ Programming forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual C++ section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 17th, 2004, 12:24 PM
Registered User
 
Join Date: Dec 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Add static controls in run time & change font/bkg

Hi folks,

For my application I need to
1. dynamically add a static text label on a already displayed BMP image
2. changing its font and background color of these dynamically added controls.

I could acheive first by .......

CString StrLabel;
CStatic label[20];

void CImageConfig::OnLButtonDblClk(UINT nFlags, CPoint point)
{
label[index].Create(StrLabel, WS_VISIBLE|WS_CHILD,CRect wherelabel[index],sizelabel),this,(UINT)-1);
}

and 2nd by

http://www.codeproject.com/staticctr...olorstatic.asp
OR http://www.codeproject.com/staticctrl/CFontStatic.asp

But what I need is to change the background and font of these static text (basically number incrementing 1,2,.. n) in run time .. they need to be displayed in 4 different colors during the length of program. I am not able to integrate these two programs together.

If anyone has a better idea on how to implement this, please feel free to jump in.

Thanks for the help.

Krish :)

Krish
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating Controls At Run-Time robbev567 ASP.NET 2.0 Basics 2 July 25th, 2007 04:57 AM
Creating run time controls, manish_kaushik ASP.NET 2.0 Basics 1 February 10th, 2007 04:11 PM
Create Controls in Run Time Fredu Access 3 January 8th, 2005 10:03 AM
Copying controls at run time aspadda Excel VBA 0 November 12th, 2003 01:07 PM
Adding controls at run-time !! kishore_peddi C# 0 October 13th, 2003 06:52 AM



All times are GMT -4. The time now is 10:04 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.