News:

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

Custom MessageBox Button Text

Started by dedndave, August 16, 2011, 11:16:09 PM

Previous topic - Next topic

dedndave

thanks Hutch
it is the buttons
if you look at the pic above, one button did not get the uxtheme gradient fill   ::)

hutch--

Dave,

Not here and that is after 4 tries. All button have XP appearance.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

zemtex

Gradient fills are scary stuff, especially in screenshots, it is a hacking feature  :naughty:
I have been puzzling with lego bricks all my life. I know how to do this. When Peter, at age 6 is competing with me, I find it extremely neccessary to show him that I can puzzle bricks better than him, because he is so damn talented that all that is called rational has gone haywire.

FORTRANS

Hi,

   Windows 2000 the standard flat look.  Windows XP, two
CLI starts both, had one "bad" button.  Two double-click starts,
one all good, one had three off buttons.

Cheers?,

Steve

dedndave

thanks for testing, guys   :U

the solution seems to be to put a little delay between thread creations
i re-wrote this one to be a little slower, too   :P

zemtex

Dedndave, custom message boxes can become very fancy, nice little clicky buttons, shiny, quick and fast (With a little magic), but in the end of the day, the transformation from the default windows look to a more customized look, the blend will corrupt the quality of it, despite how nice the message box will look, the quality will become corrupted (magically) and the only way to undo the damage is to customize the entire application, you should switch focus to where it is really needed  :U
I have been puzzling with lego bricks all my life. I know how to do this. When Peter, at age 6 is competing with me, I find it extremely neccessary to show him that I can puzzle bricks better than him, because he is so damn talented that all that is called rational has gone haywire.

dedndave

there is nothing "custom" about it, really
the gradient button is part of the XP uxtheme upgrade   :U
if you have a manifest file and specify Common Controls version 6.0 or higher, you get the gradient buttons


zemtex

If it separates too much from the general preference or native look or parts of your own program it may be wise to switch focus.
I have been puzzling with lego bricks all my life. I know how to do this. When Peter, at age 6 is competing with me, I find it extremely neccessary to show him that I can puzzle bricks better than him, because he is so damn talented that all that is called rational has gone haywire.

dedndave

MessageBox's are modal dialog boxes
normally, they get the focus automatically
for the test, i placed the MessageBox calls in seperate threads
threading them like that has the effect of making them modeless

actually, i just wanted to make a picture with several different boxes at once so i could measure pixels   :P
i am too lazy to modify the program 8 times and copy/paste the pictures together - lol

zemtex

Sounds good. I accept your idea.

For focus, use MB_TOPMOST,MB_TASKMODAL and MB_SETFOREGROUND

That will make sure it doesn't get hidden behind whatever window handle you feed or don't feed messagebox.
I have been puzzling with lego bricks all my life. I know how to do this. When Peter, at age 6 is competing with me, I find it extremely neccessary to show him that I can puzzle bricks better than him, because he is so damn talented that all that is called rational has gone haywire.

dedndave

#55
ahhhhhhhhh.....

DS_USEPIXELS

:8)

well, it sounded good - lol

dedndave

here's a fun little toy...


hutch--

Dave,

Here is a variation on the earlier demo, instead of using a static control, I have used an edit control set to read only which matches the colour of the static but has a scroll bar for text that will not fit into a small viewing area.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

dedndave

i like it   :U

something along that line came to mind when i noticed the SS_EDITCONTROL bit was set in their text static
not sure why they set that bit - it must have to do with how text is formatted
at any rate, providing a scroll bar is probably easier than figuring out how to jam big text in a small hole

i have learned a lot about dialog boxes by playing with this thing
and, i have really only touched on scroll bars, edit controls, buttons, and, now, statics
that is only a small part of the list and i am still a novice in those limited areas - lol (all the easy ones)

and they think i want to learn a new API   ::)

dedndave

ok - new question   :bg

is there a magical formula that tells us the "lead" and line-spacing used in static text controls ?
or do we just wing it ?



EDIT:
i am using the SS_EDITCONTROL style bit
maybe i can find something in the documentation for edit controls...