Print Page | Close Window

How to change font color on CXTPButton

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Skin Framework
Forum Description: Topics Related to Codejock Skin Framework
URL: http://forum.codejock.com/forum_posts.asp?TID=19765
Printed Date: 24 November 2024 at 7:01am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to change font color on CXTPButton
Posted By: matthewkim
Subject: How to change font color on CXTPButton
Date Posted: 17 May 2012 at 3:27am
Hi,all.

I'm in middle of making an application program on skin framework based.
I want to change font color on CXTPButton. Although I was trying to change the TextColor in ini file , it wasn't changed..
How to change font color on CXTPButton?



Replies:
Posted By: tomay3000
Date Posted: 24 May 2012 at 8:22am
COLORREF SetTextColor(
  __in  HDC hdc,
  __in  COLORREF crColor
);

from here: http://msdn.microsoft.com/en-us/library/dd145093%28v=vs.85%29.aspx - http://msdn.microsoft.com/en-us/library/dd145093%28v=vs.85%29.aspx

call it from inside this message handler:
afx_msg HBRUSH OnCtlColor(
   CDC* pDC,
   CWnd* pWnd,
   UINT nCtlColor 
);


you can find an example in here:
http://msdn.microsoft.com/en-us/library/0wwk06hc%28v=vs.110%29.aspx - http://msdn.microsoft.com/en-us/library/0wwk06hc%28v=vs.110%29.aspx


-------------
Product: Codejock ToolkitPro MFC v16.2.0
Platform: Microsoft Windows 8 Pro (64-bit)

Language: Microsoft Visual C++ v6.0 (MFC)



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net