Win32 API demo (true event loop)

Machine-specific discussion
Unix, Linux, OS X, OS/2, Windows, ..?
Locked
Cyril
Posts: 183
Joined: Tue Oct 30, 2007 6:27 pm
Location: Moscow, Russia
Contact:

Win32 API demo (true event loop)

Post by Cyril »

I've tried to write the "complete" Windows application in newLISP, just as a demo, or proof of concept. I mean, with an event loop and such. The hard part is, that newlisp.exe is already a console application, and you cannot establish an event loop in console window (in fact you can, but the results are hardly predicable). So the trick is to create another window and create an event loop there. So, the application that "does nothing" is 80 LOC. It can found be here. It is basically a clone of a demo found here, translated form C++ to newLISP. I believe it can be a useful learning tool (it was for me definitely!). Probably I should add more comments to the code.
With newLISP you can grow your lists from the right side!

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Re: Win32 API demo (true event loop)

Post by Lutz »

Thanks for this well done intro to GUI programming on Windows. I have linked to it from here:

http://www.newlisp.org/index.cgi?Tips_and_Tricks

m35
Posts: 171
Joined: Wed Feb 14, 2007 12:54 pm
Location: Carifornia

Re: Win32 API demo (true event loop)

Post by m35 »

Thanks Cyril! It took me many years before I finally understood how to make a 'real' win32 application. Hopefully this will help others understand quicker than I did ;)

Locked