C++ and Win32 Exceptions

What is an exception? Exception is the special condition that changes the flow of normal execution . Some times te exceptions may endf up crashing the appln ,but it can usually be handled using the catch block in the code.     Basically there are two typpes of exception ,one is the h/w exception & [...]

Continue reading →

Problems with C++ assignment operator

Assignment Operator is invoked in following scenarios, where one existing or already constructed object assigned to another constructed object. class MyClass  { int  nSize; char  *szName ; }; MyClass myObj1; MyClass myObj2; myObj1 = myObj2;   // Assignment Operator By default Compiler provides a Assignment operator which will do following operation on assigning myObj2 to myObj1. [...]

Continue reading →

C C++ declaration and definition examples

  Declaration means informing the compiler that you have created a particular type of symbol that is being used by your program. Note: this is just an symbol or name that will be inserted into symbol table during compilation pass. No Memory allocates.   Declaration:   int i;               // Variable declaration or object declaration extern [...]

Continue reading →

Various C/C++ preprocessor directives

Basically in C++ they tried to reduce the usage of preprocesor . In C Its necessary to use the preprocessor statements. All the preprocessor start with thye #. SOME OF THE PREPROC STATEMENTS are #define    #elif   #else    #endif #error     #if    #ifdef   #ifndef #include   #line  #pragma  #undef #define ias generally a replacement of any thing which [...]

Continue reading →

Windows Programming and windows procedure

In old DOS based c programming, we have a program or set of instructions executing in sequential manner. Windows programming is more event based. Applications do the initialization draws windows (for user input) and runs in loop to process the Event sent by operating System. So when we have any event in computer system, typically [...]

Continue reading →

Introduction to Windows process

Every application executing on Windows is a process. Process is running instace of program. It has two components Kernel Object and Address space. Kernel object is being used by OS to manage the process and it has various statistical information about the Process. So using kernel object one can manipulate the process. The process address [...]

Continue reading →

C, C++ entry point function main

For every C, C++ Program there is a entry point function, where program execution starts. Essentially Operating system looks for this function fro where program can be executed. This entry function  is ” main” Default code looks like given below int main ( int argc,  char *argv[]) { return 0; } So this function returns [...]

Continue reading →

CObject : Top MFC base class

  CObject is the topmost  base class of  Microsot Foundation Classes ( MFC). Most of the classes in MFC are derived from CObject class. CObject class provides following functionality. 1. Dignostic support : This is used for debugging and troubleshooting purpose. Such as dumping the contents of Object. 2. Runtime class Identification : Knowing the [...]

Continue reading →

MFC Programming

Microsoft Foundation Classes or MFC is the wrapper classes around Win32 API’s. Essentially they provide the Windows programming in Object oriented ways. They themselves don’t provide any windows functionality but they facilitate the programmers to do windows programming with an ease and rapid development. Somehow windows programing using API are tedious and time consuming. MFC provide [...]

Continue reading →
Page 2 of 5«12345»