CXTPPropertySheet vs Theming |
Post Reply |
Author | |
No.Regsz
Groupie Joined: 28 December 2008 Status: Offline Points: 15 |
Post Options
Thanks(0)
Posted: 27 February 2011 at 12:07pm |
In order to make OK, Cancel and Apply buttons look consistent with entire application I have to write the following ugly code:
/*virtual*/ BOOL CPreferencesDlg::CreateClient() { if (!__super::CreateClient()) return(FALSE); for (INT_PTR i = 0; i < m_arrButtons.GetSize(); ++i) { CButton * const pButton = m_arrButtons.GetAt(i); CString strButton; pButton->GetWindowText(strButton); const DWORD nID = ::GetWindowLong(pButton->GetSafeHwnd(), GWL_ID); CButton * const pXTPButton = new CXTPButton(); if (!pXTPButton->Create(strButton, pButton->GetStyle(), CRect(0, 0, 0, 0), this, nID)) { delete pXTPButton; continue; } delete pButton; m_arrButtons.SetAt(i, pXTPButton); pXTPButton->SendMessage(WM_SETFONT, (WPARAM)(HFONT)m_fntNormal, FALSE); } SendMessageToDescendants(WM_XTP_SETCONTROLTHEME, xtpControlThemeResource, 0); RecalcLayout(); return(TRUE); } Please make some virtual methods so I can sabstitute CXTPButton. |
|
XTP 15.0.1
7 SP1 VS 2010 SP1 Beta |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |