Colored Static Controls
Description
CColorStaticST is a class derived from MFC CStatic class.This class lets put static controls inside your applications and easly make them colored or even blinking!
CColorStaticST features:
- Standard CStatic properties
- Customizable background color
- Customizable text color
- Background color can blink
- Text can blink
- Notification message can be sent on rising blinks
- Written in Visual C++ v5.0
- Full source code included!
- It's free!
You are encouraged to use this class everywhere you want; there is no fee required for CColorStaticST. Freely add modifications and/or fix bugs, but please, send any of these to SoftechSoftware!
How to integrate CColorStaticST in your application
In your project include the following files:ColorStaticST.h ColorStaticST.cppWith dialog editor create a static text called, for example, IDC_DANGER and create a member variable for it:
CColorStaticST m_stcDanger;Now attach the static text to CColorStaticST. In your OnInitDialog procedure:
// Call the base method CDialog::OnInitDialog(); // Create the IDC_DANGER text m_stcDanger.SubclassDlgItem(IDC_DANGER, this);By default the static text will have the standard system colors. Both text and backgroud color can be customized:
// Change the text color to White m_stcDanger.SetTextColor(RGB(255, 255, 255)); // Change the background color to Green m_stcDanger.SetBkColor(RGB(0, 255, 0));The text and/or the background can blink! Two colors must be supplied for text and background blinks. First color will be used for blink OFF state and second color for blink ON state (called also rising blink):
// Set blink colors for text m_stcDanger.SetBlinkTextColors(RGB(128, 0, 0), RGB(255, 255, 255)); // Set blink colors for background m_stcDanger.SetBlinkBkColors(RGB(128, 0, 0), RGB(255, 0, 0)); // Start text blinking m_stcDanger.StartTextBlink(TRUE, CColorStaticST::ST_FLS_FAST); // Start background blinking m_stcDanger.StartBkBlink(TRUE, CColorStaticST::ST_FLS_FAST);CColorStaticST can send a message to the parent window each time it has a rising blink. To do this a user defined message and a parent window must be supplied:
// Enable notification message m_stcDanger.EnableNotify(this, WM_USER + 10);Your static text is now a CColorStaticST!
Look inside the demo program to learn more about CColorStaticST. This is the best way!
CColorStaticST members
void SetTextColor(COLORREF crTextColor = 0xffffffff);Set color for text (when not blinking)
Input values:
- crTextColor
The new text color
m_stcDanger.SetTextColor(RGB(255, 255, 255));
m_stcDanger.SetTextColor(); // To restore the default system color
COLORREF GetTextColor();
Get current text color
Example:
COLORREF crRetValue = m_stcDanger.GetTextColor();
void SetBkColor(COLORREF crBkColor = 0xffffffff);
Set color for background (when not blinking)
Input values:
- crBkColor
The new background color
m_stcDanger.SetBkColor(RGB(255, 0, 0));
m_stcDanger.SetBkColor(); // To restore the default system color
COLORREF GetBkColor();
Get current background color
Example:
COLORREF crRetValue = m_stcDanger.GetBkColor();
void SetBlinkTextColors(COLORREF crBlinkTextColor1, COLORREF crBlinkTextColor2);
Set colors for text (when blinking)
Input values:
- crBlinkTextColor1
Text color for blink OFF state - crBlinkTextColor2
Text color for blink ON state (rising blink)
m_stcDanger.SetBlinkTextColors(RGB(128, 0, 0), RGB(255, 255, 255));
void StartTextBlink(BOOL bStart = TRUE, UINT nElapse = ST_FLS_NORMAL);
Start/stop text blinking
Input values:
- bStart
TRUE starts blinking
FALSE stops blinking
- nElapse
Defines the text blinking intervall. Possible values are:
ST_FLS_SLOW (2000 ms)
ST_FLS_NORMAL (1000 ms)
ST_FLS_FAST (500 ms)
m_stcDanger.StartTextBlink(TRUE, CColorStaticST::ST_FLS_FAST);
m_stcDanger.StartTextBlink(TRUE, 250); // To blink with custom intervall
m_stcDanger.StartTextBlink(); // To stop blinking
void SetBlinkBkColors(COLORREF crBlinkBkColor1, COLORREF crBlinkBkColor2);
Set colors for background (when blinking)
Input values:
- crBlinkBkColor1
Background color for blink OFF state - crBlinkBkColor2
Background color for blink ON state (rising blink)
m_stcDanger.SetBlinkBkColors(RGB(128, 0, 0), RGB(255, 0, 0));
void StartBkBlink(BOOL bStart = TRUE, UINT nElapse = ST_FLS_NORMAL);
Start/stop background blinking
See StartTextBlink for possible input values
Example:
m_stcDanger.StartBkBlink(TRUE, CColorStaticST::ST_FLS_FAST);
m_stcDanger.StartBkBlink(TRUE, 250); // To blink with custom intervall
m_stcDanger.StartBkBlink(); // To stop blinking
void EnableNotify(CWnd* pParent = NULL, UINT nMsg = WM_USER);
Enable/Disable sending notification message on rising blinks
Input values:
- pParent
Parent window of the static text - nMsg
Message to send
m_stcDanger.EnableNotify(this, WM_USER + 10);
m_stcDanger.EnableNotify(); // To disable message sending
static const short GetVersionI()
static const char* GetVersionC()
Return CColorStaticST version
Example:
int nVer = CColorStaticST::GetVersionI(); // Divide by 10 to get actual version
char szVer[20];
strcpy(szVer, CColorStaticST::GetVersionC());
Download the demo project (99Kb).
History
- CColorStaticST v1.0
First release
Things to do
- Any suggestion?
Contact addresses
SoftechSoftware E-Mail:davide_calabro@yahoo.com
SoftechSoftware homepage:
http://members.tripod.com/~SoftechSoftware/index.html
CColorStaticST homepage:
http://members.tripod.com/~SoftechSoftware/colorstc.html

Comments
Prince George's Community College in Capitol Heights
Posted by XRwogannimeieTest on 05/15/2013 09:52amThese purses are designed for a woman that is both strong and sophisticated. The leather used in making these replica Gucci bags is genuine and of very high quality. Still, Burton was very honored to design a wedding gown for the future Duchess of Cambridge.. Indeed, Luxe Rodeo Drive Hotel offers a special menu of in-room spa services by Be Well Spa, such as massages, facials, yoga, skin and body treatments. Probablement vous aurez votre partenariat pour seulement une pè riode prolongè e, plus la dame vous oblige è¿ vraiment personnaliser un peu peu peu.
ReplyDuvetica
Posted by Reormawaw on 05/06/2013 06:55amãã ããã ãã« [url=http://www.japanduveticajp.com/ ]duvetica tideo [/url]ã¨ã¹ã¯ã ãããã ããã® ãã ãããã ããã£ã¨ ã¡ã [url=http://www.jpduveticajp.com/ ]duvetica febe [/url]ããã ãããããã ã¬ãã ã¦ã¤ã³ã° ã¿ãã ãã£ã¼ã«ã ãã¹ã ã¡ã³ãã¼ ã¸ãã ã¼ãã¼ã ããã³ [url=http://www.japanviviennewestwoodmjp.com/specials.html ]ã´ã£ã´ã£ã¢ã³ ãªã³ã° [/url] ã°ã«ã¿ãã³ ãã® ããã«ã¡ [url=http://www.jpviviennewestwoodjp.com/ã´ã£ã´ã£ã¢ã³-ãµã³ã°ã©ã¹-ã»ã¼ã«-9.html ]ã´ã£ã´ã£ã¢ã³ã¦ã¨ã¹ãã¦ãã å®æå ¥ã [/url]ãããã©ã ããã¨ãã ã¦ã¤ã¼ãã³ã° ã¢ã»ãã¼ã ã·ã«ã¯ ãããã ã¤ã³ã [url=http://www.jpgorosjapan.com/ ]goro s bar [/url] ãªããã¨ã°ã ãããã ãã£ã¨ã°ã [url=http://www.jpgorosjp.com/ ]ã´ãã¼ãº ãã§ã¶ã¼ããã¯ã¬ã¹ [/url]ãããããã ã·ã£ãã ã·ã¹ãã ãã¾ãã¾ ããã ãããã¦ã [url=http://www.jpgorosjapanese.com/ã´ãã¼ãº-æè¼ª-ã»ã¼ã«-9.html ]ã´ãã¼ãº è²¡å¸ æ°ä½ [/url]ãã¼ãã³ã° ã²ã£ãã ãããã
Replyã³ã³ãã¼ã¹ ã¬ãã£ã¼ã¹ ãã¼ããªã¼ ã³ã³ãã¼ã¹ ååº ã³ã³ãã¼ã¹ ã¬ã¶ã¼ ãªã¼ã«ã¹ã¿ã¼ ãã¼ããªã¼ ã¹ã¼ã
Posted by exhaulpMeeque on 04/23/2013 12:46pmé®®ãã é«å質 å ¬å¼åºè åç¸®ç æ ¼å®ä¾¡æ ¼ ä¿æ¸©æ§ é«ãè©ä¾¡ã ã·ã§ã¼ã [url=http://www.burberryurusaifu.com/]ãã¼ããªã¼ ãã¯ã¿ã¤[/url] åççãªä¾¡æ ¼ ãããã ç§ çãã ã¯ãªã¹ãã¹ ãã¹ã ãµããã³ ãªã¼ããã³ã° ã¢ãã¬ã¹ ã¨ãã ããããã ã¼ãã ãã¦ã㦠ããããã³ãã ã¤ããããªã ããããªãã ããã© [url=http://www.burberryurusaifu.com/ãã¼ããªã¼é·é´-c-21.html]ãã¼ããªã¼ ãã¦ã³[/url] ãµã©ã ãããã¾ã ã¿ãã ã¨ããã ããã ãããã¸ã ãã¼ã½ã¹ ããã¥ã©ã« ãã¥ããã 人æ°ç« æä½ä¾¡æ ¼ æä¸ç´ 叿°´æ§ 天ç¶ç´ æ ããã é販 [url=http://www.fineconversekutu.com/]ã³ã³ãã¼ã¹ ãªã¼ã«ã¹ã¿ã¼ hi[/url] ç¹æã®è¨è¨ ã¹ãããã³ã° ç½ã ã¦ã©ã¼ã · ä¸å é©ç¨ ä¸çä¸ã« ããã§ã ããããããã ãµãããã ããã ã¡ããã ãã¤ã ãããã [url=http://www.fineconversekutu.com/ã³ã³ãã¼ã¹ãã®ä»-outlet-13.html]ã³ã³ãã¼ã¹ ãã¼ã«ãã[/url] ãããã ããã°ãªã ãããã ãã¶ã¤ ãããããã ãã¹ã ãªãã£ã¹ ããã ããã©ã ããã¾ãã ãã¸ãã¹ ã¦ã§ã¢
Replyã³ã³ãã¼ã¹ ã¯ã³ã¹ã¿ã¼ ã³ã³ãã¼ã¹ é´ ã³ã³ãã¼ã¹ ã¹ãã¼ã«ã¼ ãã¤ã«ãã ã³ã³ãã¼ã¹ ã¬ãã£ã¼ã¹ ãªã¼ã«ã¹ã¿ã¼
Posted by Dettarlectemi on 04/14/2013 06:49pmå®ç¨æ§ãé«ã åè¢ ä¸æ½ ã³ã¼ãã£ãã¼ã·ã§ã³ ç´ç² [url=http://www.conversejpbuy.com/]ã³ã³ãã¼ã¹ ã¯ã³ã¹ã¿ã¼[/url] ç°¡æ½ãªãã¶ã¤ã³ 大好è©ãåã ãã³ãããã° ä¸æ½ ã¹ãã¼ãã·ã¥ã¼ãº ææ°ã¢ã¤ãã æç¨ é«ææã«æºãããã ãããã ã¤ããã ã²ãã¨ã ããããããã ããã㨠ããã㪠[url=http://www.celinejpsale.com/]ã»ãªã¼ã ããã° æ°ä½[/url] ã¢ã«ããã³ ãããã ãã©ã³ãã³ã° ãµã¼ãã¹ ã¹ãã¼ã·ã§ã³ ã¸ãã¾ãã ãã ã¶ãã ãµã ããããã ã¸ã ãã å¤å ¸ç ç¥ã è¶ äººæ°æ°å ä¸å é®®ãã 人æ°åå è³¼å ¥ [url=http://www.conversejpbuy.com/ã³ã³ãã¼ã¹-ãã£ã³ãã¹-outlet-11.html]ã³ã³ãã¼ã¹ ãã©ãã¯[/url] è¯éºç»å ´ èä¹ æ§ã®ãã ãã©ã¸ã£ã¼ ä¸çç´ã® åªã ãã³ãã£ã¼ ãã¸ã ãããã ãããã ã¿ã©ã ãããã ãã¼ã¢ãã¼ ããã°ã ãã£ãã ãã¼ã« ã«ã©ã¼ [url=http://www.celinejpsale.com/]ã»ãªã¼ã æ°ä½[/url] ãããã ããã¤ãã ã©ããã ãã¼ã« ããã㤠ãªãã·ãã¼ã« ãªãªã㯠ãã£ã¦ ã¬ãã¿ãã¿ ã¨ã¾ãããã ãã¨ã©ã èº«é· ç´ æµ ç°¡æ½ãª æµ·å¤é販 人æ°é«ç´ãã©ã³ã è¯å¥¢ å®ç§ [url=http://www.converse2013kutu.com/]ã³ã³ãã¼ã¹ é»[/url] ã«ã©ãã« æäººæ° å¨ æç¾¤ ä¸çæé«å³° ããã°ã³ ãã ããã ãã£ã ãããã®ã ãã ã»ãã³ã ããããã ããã«ã¡ ãã¡ãã ã ãããã® [url=http://www.converse2013kutu.com/]ã³ã³ãã¼ã¹ ã¬ã¶ã¼[/url] ãã¨ã« ã¹ãã©ã¤ã ãã£ãã ãã¬ã¼ãº ã¹ããã ã©ã¤ã ãã ãã㤠ã¸ãããã ããããã ã²ã¬ã³ã ããããã ã¿ãã
Replyã¢ã³ã¯ã¬ã¼ã« ãã¦ã³
Posted by VOSYCLAXADOLO on 04/10/2013 09:29pmããã [url=http://www.jpmcmbags.com/products_new.html ]MCM ããã° ã·ã§ã«ãã¼ [/url]ã´ã¡ã£ã¨ ã¡ã¿ã©ã ã¯ãªã¼ã ãã [url=http://www.mcmbagsjapanese.com/mcm-財å¸ãã«ã-ã»ã¼ã«-14.html ]MCM è²¡å¸ æ°ä½ [/url]ã¶ãã¨ã ã«ã£ãã ãããªã¹ãã£ã㯠[url=http://www.jphaglofs.com/haglofs-財å¸-ã»ã¼ã«-23.html ]ãã°ããã¹ ããã°ã«ãã´ãª [/url]ããã¦ã ãã¡ãã¿ ããã [url=http://www.japanhaglofs.com/ãã°ããã¹-ãºãã³-ã»ã¼ã«-12.html ]ãã°ããã¹ ãªã¥ã㯠[/url]ãããã ã¡ããã
Replyã¢ã³ã¯ã¬ã¼ã«
Posted by VOSYCLAXADOLO on 04/08/2013 02:45pmããã¦ã [url=http://www.jpmcmbags.com/mcm-ãã«ã-ã»ã¼ã«-10.html ]MCM ããã° [/url]ãããããã ãµããã ãããããã [url=http://www.mcmbagsjapanese.com/mcm-ãªã¥ãã¯-ã»ã¼ã«-12.html ]MCM è²¡å¸ æ°ä½ [/url]ãã¾ã¥ãã ã¯ãªã¼ã ãã° [url=http://www.jphaglofs.com/haglofs-ãã³ã-ã»ã¼ã«-11.html ]ãã°ããã¹ [/url]ãã㦠ã¦ããã ãã³ ã²ã¾ [url=http://www.japanhaglofs.com/ãã°ããã¹-å¯è¢-ã»ã¼ã«-27.html ]ãã°ããã¹ ç¦è¢ [/url]ããã¥ãã ãããã
Replyãã£ãã¡ãã¼ æè¼ª
Posted by Attammell on 04/03/2013 08:48pmãã¶ããã [url=http://www.japantiffanyjp.com/ãã£ãã¡ãã¼-ããã¯ã¬ã¹-ã»ã¼ã«-1.html ]ãã£ãã¡ãã¼ æè¼ª [/url]ãããã ãã¡ãã¼ ãããã ãããã [url=http://www.vansjapanese.com/ ]Vans ã¹ãã¼ã«ã¼ ã¬ãã£ã¼ã¹ [/url]ããã¿ãã ããã¿ ã»ãã®ã ããããã ã ãµãªã ãã [url=http://www.japanvans.com/ ]ãã³ãº ã¹ãªããã³ [/url]ãããã ããã
Replyã¸ã§ã¼ãã³ ã·ã¥ã¼ãº ãã¤ã ã¹ã¨ãã jordan é´ ãã¤ã ã¨ã¢ããã¯ã¹ ãã¤ã é´
Posted by Twisrelvelvix on 04/03/2013 01:57amä½ä¾¡æ ¼ ã³ã¼ã ç´æ£ ããã çµ¶è³ã [url=http://www.airmaxjpnike.com/]ãã¤ã ã¹ãã¼ã«ã¼[/url] ã®ã£ã«å§«ç³» ãã¥ã¢ å° å¨ ä¿¡è¨ ããã ããã«ã ã ãªããã¹ ã§ã©ãã ã¡ã¾ã³ ãã¹ã ã¯ã³ [url=http://www.airmaxjpnike.com/air-max-95-360-outlet-40.html]ãã¤ã ã¬ãã£ã¼ã¹[/url] ãããããããããã ãµã¿ãã ããããããã ããã㤠㵠㨠㩠ã¦ããã¤ã㤠ãããã ã«ã¡ã© ã¹ã¯ãªãã ã¯ã¤ãº ã·ã§ã¼ 广ç㪠çå¿å° å質ä¿è¨¼ æµè¡ãã é åç äººæ°æ°ä½ ç [url=http://www.nikekutudunksb.com/ãã¤ã-idã¡ã³ãº-outlet-18.html]ãã¤ã ãã¤ãã¼ãã³ã¯[/url] 大è¡çãªè²©å£²å±¤ éä¿¡ æé«å質ã®åå ï¼´ã·ã£ã å®ä¾¡ ããªãã¡ ã»ããã ããã ãã¨ã ãã¾ã ãããã ã¬ã¹ ã¡ã¼ã¿ã¼ ãããããã ããããã ããããªã ããã¡ãã [url=http://www.nikekutudunksb.com/ã¨ã¢ããã¯ã¹-2011ã¬ãã£ã¼ã¹-outlet-21.html]nike ããã·ã¥[/url] ãã£ã¨ã ã¯ã ããã ã»ã£ãã ãµã¨ãã ãã ã£ã ãµããã ãããã ããã ãµã㯠ã¦ãã ã¨ã¢ã¹ãã㯠ã©ã¦ã³ããã㯠海å¤é販 å°å£²åº éå½ æé«ä½ ããªã¼ã [url=http://www.jpnikejordankutu.com/]ã¸ã§ã¼ãã³ ãã©ã¤ã[/url] ããã èº«é· ãã æ¿å®é販 æç¨ ããã ããã¡ ãããµãã ãªã¤ãã ãµã¨ã ãããã ãã³ã ã¦ã¨ã ãããã ã±ãã¤ã ããµã [url=http://www.jpnikejordankutu.com/]air jordan[/url] ãããã¡ ãããã ããã㤠ãããã¿ã ã»ãã¬ã¼ã ã©ã®ããã« ãããã ã¯ããã ã²ããã¶ã ããããã
Replyãã£ãã¡ãã¼ ããã¯ã¬ã¹
Posted by Attammell on 03/28/2013 10:22pmããµã [url=http://www.japantiffanyjp.com/ãã£ãã¡ãã¼-ããã¯ã¬ã¹-ã»ã¼ã«-1.html ]ãã£ãã¡ãã¼ åºè [/url]ããããã ããããã»ãã ã¨ã¢ ãã¬ã¼ã ã¡ã ãããã¨ã [url=http://www.vansjapanese.com/ ]Vans ã¹ãã¼ã«ã¼ [/url]ã»ã«ã³ã ã²ã©ã ã»ãã³ã ããã ããããã [url=http://www.japanvans.com/ãã³ãº-ç·å¥³å ¼ç¨-ã»ã¼ã«-3.html ]Vans ã¹ãªããã³ [/url]ã¨ã£ã¦ã ã¹ã¤ãã
Replyã¸ã§ã¼ãã³ ãã¤ãã¸ã§ã¼ãã³ nike ã¹ãã¼ã«ã¼ ã¢ã·ãã¯ã¹ ã·ã¥ã¼ãº
Posted by PupliplyKix on 03/26/2013 09:23amãªãªã¸ãã« æç¾¤ ãã¬ã¹ ãã®ä»ãªã 注ç®ãéãã åºè 販売 [url=http://www.asicsshoesjp.biz/]ã¢ã·ãã¯ã¹ ã·ã¥ã¼ãº ã©ã³ãã³ã°[/url] ä¸è³ªãªé¢¨åããæã¤ 人æ°ç« äººæ°æ°ä½ 注ç®ãéãã 羨æ [url=http://www.airjordanjp.biz/]ã¸ã§ã¼ãã³[/url] ææ°ã¢ã¤ãã ã¯ã©ã·ã㯠ã«ã¸ã¥ã¢ã«é¢¨ å²ä¸æä½ ããã°ã³ è¯éºç»å ´ å²å¼ä¾¡æ ¼ æãé«ãæ¨æº è±ªè¯ ãããªã ãã¼ã¯ ã°ã¬ã¼ ããã¯ã ããã ã¨ããã ãã£ããªã ã¡ãã㪠ã©ã£ãã ãã£ã³ãã« [url=http://www.airjordanjp.biz/ã¨ã¢ã¸ã§ã¼ãã³ã¬ãã13-c-10.html]nike ã¹ãã¼ã«ã¼[/url] ã¨ããã ããããã ã¶ãã¤ã ã¡ããããã ããããã ã»ããã ã®ããã ã [url=http://www.asicsshoesjp.biz/ã¢ã·ãã¯ã¹-onitsuka-tiger-mexico-66-dx-c-29.html]ã¢ã·ãã¯ã¹ ã©ã³ãã³ã°[/url] ãããã ããã㤠ã¯ããã ã«ãã¥ã ãããã ã¡ãã ããã²ã çµ¶å¦ é²å¯ ã¹ã«ã å¨ å°éåº é åç 叿°´æ§ [url=http://www.airjordanjp.biz/]nike ã¹ãã¼ã«ã¼[/url] ä¾¡æ ¼ãé常ã«å®ã æä½ä¾¡æ ¼ è»½éæ è²©å£² ä¿¡é ¼ å·¥å ´ [url=http://www.asicsshoesjp.biz/]ã¢ã·ãã¯ã¹ ã·ã¥ã¼ãº[/url] å®ç¨ç å®å ¨ ããã é®®ãã ããªãã³ ãã¡ã¹ã« ãããã ãã¥ã¼ ã©ã¤ã ãªã¿ãã ã¯ãããªã ã²ããã ã¦ãã¹ã³ ãããã¿ ã³ã㯠ããã ãããã [url=http://www.asicsshoesjp.biz/]ã¢ã·ãã¯ã¹ ã©ã³ãã³ã°[/url] ã¹ãã¼ ãã¾ãã ã¡ãã¦ã ãã ããã ã«ãããã ã¡ããã¨ã ã¤ããã ãããã ãããã ãã ãã [url=http://www.airjordanjp.biz/]nike ã¹ãã¼ã«ã¼[/url] ã¤ãããã ã»ã«ã³ã ãã¦ã¹ ãã¹ãã¼ã¯ ãã¨ãã ã«ããã ãã¼ãã ãã¦ã³ã¿ã¦ã³
ReplyLoading, Please Wait ...