Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Abnormal Behavior of CXTPNoFlickerWnd <CStatic>
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Abnormal Behavior of CXTPNoFlickerWnd <CStatic>

 Post Reply Post Reply
Author
Message
aimslife View Drop Down
Newbie
Newbie
Avatar

Joined: 19 January 2007
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote aimslife Quote  Post ReplyReply Direct Link To This Post Topic: Abnormal Behavior of CXTPNoFlickerWnd <CStatic>
    Posted: 10 April 2007 at 12:25pm
Hi,

I made SDI base application which looks like "SearchOptions" example. I placed one label on panel area and bind with CXTPNoFlickerWnd <CStatic> class and call SetFont function for Bold label and passing parameter &XTAuxData().fontBold. It is working fine in case of no space in text... but it makes problem if any string-set which has space in it e.g "aims life<aimslife@gmail.com>" try to set on it then its shows "aims" only in label and if I replace space with any character then its work fine. Please guide me what should i do to solve this solution??

regards,
-aims
.
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: 10 April 2007 at 2:49pm
Hi,
you can check CXTPNoFlickerWnd  sources - all it do is call base WM_PAINT method. Just don't use it, if it doesn't work with STATIC.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
aimslife View Drop Down
Newbie
Newbie
Avatar

Joined: 19 January 2007
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote aimslife Quote  Post ReplyReply Direct Link To This Post Posted: 11 April 2007 at 3:57am
I found following code in WM_PAINT message in xtpdrawhelpers.h file, but I am not found any reason of truncate of string in following code.

CRect rc;
GetClientRect(&rc);

CXTPBufferDC memDC(dc.GetSafeHdc(), rc);
memDC.FillSolidRect(rc, m_crBack);

return TBase::DefWindowProc(WM_PAINT,
    (WPARAM)memDC.m_hDC, 0);

is it possible, the problem in TBase::DefWindowProc function?
regards,
-aims
.
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: 11 April 2007 at 5:38am
Hi,
 
I bet you will see same if you will use simple CStatic instead. Problem can be only because size of static not enough to show whole string.
Add more width.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
aimslife View Drop Down
Newbie
Newbie
Avatar

Joined: 19 January 2007
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote aimslife Quote  Post ReplyReply Direct Link To This Post Posted: 11 April 2007 at 10:26am
Hi Oleg,

Label ID is IDC_SENDER_EMAIL and I call SetResize function for resize label and following line use for resizing my label and width problem will not come for showing text..

SetResize(IDC_SENDER_EMAIL, SZ_TOP_LEFT, SZ_BOTTOM_RIGHT);

I am calling this function in my CPenalView class(Its base class CXTSearchOptionsView) function OnInitialUpdate.

will width problem come??
regards,
-aims
.
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: 11 April 2007 at 10:59am
Hi,
Open designer, select this IDC_SENDER_EMAIL and add resize it more.
 
You set bold font - it requare more width to fit whole string.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
BastianPL View Drop Down
Groupie
Groupie
Avatar

Joined: 15 April 2006
Status: Offline
Points: 69
Post Options Post Options   Thanks (0) Thanks(0)   Quote BastianPL Quote  Post ReplyReply Direct Link To This Post Posted: 24 April 2007 at 12:56pm
Why CXTPNoFlickerWnd doesn't work with CEdit and CCombobox etc.
 
I have a Dialog declared n MainFrame window as CXTPNoFlickerWnd<CUserDetailsDlg> m_wndUserDetails-> attached to pane control.
 

// create user details dialog

m_dlgUserDetails.Create( CUserDetailsDlg::IDD, this );

m_dlgUserDetails.ShowWindow( SW_SHOW );

m_dlgUserDetails.SetBackColor(RGB( 200, 218, 250 ));

// installs docking panes

m_paneManager.InstallDockingPanes( this );

m_paneManager.SetTheme( xtpPaneThemeOffice2007 );

DWORD dwOptions = xtpPaneNoCloseable | xtpPaneNoCaption | xtpPaneNoFloatable | xtpPaneNoHideable;

// Create user details pane

CXTPDockingPane *pwndUserDetails = m_paneManager.CreatePane( ID_PANE_USER_DETAILS, CRect( 0, 0,500, 500 ), xtpPaneDockTop );

pwndUserDetails->Attach( &m_dlgUserDetails );

pwndUserDetails->SetOptions( dwOptions );

pwndUserDetails->SetMinTrackSize( CSize( 150,35 ) );

pwndUserDetails->SetMaxTrackSize( CSize( 300,35 ) );

m_paneManager.GetPaintManager()->SetSplitterStyle( xtpPaneSplitterGradientVert );

 
In CUserDetailsDlg I habe Edit Box and COmbobox both declared:
CXTPNoFlickerWnd<CEdit> m_cEdit;
CXTPNoFlickerWnd<CXTFlatComboBox> m_cCombo;
 
 
When I am resizing a MainWindow (MainFrame) controls in CUserDetailsDlg flickering.

Thanks

Bastian
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.156 seconds.