Print Page | Close Window

CXTButton,CXTFlatComboBox and ATL

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=2164
Printed Date: 08 November 2025 at 5:56am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTButton,CXTFlatComboBox and ATL
Posted By: moricg
Subject: CXTButton,CXTFlatComboBox and ATL
Date Posted: 28 April 2005 at 3:45pm

I am trying to dynamically create a control of the CXTButton class in my ATL application with MFC support.I get a CWnd object from m_hWnd by using CWnd::FromHandle(m_hWnd) to get a temporary MFC CWnd pointer and pass it on to Create function as a parent window handler .

It is really works until I set any  style  for button. Ex.:

m_ctlBtnStart.SetXButtonStyle(BS_XT_SEMIFLAT | BS_XT_SHOWFOCUS);

So I can not see button on its place ( it is turn be invisible ) ,but I can click on the "button".

The same problem I have with CXTFlatComboBox. After 

m_ctlComboHost.DisableFlatLook(true);

part of control looks incorrect. 

Can anybody help me?

Thanks,

Moritz Goldshtein.




Replies:
Posted By: Oleg
Date Posted: 06 May 2005 at 1:13am

You must Subclass it and not just call CWnd::FromHandle(m_hWnd)

 



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: moricg
Date Posted: 06 May 2005 at 4:25am
Originally posted by oleg oleg wrote:

You must Subclass it and not just call CWnd::FromHandle(m_hWnd)

 



I'm do it. It is not works. Function DrawItem of CXTButton is not been called in this case.



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