News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Playing around with Cue Banners for edits

Started by donkey, January 06, 2011, 07:48:27 AM

Previous topic - Next topic

donkey

I wanted to make a dialog that contained edit controls to collect information of various types. It is tedious to continually make a static for every edit control to prompt for what data it should contain. With Combo boxes from XP on you can use a Cue Banner that will give the user a hint as to what is expected, I don't know of anything like this for edit controls (though there probably is something). The HintText test program shows how it might be accomplished using subclassing and a bit of message processing. The only real way to make it work is to use the SetWindowSubclass type of subclassing since we can pass a pointer to extra data without using any window memory, which should be left for programmer. I've attached my test piece which demonstrates the concept, in the actual implementation I will probably make the position of the hint text something that can be set but centered text looks so good I might not.

The end result is a dialog that can contain multiple edit controls but does not require a static for each describing its contents.

Edgar
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

jj2007

Looks good, Edgar, and is an interesting technique. Keep in mind, though, that in a more complex dialog the user will not remember the meaning of the fields once they are filled in.

donkey

Quote from: jj2007 on January 06, 2011, 08:10:31 AM
Looks good, Edgar, and is an interesting technique. Keep in mind, though, that in a more complex dialog the user will not remember the meaning of the fields once they are filled in.

Hi jj2007,

Good point. I wrote it for a specific purpose that doesn't have that problem since information is self evident (for example your name). In my application it will contain unique information that can't be confused with other information. I plan to have a tooltip control in mine that reminds the user of what has been entered but for my purposes it isn't really necessary.

Edgar
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable