flat assembler
Message board for the users of flat assembler.

Index > Windows > Window x_pos y_pos are relative to what ?

Author
Thread Post new topic Reply to topic
clamicun



Joined: 04 Dec 2013
Posts: 77
Location: Muenster NRW Germany
clamicun
I create a window ...
"
"
"
invoke CreateWindowEx,0,class,0,WS_VISIBLE,128,128,300,200,NULL,NULL,[wc.hInstance],NULL
"
"
"

;-----------------------

I create a dialogbox ...
"
"
"
invoke DialogBoxParam,[hInstance],1000,HWND_DESKTOP,DialogProc,0
"
"
"

resource dialogs,\
1000,LANG_ENGLISH+SUBLANG_DEFAULT,MainDialog

dialog MainDialog,'Nothing',128,128,300,200,DS_MODALFRAME
enddialog

;-----------------------

everything is ok,
but...

The position and the size on the screen are definitely not the same !!

Seems that only the createwindow coordinates correspond to my grafikcard (1280x800).

Where is the secret ?
Post 18 May 2014, 20:28
View user's profile Send private message Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1419
Location: Toronto, Canada
AsmGuru62
The dialog coordinates AND sizes of all controls on the dialog are in so called "dialog units" -- not pixels as in case of CreateWindowEx.
This will help:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms645475(v=vs.85).aspx
Post 18 May 2014, 22:12
View user's profile Send private message Send e-mail Reply with quote
clamicun



Joined: 04 Dec 2013
Posts: 77
Location: Muenster NRW Germany
clamicun
AsmGuru,
thank you. I knew, it was something easy and logic like that
Post 18 May 2014, 22:42
View user's profile Send private message 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. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.