Home > C++, VC++, MFC > Rarely used useful MFC classes

Rarely used useful MFC classes

Did you know there exists a class called

1. CCheckListBox
2. CDragListBox
3. CComboBoxEx
4. CHotKeyCtrl
5. CMemoryState
6. CWaitCursor

Pretty useful classes, which you should use more for the purpose for which it’s designed instead of wasting time rolling out your own stuff.  😐

I’ve seen people trying to embed a tree in a combo box, which otherwise can be easily done through CComboBoxEx.

CHotKeyCtrl easily helps in setting up a hot key.

CWaitCursor is one of the easiest classes to use. If you are starting off on a short busy task then declare an object of CWaitCursor to change default cursor to hour glass wait cursor. Once object goes out of scope cursor will be restored back to normal. If scope is a problem then wrap the long function call in braces to force destruction of CWaitCursor object immediately after the call.

Well if none of the above satisfies your purpose then you have to roll out your own. 🙂

  1. October 17, 2007 at 1:25 pm

    If you search MSDN you will bump into an exact example. 😉

  2. October 17, 2007 at 1:23 pm

    Good tips – especially CComboBoxEx; I’ll revisit that one since I need a combo with a tree as it just so happens.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: