This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Windows border fix (while developing on Windows)


Windows border fix (while developing on Windows)

Postby akhromov » Feb 7, 2002 @ 7:07am

akhromov
 


Postby jim » Feb 7, 2002 @ 10:32am

jim
 


Postby Dan East » Feb 7, 2002 @ 4:30pm

You should be able to delete lines 17 and 19 for the exact same result.

Dan East
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Postby Digby » Feb 7, 2002 @ 5:03pm

You should be using GetClientRect, followed by ClientToScreen. If you do this it will work on all versions of Windows. You should never hard-code the size of UI elements in your app.
Digby
pm Insider
 
Posts: 1011
Joined: Apr 29, 2001 @ 1:53pm


Thanks Digby

Postby akhromov » Feb 7, 2002 @ 5:19pm

I agree 100% with you Digby.

In fact, I just found that the coords were in fact off on NT. (Must be the different border sizes of XP versus NT, etc.)

I also looked up the GetClientRect function shortly after I posted. So the original fix was more of cludge if nothing else.

However... how about putting this into the update() code? Just my 2 cents.

Andre
akhromov
 


Yet more drivel...

Postby akhromov » Feb 7, 2002 @ 5:59pm

I hacked around a bit more and seemed to fix the problem on NT (will have to try it on XP and the 3800 later today).

All I did was call ScreenToClient() with the POINT that was returned for the GetCursorPos(). This gave me good coords.

Now I am wondering about the MENU_HEIGHT thing that Phantom is doing, and read on MSDN that you have to account for it. So maybe now that I fixed in on NT, it will be off on the PDA.

As, I said, just more drivel... lets hope this is the last of it.

Andre
akhromov
 


Return to Phantom's Forum


Sort


Forum Description

Discuss any of Phantom's projects here (Operation Nutcracker, etc.)

Moderators:

sponge, RICoder, Phantom

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum