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

Push button won't underline letter

tmcole
Beginner
1,072 Views
Weirdest thing - I was using the &ID_button naming convention to underline a letter that the user can type in and the button will be selected. Everything worked fine for a while. Then all of a sudden, the underlined letter on all my push buttons disappeared when the dialog box came up. All of the push buttons are underlined when I edit the dialog box, but they don't show up when the program is run anymore.

I haven't the faintest clue as to what could be causing this. I went back and removed all &'s and then started to implement this option one button at a time, but this didn't solve anything. Nothing will underline anymore in the dialog box when it is running. I even tried it on the same workspace on another computer and no luck. As I said, this is really weird behavior. Thanks for any help.
0 Kudos
6 Replies
Jugoslav_Dujic
Valued Contributor II
1,072 Views
Perhaps the culprit is

Control Panel/Display/Effects/Hide keyboard shortcuts...

check box? (Win2k & newer)

[Another example how bells&whistles overwhelm usability]

Jugoslav
0 Kudos
Intel_C_Intel
Employee
1,072 Views
An easier way to check is the just press the Left-Alt key - that should make all you & shortcuts reappear.
0 Kudos
tmcole
Beginner
1,072 Views
Thanks to both of you. Jugoslav's fix worked on my Win2000 machine and the left Alt worked on my XP machine (oddly enough, the "Effect" tab is gone in XP). Now I am having another problem. When I type in "r" for run, my program runs, but then no longer accepts keyboard input for any of the enabled buttons such as "Stop". Any suggestions?

Also, I am trying to allow the user to dynamically set the thread priority for the number crunching thread, but I get access violations when I select any of the buttons that redefine the thread's priority level. Is it possible to change the priority level on the fly? Also, I found in the documentation that the THREAD_SET_INFORMATION access right has to be set, but I have been unable to find out how to set this in the documentation. Maybe this is causing the problem?
0 Kudos
Jugoslav_Dujic
Valued Contributor II
1,072 Views
Is it based on ThreadDlg or what? I'll try it on a XP computer tomorrow. I think MS changed something in threading model on XP, but I'll have to look at it.

SetThreadPriority should work flawlessly for threads you create (THREAD_SET_INFORMATION right will be present if SECURITY_ATTRIBUTES is null). However, if you do it outside of the number crunching thread (which you probably have to, since you mentioned buttons), make sure you didn't call CloseHandle on thread handle before that. Other than that, I can't think of a reason for Access Violation.

Jugoslav
0 Kudos
tmcole
Beginner
1,072 Views
Well, I have found at that the callback routines are persnickety about what their arguments are, which was causing the error. With that fixed, everything is working now except that the keyboard shortcuts are not working once the number cruncher is running. It's not that the computations are hogging all CPU cycles as I get an error beep when I type in any of the keyboard shortcut keys. Any other thoughts? FYI, the reason why the underlines just all of a sudden disappeared is that I was saving screen shots of the dialog box for documentation and apparently using the Alt-Prt Src combination turned off displaying the keyboard shortcuts.
0 Kudos
Jugoslav_Dujic
Valued Contributor II
1,072 Views
As to keyboard shortcuts, I'm at loss now. Error beep occurs when there's no matching command for pressed Alt+something shortcut. Perhaps there's something disabled? Does mouse click work instead?

As to Alt+PrtScn, I'm shocked. I'm glad that I have good ol' Win 2000 :-).

Jugoslav
0 Kudos
Reply