Реферат: Borland C++ для Windows
class TMyWindow : public TFrameWindow
{
public:
TMyWindow(char *title):TFrameWindow(0,title)
{}
protected:
void EvLButtonDown(UINT,TPoint&);
DECLARE_RESPONSE_TABLE(TMyWindow);
};
DEFINE_RESPONSE_TABLE1(TMyWindow,TFrameWindow)
EV_WM_LBUTTONDOWN,
END_RESPONSE_TABLE;
void TMyWindow::EvLButtonDown(UINT,TPoint &point)
{
TClientDC dc(HWindow);
TColor forecolor(TColor::LtCyan);
dc.SetTextColor(forecolor);
char buf[20];
wsprintf(buf,"[%d,%d]",point.x,point.y);
dc.TextOut(point.x,point.y,buf);
}
class TMyApp : public TApplication
{
public:
TMyApp():TApplication()
{}
void InitMainWindow()
{
MainWindow=new TMyWindow("Use the left mouse button");