Add horizontal scrollbar to a combo box

CComboBox has a function called SetHorizontalExtent which doesn’t work. SDK equivalent is CB_SETHORIZONTALEXTENT which also doesn’t work. The reason for this bug is pretty lame, because WS_HSCROLL style for combo box is not set, which in turn the VS dialog editor does not provide :(. So a workaround is to open .rc file in a […]
Continue reading…

 

std::string caveat

Never access an std::string‘s buffer with an intent to increase/decrease it’s length nor pass such a buffer to functions which takes a char*. I did this mistake sometime back and got trapped in a strange bug with operator +=. This is how my code looked. [sourcecode language=”cpp”]std::string str( ‘ ‘, MAX_PATH ); GetFolderName( pFullPath, &str[0] […]
Continue reading…

 

Project Conversion Bug in VS2008

Are you having trouble with VS2008 after conversion from VS2005 to VS2008? Most common complaints are that the executable is way to slow when compared to it’s counterpart generated with VS2005. The reason for this is given in this MSDN forum thread have a look… http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/fb32033b-7bad-439b-a94c-943a17f0cbb2 The essence of this thread is given below (quote […]
Continue reading…

 

Where can I find MFC feature pack samples?

People are having trouble finding feature pack samples installed in the samples directory. I too had a similar problem. So what you need to do is to uninstall the previous sample exe that you’ve installed. Then install the samples from here. Good thing about this is that you’ll have an updated samples package. If you’re […]
Continue reading…

 

Breakpoints in Visual Studio

What’s a breakpoint? A breakpoint is defined as the location where a debugger breaks execution to allow the user to have a look or to modify the execution context. What’s new with breakpoints? With visual studio 2005 and 2008 behavior of breakpoint has changed. Some features that were added are as follows… Know hit count […]
Continue reading…