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.)