mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-16 06:05:58 -06:00
43 lines
757 B
C++
43 lines
757 B
C++
#include <CtrlLib/CtrlLib.h>
|
|
|
|
using namespace Upp;
|
|
|
|
class MainWindow : public TopWindow
|
|
{
|
|
public:
|
|
MainWindow();
|
|
void LeftUp(Point p, dword keyflags);
|
|
void Paint(Draw &w);
|
|
|
|
protected:
|
|
bool m_clicked;
|
|
Point m_point;
|
|
};
|
|
|
|
MainWindow::MainWindow()
|
|
: m_clicked(false), m_point(0, 0)
|
|
{}
|
|
|
|
void MainWindow::LeftUp(Point p, dword keyflags)
|
|
{
|
|
m_clicked = true;
|
|
m_point = p;
|
|
Refresh();
|
|
PromptOK("!!!");
|
|
}
|
|
|
|
void MainWindow::Paint(Draw &w)
|
|
{
|
|
w.DrawRect(GetWorkArea(), Color(255, 255, 255));
|
|
|
|
if(m_clicked)
|
|
w.DrawImage(m_point.x, m_point.y, CtrlImg::arrow);
|
|
}
|
|
|
|
GUI_APP_MAIN
|
|
{
|
|
MainWindow mw;
|
|
mw.Title("Doubleclick Titlebar").Sizeable().MaximizeBox().MinimizeBox()
|
|
.SetRect(0, 0, 800, 600);
|
|
mw.Run();
|
|
}
|