Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > Visual C++
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 17th, 2004, 12:24 PM
Registered User
 
Join Date: Dec 2004
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





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





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