Solved

"Enter" not working in dialog with CreateDialog

Posted on 1998-07-30
5
346 Views
Last Modified: 2013-12-03
The enter key does not activate the default button in a dialog created using CreateDialog() (the spacebar activates the default). This works fine with DialogBox(), what's up? Also, anyway to disable the spacebar from activating the default action? NOTE: not using MFC
0
Comment
Question by:cbabcock073098
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 6

Accepted Solution

by:
WxW earned 20 total points
ID: 1411953
Modeless dialog boxes are NOT checking for Enter or Tab , to fire the default button or to switch between controls . Try to apply WS_EX_CONTROLPARENT to your dialog . If it does not work , you need to capture and handle the Tab and the Enter key .
0
 
LVL 11

Expert Comment

by:alexo
ID: 1411954
Modify your message loop to include IsDialogMessage()
Also See KB articles Q96134 and Q71450

0
 

Author Comment

by:cbabcock073098
ID: 1411955
Thanks for the help. Alexo you were right on with the IsDialogMessage call.
0
 
LVL 11

Expert Comment

by:alexo
ID: 1411956
>> Alexo you were right on with the IsDialogMessage call.
However, you accepted WxW's answer and awarded him the points :-(
0
 
LVL 6

Expert Comment

by:WxW
ID: 1411957
Yes .I agree that Alexo should take the points .
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question