|
-
April 11th, 1999, 07:06 AM
#1
Default Ok buttons gets focus automatically!
I am working with a dialog box with several edit boxes and buttons. When I start to write something in an edit box, the default 'ok' buttons gets the focus automatically, no matter if I had actually jumbed to the edit box from another button(= other button was in focus). So when I press enter the ok button is always executed. I don't want this to happen.
I have changed the tab order but it is not working. I want focus on my last button from where I jumped into the edit box. Please help!
-
April 11th, 1999, 12:13 PM
#2
Re: Default Ok buttons gets focus automatically!
Change the style of the Ok button in your resource file or use the resource editor to change the style. It currently has the DEFPUSHBUTTON style, which is why it automatically gets the focus.
Regards,
Paul McKenzie
-
April 11th, 1999, 12:47 PM
#3
thankx
The problem was grave but the solution easy!
thankx
-
April 11th, 1999, 01:32 PM
#4
Re: thankx
i'm suprised that worked 
add the OnInitDialog( ); message with the class wizzard
and at the end of the source return FALSE; instead
what it does as default by returning true is to put focus on the first Control in the dialog..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|