Исходнный текст приложения.
#include <owl\applicat.h>
#include <owl\framewin.h>
class TMyWindow : public TFrameWindow
{
public:
TMyWindow(char *title):TFrameWindow(0,title)
{}
protected:
void EvLButtonDown(UINT,TPoint&);
void EvRButtonDown(UINT,TPoint&);
DECLARE_RESPONSE_TABLE(TMyWindow);
};
DEFINE_RESPONSE_TABLE1(TMyWindow,TFrameWindow)
EV_WM_LBUTTONDOWN,
EV_WM_RBUTTONDOWN,
END_RESPONSE_TABLE;
void TMyWindow::EvLButtonDown(UINT,TPoint&)
{
MessageBox("You have pressed the LEFT mouse button","Message dispatched",MB_OK MB_ICONINFORMATION);
}
void TMyWindow::EvRButtonDown(UINT,TPoint&)
{
MessageBox("You have pressed the RIGHT mouse button","Message dispatched",MB_OKMB_ICONINFORMATION);
}
class TMyApp : public TApplication
{
public:
TMyApp():TApplication()
{}
void InitMainWindow()
{
EnableCtl3d();
MainWindow=new TMyWindow("Click Me!!!!!");
}
};
int OwlMain(int,char *[])
{
TMyApp app;
return app.Run();
}