Posts: 20
Threads: 6
Joined: Aug 2006
ok i want to resize a window just so i c a spot in the middle of the window like on the stock market they have a counter and i want to just have that be the only thing i c i dont ned the rest of the stuff and i have no idea if Qm can do it or not if you could help me that would be great right now i have it where it takes up a third of my desktop and thats no good for me i just want the numbers i used siz and mov but i think there has to be a way to just zoom in on that 1 spot
Posts: 12,061
Threads: 140
Joined: Dec 2002
Capture the control (rectangle that shows the number) using the "Find window or control' dialog (the second Drag image). Move it to the top-left corner of the window, and to the top of the Z order. Then resize the window.
int hwnd=id(??? "window name")
SetWindowPos hwnd 0 0 0 0 0 SWP_NOSIZE
siz 100 100 "window name"
Posts: 1,335
Threads: 61
Joined: Jul 2006
i tried this example but when it resizes the whole window the part i want is not visible.is there a way to cut out all but but the part iwant?
Posts: 12,061
Threads: 140
Joined: Dec 2002
insert
out hwnd
after first line. Is it 0?
Posts: 1,335
Threads: 61
Joined: Jul 2006
Posts: 1,335
Threads: 61
Joined: Jul 2006
Posts: 12,061
Threads: 140
Joined: Dec 2002
If you don't use siz, you can see where finally is the control. Is it moved to the top-left corner of the window? If not, probably it is not direct child. Try this:
int hwnd=id(??? "window name")
rep
,SetWindowPos hwnd 0 0 0 0 0 SWP_NOSIZE
,hwnd=GetParent(hwnd)
,if(GetWinStyle(hwnd)&WS_CHILD=0) break
siz 100 100 "window name"
Posts: 1,335
Threads: 61
Joined: Jul 2006
that did it ty vm 4 your help