Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Controls
  New Posts New Posts RSS Feed - Controls are cumbersome
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Controls are cumbersome

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

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Topic: Controls are cumbersome
    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
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post 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 :)
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post 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! :)
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.191 seconds.