Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - CXTButton,CXTFlatComboBox and ATL
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTButton,CXTFlatComboBox and ATL

 Post Reply Post Reply
Author
Message
moricg View Drop Down
Newbie
Newbie


Joined: 28 April 2005
Location: Israel
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote moricg Quote  Post ReplyReply Direct Link To This Post Topic: CXTButton,CXTFlatComboBox and ATL
    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.

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
moricg View Drop Down
Newbie
Newbie


Joined: 28 April 2005
Location: Israel
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote moricg Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.