Simple windowed application: Difference between revisions
Content added Content deleted
(restored the arwen entry (as requested)) |
|||
Line 1,870: | Line 1,870: | ||
IupMainLoop() |
IupMainLoop() |
||
IupClose()</lang> |
IupClose()</lang> |
||
The above is cross platform (win/lnx), 32/64 bit. On request, I have restored the arwen version (win32-only) |
The above is cross platform (win/lnx), 32/64 bit. On request, I have restored the following arwen version (win32-only).<br> |
||
The included demo\edita contains a window painter that lets you reposition/resize this very easily (alas the equivalent for the above is progressing rather leisurely). |
|||
<lang Phix>include arwen.ew |
<lang Phix>include arwen.ew |
||
constant main = create(Window," |
constant main = create(Window,"Simple windowed application",0,0,100,100,300,200, 0) |
||
constant label = create(Label, "There have been no clicks yet",0,main,10,10,250,30,0) |
constant label = create(Label, "There have been no clicks yet",0,main,10,10,250,30,0) |
||
constant btn = create(Button,"Click me",0,main,100,50,100,30,0) |
constant btn = create(Button,"Click me",0,main,100,50,100,30,0) |
||
integer count = 0 |
integer count = 0 |
||
function mainHandler(integer id, integer msg, atom wParam, object lParam) |
function mainHandler(integer id, integer msg, atom /*wParam*/, object /*lParam*/) |
||
without warning |
|||
if id=btn and msg=WM_COMMAND then |
if id=btn and msg=WM_COMMAND then |
||
count += 1 |
count += 1 |
||
Line 1,889: | Line 1,889: | ||
WinMain(main,SW_NORMAL)</lang> |
WinMain(main,SW_NORMAL)</lang> |
||
The without warning just stops messages about wParam and lParam not being used. The included demo\edita contains a window painter that lets you reposition/resize the above controls very easily. |
|||
=={{header|PicoLisp}}== |
=={{header|PicoLisp}}== |