what is this please ?
the part I don't understand I commented out ...
and here too..but this time not on the constructor but on the class itself...I guess this is a c++ trick..
I understand a class has been made to create a window objects of type WNDCLASSEX.. but that trick there I don't understand...
what does it mean if the scope operator is used in a function like this? does it creates a sort of namespace or something?
[CODE]
void Show ( int nCmdShow )
{
::ShowWindow ( _hwnd, nCmdShow );
::UpdateWindow ( _hwnd );
}
[CODE/]
the part I don't understand I commented out ...
Code:
class WinException
{
public:
WinException (char* msg)
: _err (GetLastError()), _msg(msg) // what trick is this? the : ??
{}
DWORD GetError()
const { return _err; }
char* GetMessage ()
const { return _msg; } // what is constant here? the return value?
private:
DWORD _err;
char* _msg;
};
Code:
class WindowClass : public WNDCLASSEX // here ?
{
public:
WindowClass (WNDPROC WndProc, char const * className, HINSTANCE hInst);
void Register ()
{
if (RegisterClassEx (this) == 0)
throw WinException ("RegisterClassEx");
}
};
what does it mean if the scope operator is used in a function like this? does it creates a sort of namespace or something?
[CODE]
void Show ( int nCmdShow )
{
::ShowWindow ( _hwnd, nCmdShow );
::UpdateWindow ( _hwnd );
}
[CODE/]