flat assembler
Message board for the users of flat assembler.

Index > Windows > DialogBox how do i know that the mouse is over STATIC ?

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 595
Roman
I have on DialogBox STATIC.
If mouse cursor (mouse buttons not pressed ) on STATIC i send text in STATIC.

How do i know that the mouse is over STATIC ?
Post 03 Aug 2013, 09:06
View user's profile Send private message Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr
Roman,

To change its behavior you have to subclass it.
Post 03 Aug 2013, 10:53
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 595
Roman
baldr

Quote:

To change its behavior you have to subclass it.


Wau ! Shocked
Unreally helpfull Smile
Post 03 Aug 2013, 17:53
View user's profile Send private message Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2913
Location: 0x77760000
typedef
Roman wrote:
baldr

Quote:

To change its behavior you have to subclass it.


Wau ! Shocked
Unreally helpfull Smile


Would you like to be spoon fed ?
Pseudo code
Code:
oldStaticProc  dd 0

invoke SetWindowLong, [hwndStatic], GWL_WNDPROC, newProc
mov [oldStaticProc], eax

proc newProc hwnd, msg, wparam, lparam

       ; process your messages herefor this control
       invoke CallWindowProc, [oldStaticProc], [hwnd], [msg], [wparam], [lparam]
ret
endp
    
Post 03 Aug 2013, 18:34
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 2913
Location: [RSP+8*5]
bitRAKE
A search of the board for "subclass" produces a lot of good examples - it's not even a long list to grok.

Even a translation of this classic code...
http://board.flatassembler.net/topic.php?t=879
...no, it's not mine - this time, lol. Very Happy
Post 03 Aug 2013, 19:37
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 595
Roman
Thanks. But i`m done differently. Compared the coordinates static and mouse coordinates.
Post 05 Aug 2013, 10:49
View user's profile Send private message Reply with quote
blacky



Joined: 06 Apr 2006
Posts: 32
Location: JA
blacky
Roman wrote:
Thanks. But i`m done differently. Compared the coordinates static and mouse coordinates.


does your method take into account resolution changes or windows size changes?
Post 24 Aug 2013, 05:49
View user's profile Send private message MSN Messenger Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 595
Roman
Yep!
Post 25 Aug 2013, 08:20
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.

Powered by rwasa.