View Full Version : Window positions in Asm
CccT
July 20th, 2002, 23:03
Do you know how window positions are
defined ?
I need to know the 2 pushes (X and Y)
for window positions. (inverted notation or not ?)
From my course book : on window dimensions :
... The two decimal numbers that define the DIMENSIONS
of our window 64 & 472 translate into 0x40 and Ox1D8
in hexadecimal. These two parameter (40 & 1d8
dimensions) values are pushed on the stack. In
Assembly, no matter which 'higher' language is used,
no matter which compiler is used, a 'long' push is
68xxxxxxxx (with inverted notation for the xxxxxxxx
address) whilst a 'short' push is 6Axx, and therefore
we get : 68D8010000 = push 000001D8 (note the inverted
notation D801!) and 6A40 = push 00000040 ...
But there is nothing on window positions in it.
CccT
Fake51
July 21st, 2002, 01:53
Assuming you're looking for a createwindowexa struc (the most likely api to be used), here's some info:
HWND CreateWindowEx(
DWORD dwExStyle, // extended window style
LPCTSTR lpClassName, // address of registered class name
LPCTSTR lpWindowName, // address of window name
DWORD dwStyle, // window style
int x, // horizontal position of window
int y, // vertical position of window
int nWidth, // window width
int nHeight, // window height
HWND hWndParent, // handle of parent or owner window
HMENU hMenu, // handle of menu, or child-window identifier
HINSTANCE hInstance, // handle of application instance
LPVOID lpParam // address of window-creation data
);
Given that the pushing order is reversed, you're looking for push # 7 and 8.
Fake
CccT
July 21st, 2002, 15:49
Thanks , now I only need to know the X and Y pushes in Hex for window positions.
For window dimensions they are :
Short push (vertical) : 6A
Long push (horizontal): 68 (followed by inverted notation)
CccT
dinsum
July 22nd, 2002, 11:38
Don't really understand what u're looking for but I guess if the position<256 then short push is used, if position=>256 then long push is used.
Never had anything to do with short/long pushes but as U describe it it's just a way to save some bytes if the value of the pushed dword can be stored in one byte.
CccT
July 22nd, 2002, 18:28
I just want to customize a child window's position with a Hex editor as is decribed in this tutorial for window dimensions :
http://www.searchlores.org/paris/paris6.htm
In case a want to move (and not resize) a window of an existing application.
CccT
dinsum
July 22nd, 2002, 20:49
If you want to do a search in a hex-editor:
Assume an x-position of 0x0215. This is a 2-byte number so it can't fit in one byte. This shall probably be a Long Push so search for 0x6815020000
Assume an x-position of 0x0020 This is a 1-byte number so it fits in one byte. This may be a short push so search fo 0x6A20

Brt
CccT
July 23rd, 2002, 06:11
Yes ! That works. Thanks, you're a nice guy.
In fact, my target is the Opera browser that is available for free :
http://www.geocities.com/ccctournament/Opera.zip
It has an ugly black horizontal bevel line, about half the window in length, in the top right corner, next to the toolbar buttons.
Width 472 Height 4
Left 328 Top 43 (standard display settings)
But I can't find it with my Hex editor.
Please have a look at the downloadable target.
Click right on the toolbar, "Off" is disabled.
You can of course do this in the menu >History>Register and then >File>Preferences>Browser Layout.
But it would be wonderful if the whole toolbar were deleted as default. You can do all navigation with the menus and that would save much space.
CccT
Powered by vBulletin® Version 4.2.2 Copyright © 2018 vBulletin Solutions, Inc. All rights reserved.