Print Page | Close Window

Controls are cumbersome

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=11479
Printed Date: 29 September 2024 at 8:20pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Controls are cumbersome
Posted By: ABuenger
Subject: Controls are cumbersome
Date 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



Replies:
Posted By: ABuenger
Date Posted: 18 July 2008 at 7:10am
Originally posted by ABuenger ABuenger wrote:


And last but not least could you please a SetWindowText(UINT nID); method which takes a string id?


Wrote a little wrapper:

class CStringResource : public CString
{
public:
   CStringResource(UINT nID)
   {
      VERIFY(LoadString(nID));
   }
};




-------------
Codejock support


Posted By: znakeeye
Date Posted: 10 August 2008 at 6:26am
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 :)


Posted By: ABuenger
Date Posted: 10 August 2008 at 10:11am
Originally posted by znakeeye znakeeye wrote:

Don't waste your time writing wrappers for nothing ;)
 
CString str((LPCTSTR)IDS_STRING);


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);
    }
}


Originally posted by znakeeye znakeeye wrote:

or, my personal favorite:
foo(_S(IDS_STRING)); // Simple code :)


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


Posted By: znakeeye
Date Posted: 17 August 2008 at 2:03pm
Yeah. I spent weeks on my ribbon, and now my competitors will be able to do the same in a couple of minutes. Grrr! :)



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