Can a control class Monitor its own messages?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
dd900
Posts: 121
Joined: 27 Oct 2013, 16:03

Can a control class Monitor its own messages?

05 Nov 2021, 21:37

Using: Latest AHK_L Unicode x64

I'm not sure how to be more clear with my question.

I have this class
class Checkbox

In this project I'm working on.
MUGEN Quick VS
MUGEN Quick VS.zip
(160.75 KiB) Downloaded 26 times

I would like if class Checkbox was able to handle its own messages. I want highlighting and checking built into the class instead of handling it in the main thread. Currently I'm using a property Checked and the text control's g_label to handle the check mark. I would like to leave the g_label for a Callback function if needed, instead of hogging it up on the check mark code.

Is what I'm asking possible?
If so, how do I go about implementing it?

Edit: Another question relating to the project.
Is it possible to change the highlight color of an edit control?
User avatar
lmstearn
Posts: 698
Joined: 11 Aug 2016, 02:32
Contact:

Re: Can a control class Monitor its own messages?

06 Nov 2021, 23:45

Hi @dd900, does this thread help at all?
For the second issue, certainly, just me showed how to do it with WM_CTLCOLOR back here,
Edit: For highlighted or selected text, not sure. Think you want a rich edit control like this for example. Tutorial.
Edit2: As an alternative, this thread shows how to change the background.
:arrow: itros "ylbbub eht tuO kaerB" a ni kcuts m'I pleH
User avatar
dd900
Posts: 121
Joined: 27 Oct 2013, 16:03

Re: Can a control class Monitor its own messages?

07 Nov 2021, 11:26

lmstearn wrote:
06 Nov 2021, 23:45
Hi @dd900, does this thread help at all?
For the second issue, certainly, just me showed how to do it with WM_CTLCOLOR back here,
Edit: For highlighted or selected text, not sure. Think you want a rich edit control like this for example. Tutorial.
Edit2: As an alternative, this thread shows how to change the background.
Yes actually. That first thread helps a lot.
I appreciate the help.

I have since moved on to C# and WPF for the project, which is part of an even larger project. The UI is much easier to design/control and I can still use autohotkey.dll for things like IniRead which is easy enough in C#, but there is a lot less boiler-plate code using ahk.dll.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot], labrint and 112 guests