Solved

[Q]: focus affecting keystroke cursor adjustment

Posted on 1997-11-25
4
221 Views
Last Modified: 2013-11-20
-----------------------------
environment: vc++ 5.0 / win95
-----------------------------

using MFC, we are writing an MDI application with a custom "floating palette" popup window which exists outside and on top of the main frame window, much as the normal CMiniDockFrameWnd/CDockBar/CControlBar implementation serves to work. the reasons we chose to implement this window without using this kind of a setup is (1) we never dock inside the main frame window, so we don't need the overhead of CDockBar, and (2) we wanted to draw a half-height caption bar without the [dimmed-out] mini-system menu icon we get with the CMiniFrameWnd derivative.
0
Comment
Question by:kavan
[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
4 Comments
 

Author Comment

by:kavan
ID: 1310837
this is a (hopefully) better explanation of my previous question.
0
 
LVL 3

Expert Comment

by:jaba
ID: 1310838
You have to dispatch WM_NCACTIVATE message to prevent toolbar activation.
0
 
LVL 10

Expert Comment

by:RONSLOW
ID: 1310839
I would go back to the MFC CDockBar etc classes.

Your reasons for not using them were:

(1) didn't want the overheads...
I don't see how that would be a problem as the code is all in MFC dll's anyway, so its there whether you use it or not.

(2) want to get rid of system menu...
You can do that anyway - see http://www.codeguru.com/toolbar/no_sysmenu.shtml for an idea on how to do it... The key is
pMiniFrame = GetParentFrame();
pMiniFrame->ModifyStyle(WS_SYSMENU, NULL);

0
 
LVL 10

Accepted Solution

by:
RONSLOW earned 100 total points
ID: 1310840
Look at the PreTranslateMessage for CControlBar.

It does some magic to ensure that the owning windows get a look in first...

      while (pOwner != NULL)
      {
            // allow owner & frames to translate before IsDialogMessage does
            if (pOwner->PreTranslateMessage(pMsg))
                  return TRUE;

            // try parent frames until there are no parent frames
            pOwner = pOwner->GetParentFrame();
      }

I suggest you try something like that yourself .. in face, I'd copy the PreTranslateMessage from the CControlBar and remove the bits that don't effect you and see how that goes.

Without your source code for your special palette bar, there is little else I can offer.

0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

623 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