Print Page | Close Window

Abnormal Behavior of CXTPNoFlickerWnd <CStatic>

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=6832
Printed Date: 28 September 2024 at 11:38pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Abnormal Behavior of CXTPNoFlickerWnd <CStatic>
Posted By: aimslife
Subject: Abnormal Behavior of CXTPNoFlickerWnd <CStatic>
Date 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
.



Replies:
Posted By: Oleg
Date 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


Posted By: aimslife
Date 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
.


Posted By: Oleg
Date 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


Posted By: aimslife
Date 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
.


Posted By: Oleg
Date 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


Posted By: BastianPL
Date 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



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