Re: get mouse position in win32
- Posted by David Gay <moggie at INTERLOG.COM> Nov 14, 1998
- 1302 views
>To all of you saying that Win32 programming is difficult, Here's my answer :> It's not so much the programming that is hard, it's how a Windows environment is so different from a DOS environment that can confound a person not familar with it, even if the person has programmed in DOS for a while. I've been programming for nearly three years professionally and 17 years personally, using languages like C, RPG, and Assembler, all of which under a non-GUI system. I find DOS programming is easier because basically you design everything from database management to graphics in your program. And if the program aborts, it does so cleanly, and you know you do not have to look far for the cause: your source. Because of the way DOS programs run, a newcomer to programming can learn quickly. There are many entry level tutorials out there. In Windows programming, you deal with programming modules you didn't write in order to invoke functions like the GUI. If your program aborts, it could be because of your source, or it could be because of the module you tried to call. The way Windows reacts to a programming abort is mortifying. It's like a tenant in an apartment breaking wind and the apartment collapses (pardon the humour) because of it. And just try to go on the Internet or in a bookstore to get a primer for the newcomer programmer regarding the Windows API. I say try because there is currently no such thing. Windows API programming is not for entry level programmers. That's why we have languages like Visual Basic that use a interface to handle the hard work using a form layout. We need to keep a perspective here. Win32 programming is more of a challenge. While David Cuny has done a great job on creating a library that simplifys Windows programming, you still need to know about parent and child windows, controls. and other aspects of Windows programming not found in DOS. If you do not know that, even using David's library will be difficult at first. To answer your last question, yes, you can write a DOS program that can simulate the same GUI features found in Windows without using the API. My tutorial on Euphoria is completely mouse-driven and relies on a clickable interface, though it is primitive compared to David Cuny's DOS32Lib. Yes, I had to write every line of code that performed the GUI interface in the tutorial, but it can be done. DOS programmers are not handicapped when it comes to GUI programming. This is not to sound anti-Windows Programming. I like to remind everyone I am currently seeking info on the Windows 9x environment. I even picked up a book strongly recommended by a recent Windows convert called "Teach Yourself Windows 95 Programming In 21 Days" by Charles Calvert and have found it so far very helpful. David Gay http://www.geocities.com/SiliconValley/Vista/4346 A Beginner's Guide To Euphoria