Controls are cumbersome |
Post Reply |
Author | ||
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
Posted: 17 July 2008 at 4:39pm |
|
I've changed some CButton to CXTPButton to get the Office 2007 look, but for each button the theme has be set at runtime, that's horrible. I would expect a CXTPDialog class with a SetTheme() method which then sets the theme of all child controls.
Also there is no CXTPListBox and CXTPComboBox. I would expect all common controls with the different themes. And last but not least could you please a SetWindowText(UINT nID); method which takes a string id? Thanks |
||
Codejock support
|
||
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
|
Wrote a little wrapper: class CStringResource : public CString { public: CStringResource(UINT nID) { VERIFY(LoadString(nID)); } }; |
||
Codejock support
|
||
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
|
Don't waste your time writing wrappers for nothing ;)
CString str((LPCTSTR)IDS_STRING);
or, my personal favorite:
inline CString _S(UINT nID)
{
#ifdef _DEBUG
CString str;
ASSERT(str.LoadString(nID));
#else
return CString((LPCTSTR)nID);
#endif
}
foo(_S(IDS_STRING)); // Simple code :)
|
||
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
|
I think this constructor is pretty ugly. I never understood why there is no CString(UINT nID) constructor. That would even make CString(0) and CString(NULL) ambigoius which I think would be a good thing because both are not valid. CString::CString(LPCTSTR lpsz) { Init(); if (lpsz != NULL && HIWORD(lpsz) == NULL) { UINT nID = LOWORD((DWORD)lpsz); } }
I like that one _T() and _S() But the primary reason for my post was that the XTP controls are cumbersome. I don't understand why Codejock doesn't get the basics done but instead works on a useless Ribbon designer. |
||
Codejock support
|
||
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
|
Yeah. I spent weeks on my ribbon, and now my competitors will be able to do the same in a couple of minutes. Grrr! :)
|
||
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 |