ok so I have this code
Code:
 #include <windows.h>  
 #include <winuser.h>  
 #include <iomanip>  
 #include <iostream>  
  

    LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) 
   {
         switch(msg)  
   {  
     case WM_LBUTTONDOWN:  
         SetWindowText(hwndStatic, "You clicked the left mouse button!");   
         break;  
     case WM_RBUTTONDOWN:  
         SetWindowText(hwndStatic, "You clicked the right mouse button!");   
        break;  
        }  
    return 0;
}
And I get these errors:

In function 'LRESULT WndProc(HWND_*,UINT,WPARAM,LPARAM)':
'hwndStatic' undeclared (first use this function)
(Each undeclared identifier is reported only once for each function it appears in.)

Last edited by shabbir; 20Aug2008 at 09:12.. Reason: Code block