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
Solved

"Enter" not working in dialog with CreateDialog

Posted on 1998-07-30
5
340 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
  • 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

This article shows a few slightly more advanced techniques for Windows 7 gadget programming, including how to save and restore user settings for your gadget and how to populate the "details" panel that is displayed in the Windows 7 gadget gallery.  …
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
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…

792 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