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: 1807
Roman 03 Aug 2013, 09:06
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 03 Aug 2013, 10:53
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: 1807
Roman 03 Aug 2013, 17:53
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: 2909
Location: 0x77760000
typedef 03 Aug 2013, 18:34
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: 4046
Location: vpcmpistri
bitRAKE 03 Aug 2013, 19:37
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: 1807
Roman 05 Aug 2013, 10:49
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 24 Aug 2013, 05:49
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: 1807
Roman 25 Aug 2013, 08:20
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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.