TAB not being responded to in modeless

Posted on 1997-09-03
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))

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

Thanks in advance,

Question by:wcornish
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
1 Comment

Accepted Solution

ohell earned 100 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.

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
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.…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

696 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