View Single Post
Old 02-25-2004, 12:08 PM   #13
Jim Sachs
Developer
 
Jim Sachs's Avatar
 
Join Date: Dec 2000

Location: Southern Oregon
Posts: 9,775
You can't really blame MS for this one (believe me, I'd love to blame them for everything -- including Global Warming!). They have built all the hundreds of lines of code into the OS for clicking, dragging and resizing windows. The key to all this is the window border. When you click into a window, the border lights up -- you know that window is active and all keystrokes and mouse movements are directed to that window. The WS_THICKFRAME argument turns all this on when calling the CREATEWINDOW function.

Without these built-in Windows functions, the program has to constantly check many items: Where is my window on the screen? Where is the mouse pointer? Is my window the active one? Is the mouse pointer somewhere within my window? Is the left mouse button pressed? If yes to all of the above, then: For each change in the x,y position of the pointer, make a corresponding change in the x and y values for the upper left and lower right positions of the Aquarium window.

And that's just dragging (the easiest).

I'm not saying it's impossible, just that there are a lot of factors to consider.
Jim Sachs
Creator of SereneScreen Aquarium
Jim Sachs is offline   Reply With Quote