Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Unwanted underlines in MessageBox.

llynisa
Beginner
1,187 Views

In the course of developing an enhanced version of Messagebox (MessageBoxH), which amongst other features counts down to autoclosure, buttons in which the text had not been replaced by user-designated strings sometimes exhibited an initial underscore - eg Yes and No.

Examination of the strings showed that they were actually &Yes and &No. Now & is an underline escape character for Menu Items, but is unwanted here. The disease seems to have spread from MessageBoxH to any some but not all subsequent calls of MessageBox itself.

I have stamped out the underlining in MessageBoxH itself, but the problem is still there with subsequent calls of MessageBox. Does anyone have any useful ideas for me please?

Bear of Little Brain

0 Kudos
4 Replies
llynisa
Beginner
1,187 Views

Normally, when I ask about one of my problems on the forum, I almost immediately find the answer and feel as if I am living up to my undersigned handle. But the underlining is still a mystery.

I have developed my MessageBoxH so that the timeout and countdown methods used may also be used in any user-generated dialogue box, and I am now looking for someone to try it out and give me some feedback. To give you a better idea of what MessageBoxH can do, I have (I hope) attached a zip file MsgBox11Aug08.zip. This contains:

1. A demonstration program for MessageBoxH, user-generated dialogue boxes with timeout and countdown, including an example of the underlining induced in MessageBox.

2. Some code scraps showing the calling program, the callback procedures for the user-generated dialogue boxes and the specification section of MessageBoxH.

If anyone would like the full source code to try it out, please let me know.

Bear of Little Brain
0 Kudos
llynisa
Beginner
1,187 Views

In my last post I managed to attach the full source code minus the icons and resourcefile for the user-generated dialogue box. The system does not allow me to attach an .exe file, so if anyone wants the demo program, please get in touch.

Bear of Little Brain

0 Kudos
sabalan
New Contributor I
1,187 Views

The mystery of underlines (mnemonic key) comes from effects settings for your display appearance. Right-click somewhere on your desktop, go to Properties, choose the tab for appearance, click on the Effects button, uncheck next to Hide underlined letters and the mystery is gone! See also this thread.

Sabalan.

0 Kudos
llynisa
Beginner
1,187 Views

Sabalan,

Thanks for that -but checking or unchecking the box next to "Hide underline buttons..." as you describe makes no difference in my case. If I call MessageBox by itself, it displays no underlines; if I call my MessageBoxH first and then MessageBox,MessageBox does display the underlines.

I am pretty certain that it is an effect of what I am inadvertently doing internally in MessageBoxH in accessing and/or replacing the strings displayed by MessageBox, which is the basis of MessageBoxH. The underlines would also appear in MessageBoxH button strings, but Ican suppress them so that it is not a problem there.

Still puzzled

Bear of Little Brain

0 Kudos
Reply