flat assembler
Message board for the users of flat assembler.

Index > Windows > moving item

Author
Thread Post new topic Reply to topic
Kicer



Joined: 30 Apr 2005
Posts: 34
Location: Poland
Kicer
Hi

i wanted to move dialog item
so i was trying to find in MSDN Library something about it.
i think i have to use SendDlgItemMessage, but i'm not sure what message i need to send.
i tried WM_SIZE and WM_MOVE with several different wparam and lparam but my item didn't move even a little

what should i do ?

thx in advance
Post 03 Sep 2006, 17:46
View user's profile Send private message Reply with quote
wisepenguin



Joined: 30 Mar 2005
Posts: 129
wisepenguin
could you explain a bit more ?

sounds like you want MoveWindow ?
Post 03 Sep 2006, 18:16
View user's profile Send private message Reply with quote
Kicer



Joined: 30 Apr 2005
Posts: 34
Location: Poland
Kicer
i just don't know what message should i send.
i have a dialog and it's described in resource section
and while resizing dialog's window i'd like to resize and move items also.
Post 03 Sep 2006, 19:54
View user's profile Send private message Reply with quote
wisepenguin



Joined: 30 Mar 2005
Posts: 129
wisepenguin
when handling WM_SIZE
i WM_SIZE to statusbar with same wParam and lParam

for others i use MoveWindow, like edit box, list box etc
Post 03 Sep 2006, 20:26
View user's profile Send private message Reply with quote
peter



Joined: 09 May 2006
Posts: 63
peter
There is no message for this purpose; use MoveWindow and GetDlgItem.

MoveWindow(GetDlgItem(hDlg, ID_CONTROL), x, y, width, height, TRUE)
Post 04 Sep 2006, 10:34
View user's profile Send private message Visit poster's website Reply with quote
Reverend



Joined: 24 Aug 2004
Posts: 408
Location: Poland
Reverend
Let's say a child window is 1/3 parent's width long. When the parent window receives a WM_SIZE message, you need to get LOWORD from lParam (which is equal to new width), and count 1/3 of it. Then Use MoveWindow or SetWindowPos on the child window.
The point is, you have to know the scale of child windows before. When whole window is static you just place buttons so that everything looks nice. But when it is dynamiccaly changinge when responding to WM_SIZE message, the proportions are needed.
Post 10 Sep 2006, 13:21
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
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 vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.