flat assembler
Message board for the users of flat assembler.

Index > Windows > Changing BGColor of Edit-Fields

Author
Thread Post new topic Reply to topic
kasake36



Joined: 28 Mar 2006
Posts: 68
kasake36
Hello! I want to change the background-color of an disabled EDIT-Box. I need this for a time-field, like the one you get when changing the date and time by doubleclicking on the current time in the Windows-taskbar.

Such a time-field consist of a disabled EDIT-Field in the background, which provides the border. Inside this EDIT-Field there is another EDIT-Field without border for the hour-input, and another borderless EDIT-Field for the minute-input. These enabled EDIT-Fields are seperated by a STATIC-Text-field containing the ":".

I'm new to debugging and tried to use OllyDbg to debug this Microsoft date/time-changer program, but can't find out how they did...? There are several painting instruction, the most possible one to me seems to be FillRect and/or SetBkColor...

Inside the Fresh-IDE->Options->EditorOptions there's such a edit-field that get's colored... by sending a FM_SETCOLOR message, which is not defined in the standard FASMW...

Thx for your help!
Post 04 May 2006, 08:03
View user's profile Send private message Reply with quote
shoorick



Joined: 25 Feb 2005
Posts: 1605
Location: Ukraine
shoorick
there is a two ways to do it:
1.process WM_CTLCOLORSTATIC message, sent by disabled/readonly editbox, and set colors to it.
2.cheating: send WM_ENABLE to it - it will became look like enabled, but stay readonly (i'm using this - i had no yet trouble with this, but it possible can lead to wrong behavior, of course Wink )

regards
Post 04 May 2006, 08:40
View user's profile Send private message Visit poster's website Reply with quote
kasake36



Joined: 28 Mar 2006
Posts: 68
kasake36
I just tried WM_ENABLE, and it rocks Smile Thank you!!
Post 04 May 2006, 08:57
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 YouTube, Twitter.

Website powered by rwasa.