#include <Windows.h>
class SomeClass
{
public:
typedef void (CALLBACK *SOMEFUNC)();
SOMEFUNC SomeFunc;
};
void __stdcall OnSomeFunc()
{
MessageBox(NULL, L"Hello", L"A test", MB_OK | MB_SETFOREGROUND);
}
int APIENTRY wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPWSTR lpCmdLine, int nCmdShow)
{
SomeClass * myClass = new SomeClass();
myClass->SomeFunc = OnSomeFunc;
myClass->SomeFunc();
delete myClass;
return 0;
}
|