VisualCpp.org Collection of Visual C++ Stuffs

13Jan/090

CTaskDialog: new configurable MessageBox

Recently I am browsing VC Team MSDN Blog site, I find this feature pretty much intresting: the whole new configurable MessageBox. Read more  here

Filed under: General No Comments
13Jan/090

Difference between MBCS and UNICODE?

Both support International characters, both has it own pros and cons.  Better read it here. :-

Unicode and MBCS (External Link)

Filed under: General, Win32 No Comments
13Jan/090

Compiler Error: C2906, How to solve?

Recently I am working of conversion of project from VC 6 (Visual Studio 6) to VC8 (Visual Studio 2005). Since this requires converting of code to suit new standards of coding, I encountered some error(s), in which C2906 is most prominent one. Error description shown in build window is this :-

Compiler Error C2906 : 'specialization' : explicit specialization requires 'template <>'.

Generally in VC6 we declare template class like this:-

1: template <class T> Class MyTemplate
2: {
3: T m_a;
4: public:
5: // blah blah blah
6: };
7:
8: class MyTemplateDerviced<int>: public MyTemplate
9: {
10: // blah blah blah
11: }

Above code works well with VC6 compiler. However it’s present problem, when compiled with VC 8 compiler at line no 8. Reason behind it is VC8 needs explicit specialization, that you are declaring template class. This error can be resolved by adding template<> before class declaration of MyTemplateDerived. Something like this :-

template<> class MyTemplateDerviced<int>: public MyTemplate

Filed under: General, Win32 No Comments
5Jan/090

Disabling compiler warning

Sometimes you encounter irrelevant warning; you may want to ignore it, in your build window. For example, If you ever programmed in Visual Studio 6 with STL, you must have seen lots and lots of STL warning which actually sometime make difficult for programmer to find actual/relevant warning in the program. C/C++ creator has provided you with nice compiler directive (#Pragma) which can actually help you to play with the warning. You can disable it or you can treat warning as error in your program.

Here is small example for you, which demonstrate use of pragma :-

// Disable warning messages 4507 and 4034.
#pragma warning( disable : 4507 4034 )

// Issue warning 4385 only once.
#pragma warning( once : 4385 )

// Report warning 4164 as an error.
#pragma warning( error : 164 )

Filed under: General No Comments
5Jan/090

C++ Design Pattern: What is a Design Pattern?

Design pattern is one of most advanced and sellable programming skills. Every programmer should have it in there resume. Design patterns are neutral to programming language, which means you can implement same in any language. since this site is dedicated to C++ only (as for now), you will find this link interesting:-

C++ Design Pattern

This thread is started by MSMVP Cilu.

Filed under: General No Comments
2Jan/090

Key Driver Concepts

Here are some basic concept/whitepaper from microsoft of kernel mode programming/ driver development.

Filed under: General No Comments
2Jan/090

C++ for Kernel Mode Drivers: Pros and Cons

Do's and Don't can be find here :-

http://www.microsoft.com/whdc/driver/kernel/KMcode.mspx

Filed under: General No Comments