Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

TAB not being responded to in modeless

Posted on 1997-09-03
1
Medium Priority
?
281 Views
Last Modified: 2013-12-03
I am working on a program in which I am opening a popup window from a property sheet. The popup window itself opens a modeless dialog box which contains many text edit boxes. While the edit boxes seem to respond normally to most input, TABs will not move focus from one to the next as they should. The TABs work fine within the property sheets. I also do not seem to be able to trap any kind of key down commands.

The message loop in the main window routine has been modified to check if the modeless dialog box is active and if so reroute the message, but it doesn't seem to work. The functions for the popup window & modeless dialog box responded to TABs okay when they were in a test program, but the instant I started calling them from a property sheet routine, they stopped working.

The main message loop is as follows:
  while (GetMessage(&message, NULL, NULL, NULL))
  {
    if (!IsWindow(hwndModeless) ||!IsDialogMessage(hwndModeless, &message))
    {
      TranslateMessage(&message);
      DispatchMessage(&message);
    }
  }

If anyone has any suggestions on where my trouble spots might be, I would appreciate it.

Thanks in advance,

Bill
0
Comment
Question by:wcornish
1 Comment
 
LVL 1

Accepted Solution

by:
ohell earned 200 total points
ID: 1405588
The problem might be that your application uses the messages WM_USER and WM_USER+1. IsDialogMessage() sends DM_GETDEFID and DM_SETDEFID to the dialog box, which are defined to be WM_USER and WM_USER+1, so there is a chance of a conflict.
If it is indeed the case, the problem should go away if you shift the user message ids by 2 i.e start from WM_USER+2.

I hope this helps.
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
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…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

926 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