Is there a Designer for MFC in Visual Studio like for windows forms in .NET?

This expands on Alex Farber’s answer, which is basically correct but somewhat incomplete. When you’re first creating your application, you get to select an application type: As you can see, the default selection for the Application type is “Multiple Documents”, but just below that is “Dialog Based”. Selecting that will produce an application whose main … Read more

Visual Studio Version Selector Doesn’t open

If you are running Vista or Windows 7 with the UAC enabled and have “Run this program as an Administrator” checked on the Compatibility tab for the Visual Studio exe (devenv.exe), you will get this behavior when you try to open a sln file directly from Windows Explorer. One solution is to go to “%ProgramFiles%\Common … Read more

How to make preprocessor generate a string for __LINE__ keyword?

You need the double expansion trick: #define S(x) #x #define S_(x) S(x) #define S__LINE__ S_(__LINE__) /* use S__LINE__ instead of __LINE__ */ Addendum, years later: It is a good idea to go a little out of one’s way to avoid operations that may allocate memory in exception-handling paths. Given the above, you should be able … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)