Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Resizing dialog boxes
#1
I am looking for a way to resize windows/dialog boxes.

siz command only gives you an option for width and height. What I am trying to do is splice the left and right sides of a window. So for example, if the width is 500 pixels, I want to remove 100 on the left and 100 on the right.

Is there a command for this?

Thank you
Denise
#2
Code:
Copy      Help
int h=win("Quick")
int x y cx cy
GetWinXY h x y cx cy
if(cx>=500)
,x+100
,cx-200
,MoveWindow h x y cx cy 1
#3
How come when I press F1 on MoveWindow, it does not show Help anymore. I think on 2.1.6 it did.
#4
When you press F1, below are shown several links. In QM 2.1.9 it is

MoveWindow
Search MSDN: Google, MSDN Search
Search Internet: Google

These links now are working. If it looks differently, you probably have an older QM version with outdated link(s) to MSDN Library (they changed the search URL). Download QM 2.1.9. Or, right click there, click "Edit search places for known keyword", and replace the text with this:

Code:
Copy      Help
<b><keyword></b>
Search MSDN: <link "http://www.google.com/search?q=site:msdn.microsoft.com <keyword>">Google</link>, <link "http://search.msdn.microsoft.com/search/default.aspx?query=<keyword>">MSDN Search</link>
Search Internet: <link "http://www.google.com/search?q=<keyword>">Google</link>

, and also, replace text for unknown keywords:

Code:
Copy      Help
<b><keyword></b> (unknown)
Search MSDN: <link "http://www.google.com/search?q=site:msdn.microsoft.com <keyword>">Google</link>, <link "http://search.msdn.microsoft.com/search/default.aspx?query=<keyword>">MSDN Search</link>
Search Internet: <link "http://www.google.com/search?q=<keyword>">Google</link>
Search for constant: <link "http://www.google.com/search?q=%22%23define <keyword>%22">#define</link>, <link "http://www.google.com/search?q=%23define OR enum <keyword>">#define OR enum</link>
<help "::/language/IDP_DECLARATION.html">Finding declarations</help>
#5
Gintaras Wrote:
Code:
Copy      Help
int h=win("Quick")
int x y cx cy
GetWinXY h x y cx cy
if(cx>=500)
,x+100
,cx-200
,MoveWindow h x y cx cy 1


This example doesn't seem to be working. It does not cut the left and right of the window, just the right and moves the window to the left.

What I need is for a way to do both sides equally by 30% each. So for example, if the window is 700, it will remove 210 from the left and 210 from the right. Leaving what is in the center of the window, pretty much.

Am i making any sense? Cry
#6
It should move to the right, because x+100. It would move to the left if x-100.
#7
Well I didn't want the window to move, I wanted it sized. So if the window is 500, remove 100 from left and remove 100 from right.
#8
To cut left, you can scroll client area. Most dialogs can be scrolled this way, but most windows not, because they restore itself.

Example macro Macro334

Code:
Copy      Help
dll user32 #ScrollWindow hWnd XAmount YAmount RECT*lpRect RECT*lpClipRect

int h=ShowDialog("Macro334" 0 0 0 1)
opt waitmsg 1
1
int x y cx cy
GetWinXY h x y cx cy
if(cx>=500)
,x+100
,cx-200
,ScrollWindow h -100 0 0 0
,MoveWindow h x y cx cy 1
2

;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 381 137 "Form"
;1 Button 0x54030001 0x4 6 118 48 14 "OK"
;2 Button 0x54030000 0x4 58 118 48 14 "Cancel"
;3 Static 0x54000000 0x0 4 56 48 12 "Left"
;4 Static 0x54000000 0x0 168 56 48 12 "Center"
;5 Static 0x54000000 0x0 330 56 48 12 "Right"
;END DIALOG
;DIALOG EDITOR: "" 0x2010901 "" ""


Forum Jump:


Users browsing this thread: 1 Guest(s)