[help] Windows widths and heights... |
Author: |
Message: |
whiz
Senior Member
Posts: 568 Reputation: 8
– / – /
Joined: Nov 2008
|
O.P. RE: [help] Windows widths and heights...
Ok, I'm adding 6 to the width and 32 to the height, which counter-acts the borders. Seems to work great!
One other thing... is there a way to convert dialog units to pixels, and back again?
|
|
01-06-2010 07:31 PM |
|
|
Spunky
Former Super Mod
Posts: 3658 Reputation: 61
36 / /
Joined: Aug 2006
|
RE: [help] Windows widths and heights...
I think it's all dependant on screen resolution and some other factors, including font from what I've read, but the topics mostly all relate to VB and C++...
EDIT: http://www.freebasic.net/forum/viewtopic.php?p=83555 <-- Might Help
This post was edited on 01-06-2010 at 07:40 PM by Spunky.
<Eljay> "Problems encountered: shit blew up"
|
|
01-06-2010 07:37 PM |
|
|
whiz
Senior Member
Posts: 568 Reputation: 8
– / – /
Joined: Nov 2008
|
O.P. RE: [help] Windows widths and heights...
Looks a bit confusing...
quote: Originally posted by MSDN
MapDialogRect: http://msdn2.microsoft.com/en-us/library/ms645502.aspx
The MapDialogRect function converts the specified dialog box units to screen units (pixels). The function replaces the coordinates in the specified RECT structure with the converted coordinates, which allows the structure to be used to create a dialog box or position a control within a dialog box.
I need to convert pixels to dialog units, not dialog units to pixels...
|
|
01-06-2010 07:55 PM |
|
|
Spunky
Former Super Mod
Posts: 3658 Reputation: 61
36 / /
Joined: Aug 2006
|
RE: [help] Windows widths and heights...
I didn't check, but I thought maybe you could reverse the process?
If this is to convert the units from pixels (from the window) to dialog units (inside the xml), then can't you just force the measurements in pixels? I know it's probably not quite what you want, but it's guaranteed to look the same and will save having to add functions or classes to figure it out for you.
<Eljay> "Problems encountered: shit blew up"
|
|
01-06-2010 08:13 PM |
|
|
whiz
Senior Member
Posts: 568 Reputation: 8
– / – /
Joined: Nov 2008
|
O.P. RE: [help] Windows widths and heights...
That's what I've thought about doing. The user can always change it to dialog units if they want, but if they use the builder, then it'll have to be in pixels.
That's what the builder will look like. Suggestions welcome.
Edit: I really doubt the feasibility of this, but I'm going to ask anyway. Is there a way of working out the co-ordinates of a rectangle drawn with the mouse onto a Plus! window? Would this need a certain control? If this isn't possible, would I be able to record two clicks (one for the top-left, one for the bottom-right)?
Attachment: Interface Writer - Window Builder.png (29.83 KB)
This file has been downloaded 302 time(s).
This post was edited on 01-06-2010 at 09:08 PM by whiz.
|
|
01-06-2010 08:53 PM |
|
|
T-PO
Junior Member
Posts: 60
– / /
Joined: Jun 2004
|
RE: [help] Windows widths and heights...
Looks great!
Keep up the good work!
T-PO
|
|
01-06-2010 09:17 PM |
|
|
Eljay
Elite Member
:O
Posts: 2949 Reputation: 77
– / / –
Joined: May 2004
|
RE: [help] Windows widths and heights...
quote: Originally posted by whiz
Edit: I really doubt the feasibility of this, but I'm going to ask anyway. Is there a way of working out the co-ordinates of a rectangle drawn with the mouse onto a Plus! window? Would this need a certain control? If this isn't possible, would I be able to record two clicks (one for the top-left, one for the bottom-right)?
It certainly should be possible. You would have to deal with drawing the rectangle yourself using GDI or whatever, but you would basically just have to handle mouse messages (WM_LBUTTONDOWN,WM_MOUSEMOVE,etc.) and redraw the rectangle each time. Unfortunately there's no magic control that does this for you that I know of, but it shouldn't be too hard to implement.
|
|
01-06-2010 09:31 PM |
|
|
whiz
Senior Member
Posts: 568 Reputation: 8
– / – /
Joined: Nov 2008
|
O.P. RE: [help] Windows widths and heights...
Hmm... I'll have to think about it. For now, I need some sleep and preparation for exams.
|
|
01-06-2010 09:49 PM |
|
|
matty
Scripting Guru
Posts: 8336 Reputation: 109
39 / /
Joined: Dec 2002
Status: Away
|
|
01-06-2010 11:10 PM |
|
|
whiz
Senior Member
Posts: 568 Reputation: 8
– / – /
Joined: Nov 2008
|
|
01-07-2010 02:04 PM |
|
|
Pages: (3):
« First
«
1
[ 2 ]
3
»
Last »
|
|