?
Solved

Tooltips in a DLL

Posted on 1997-11-21
5
Medium Priority
?
494 Views
Last Modified: 2013-11-20
I've got an MFC DLL that creates a CFrameWnd with a couple of toolbars in it.  The toolbars work fine, but for some unknown reason (to me), their tooltips don't.  I create the toolbars in my CDerivedFrameWnd::OnCreate() function like this...

m_wndFormatBar.Create(this, WS_CHILD | WS_VISIBLE |
  CBRS_TOP | CBRS_TOOLTIPS | CBRS_FLYBY,   IDR_FORMATBAR);

Since I'm using CBRS_TOOLTIPS, I'm not sure why they're not displaying.  I've got tooltips assigned to each button on the toolbar.  Incidentally, if I use the same CDerivedFrameWnd in an executable, suddenly the tooltips DO work.  But I need to have it working from the DLL.
0
Comment
Question by:nbushman
[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
  • 3
5 Comments
 

Author Comment

by:nbushman
ID: 1310500
Edited text of question
0
 
LVL 15

Expert Comment

by:Tommy Hui
ID: 1310501
It is probably related to the where the string table resources for the tooltips are located. You may have to add AFX_MANAGE_STATE(AfxGetStaticModuleState()) in the function that creates the main frame.


0
 

Author Comment

by:nbushman
ID: 1310502
I had already added the statement...

AFX_MANAGE_STATE(AfxGetStaticModuleState());

... as the first statement in the DLL's only exported function, which is also the function where I create and load my CFrameWnd derived window.
0
 

Author Comment

by:nbushman
ID: 1310503
I had already added the statement...

AFX_MANAGE_STATE(AfxGetStaticModuleState());

... as the first statement in the DLL's only exported function, which is also the function where I create and load my CFrameWnd derived window.

It didn't work.
0
 
LVL 1

Accepted Solution

by:
IgorGrebnev earned 240 total points
ID: 1310504
Probably the tooltips are created during the idle processing. The  regular MFC DLL doesn't obtain automatically the idle processing, you need to call CWinApp::OnIdle of of DLL application object from CWinApp::OnIdle of applixaiton object of execuatable.
Try to create extension DLL. The code in extension DLL work practically the same as if in executable, it doesn't create additional MFC state.
YOur, Igor
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

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 …
Ready to get certified? Check out some courses that help you prepare for third-party exams.
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.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

650 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