Tooltips not working in MFC extension DLL dialogs

Anyone have a clue as to why my propertysheets do not display tooltips
when they are executed from an MFC extension DLL, but work OK when they
are not bundled into the DLL, but are classes in the app itself? This
is really bugging me, and I have found no coherent answer in my net
searches. My DLL even exports an CWinApp class that I am deriving from
to get my app, so I would think that any resource handle-related reason
is moot. Also, The prop sheet uses the desktop wnd as the parent/owner.
Could it be related to this somehow, even though it works fine when not
in the DLL? I have read that AfxGetMainWnd() returns NULL in a DLL, so
could it be related to this somehow?

0
1/17/2006 4:27:56 PM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
513 Views

Similar Articles

[PageSpeed] 39

> I have read that AfxGetMainWnd() returns NULL in a DLL, so
> could it be related to this somehow?

This should not happen in a Extension DLL. It will happen in a Regular
DLL if you dont have the proper state (AFX_MANAGE_STATE). Is it NULL
for you?

---------
Ajay Kalra
ajaykalra@yahoo.com

0
ajaykalra (6842)
1/17/2006 4:35:13 PM
No, it is returning the proper value. After further debugging, it turns
out I am calling IsDialogMessage() within PreTranslateMessage() and
this is preventing the tips only in the DLL case. Pretty strange...

0
1/18/2006 3:46:30 PM
Reply:

Similar Artilces:

combo box control issue - working fine in '03,
when I add a new record on the form via VBA - and then go to the combo box control, the control tip shows properly, but the cursor is not blinking. can not type anything into the box. when I click on the box, all is ok. any ideas as to what is wrong? works fine in access 2003. thx Make sure that you have at least the first 2 service packs in Access 2007. There was a combo box dropdown problem that I think was fixed in SP2. If you still have the problem, try SP3. -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.accessmvp.com http://www.mvps.org/access &...

How to use a DLL!?
Hi all, according with your experince: 1. I'm exporting class functions from DLL instead of global function, is there something i've to check!? 2. I need to run a DLL func in a separate thread, at moment the app create the thread and exec this func. I actually prefer the DLL to start the thread, any problems doing so!? Thanks you all!! Ale ...

Please Help: Toolbars in DLL Dialog
Hello, Creating toolbars in an EXE app is a relative piece of cake. However, I am trying to insert a toolbar into a DLL dialog. This is how my DLL dialog works: 1) Contents of a function exporting a dialog AFX_MANAGE_STATE(AfxGetStaticModuleState()); CSvg* dlg; try { dlg = new CSvg(); dlg->Create(IDD_MAIN_FRAME); dlg->ShowWindow(SW_SHOW); } catch (CSvg *dlg) { dlg->PostNcDestroy(); delete dlg; } 2) Use a function in my Dialog class to insert a toolbar: int CSvg::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CDialog::OnCreate(lpCreateStruct) == -1) return -...

"Microsoft Outlook Stopped Working" error
Hi all, may I firstly apologise if I seem stupid in anything I say here; I have always used another PIM programme in the past with only the occasional dalliance with any version of Outlook. I am running Vista (Fully updated) Home Premium on a Tosh laptop (32 bit) 1.73 Gb 2GM Ram. I recently installed Outlook 2007 (I also have Office Home & Student 2007 (service desk edition?) which I have been using for a year or so.) The problem is that I keep getting this error when using Outlook. (for example 4 time in 15 mins). I have removed the programme (to ensure no trace o...

Microsoft Active Directory
I am getting the following error when trying to modify anything on the Exchange General Tab of a user object: The operation failed. ID no: 80004005 Microsoft Active Directory - Exchange Extension I believe this is a permissions issue. Any ideas? Does this happen to all user objects ? What permissions do you have ? Are any of the fields on the user object not completed i.e. initials, first name, display name etc as per http://support.microsoft.com/kb/314034/en-us Regards Paul Ford Edge IT Ltd "COT-AD" <COTAD@discussions.microsoft.com> wrote in message news:C50D72ED-...

OWA not work properly
When users go to http://sitename/exchange they get the yellow OWA screen without the graphics. If I enter username, I get "HTTP Error 404 - Not Found". I have NT 4.0 SP6a, Exchange 5.5 SP4, and IIS 4.0 with all the latest updates. In Internet Service Manager, in the Default Web Site properties, I have the redirect to the above URL in the Home Directory tab. Under the Directory Security tab I have both Anonymous and Challenge/Response. In the Exchange folder properties (in Internet Service Manager) under the Virtual Directory tab I have the Local Path "c:\exchsrvr\webdata&quo...

Mouse scroll not working in Module window
Access97 on HP Laptop on XP Pro Since installing Office 97 on my new (replacement) laptop I find the mouse scroll button does not work in the Module window - works everywhere else in Access ok? Any ideas appreciated. Piri yeah don't use ancient software, kid "Piri" <wiremu.pareiha@hotmail.com> wrote in message news:1178247184.740213.222110@y5g2000hsa.googlegroups.com... > Access97 on HP Laptop on XP Pro > Since installing Office 97 on my new (replacement) laptop I find the > mouse scroll button does not work in the Module window - works > everywhere else i...

Selecting Pics in Explorer, then "Send via e-mail" doesn't work...
I'm sure this has been addressed, but I haven't found it in a search. I'm running Outlook 2007 and it worked fine with XP - since I've upgraded to Windows 7, I can't select *any* files in explorer and send them via e-mail. Nothing happens, then I can't get Outlook to start under any circumstance unless I reboot. I need to create a new e-mail, then select the files...and it works fine, but it's a giant PITA. Any help: Sounds like it is caused by a corruption or an incompatible add-in. Which add-ins do you have installed? Tools-> Trust Center-&g...

HQ Options not working
Hi! When I open the HQ Configuration window, there is a list of Checkboxes for "Enabled" - "Disabled" for : - Automatically create inter-store receive inventory order - Automatically create inter-store issue inventory order and other! This window doesn't work, and when accepting changes, and open the window again, all checkboxes are clear!! And of course, those options do not work neither! I'm working by lauching inter-store trasnfers from HQ, but would like to have stores deciding this by its own. Anybody know something about this. Maybe how to set this featu...

dialog based app & command line
Hello, I'm trying to launch my application with command line arguments, but I received an error, without any identification number of it. The MessageBox tolds me: "Runtime error" "the path to my exe file" "This application has requested the Runtime to terminate it in an unusual way. Please contact...". Have somebody a ideea where is the problem? Thank you a lot in advance, Alex PS: When I debbutg the appllication with command line args. from project properties the app. starts very well Try setting the start command line options fro...

Button form control does not work
I have spent over 5 hours trying to get the button wizard to do a simple thing. Open a form and show data in that form that matches the name in the form where the button is but when i follow the wizard the button allways go to the first entary in the second form eg i have the form (form1) open on emma (record 3) and want to open a second form that also contains emma the wizard puts the following in to a macro form2, Form, , "[Full Name]=" & [Full Name], , Normal but when i test the button it open the second form with the first record which is not emma why d...

will RMS 2.0 work with Windows 7
Has anyone tried using RMS 2.0 with Windows 7? What version RMS are you using? Yes 2.0.0126 -- Maurice Gordon Maurice@americanretailsupply.com Sales/Support 1-800-426-5708 XT 1307 "Larry" <Larry@discussions.microsoft.com> wrote in message news:0E0D2035-1FB0-497E-8F73-AF5FDA947E64@microsoft.com... > Has anyone tried using RMS 2.0 with Windows 7? What version RMS are you > using? Hi Larry, RMS 2.0 SP2 working fine with windows 7 Vijay "Larry" wrote: > Has anyone tried using RMS 2.0 with Windows 7? What version RMS ar...

can't delete DLL
Hi, I wrote a very simple dll and through VC++ debug, I can see it has already call destroy() when my host program exit; But I find I can't delete it in folder. it maybe means it is still in use. but I have already free it. Anyone can give a clue, where's my problem? I use XP + VC++. BOOL init() { return true; } static void a() { } static void b() {} void destroy() { } BOOL WINAPI DllMain(HINSTANCE hInst, DWORD fdwReason, LPVOID lpvReserved) { if (fdwReason == DLL_PROCESS_ATTACH) return init(hInst); if (fdwReason == DLL_PROCESS_DETACH) destroy(); return TRUE; } ...

Translation: .123 file extension to Excel 2003?
I received a file with this extension - more familiar with.wk_, extensions- can't translate to Excel. Please advise me - Thanks ...

How a Tooltip can be displayed?
Goodmorning, How can a tooltip can be displayed when we hover the mouse over specific cells? Thanks in advance for your time I'm not sure about a "tooltip" specifically, but you can click Insert/Comment from Excel's menu bar and put whatever text you want to display in the Comment Box that appears and it will be displayed any time the mouse is over that cell. -- Rick (MVP - Excel) "amateur" <amateur@discussions.microsoft.com> wrote in message news:520FCF85-B62A-40E6-A8E6-5D0C14630C59@microsoft.com... > Goodmorning, > > How can a tooltip c...

Good MFC Book
I have taken a few courses on C/C++ but they never taught me how to make programs with real GUI. We always used the command prompt. So I've decided that I'd like to learn to use MFC. I have noticed that there are several MFC tutorials and articles online, but I'm really looking for some suggestions on a good book. Nothing aginst the online versions, but they can be rough on they eyes after a while. Can anyone give me a few good book suggesions? I have an excellent understanding of C/C++ control structures, classes, etc. so I am looking for a book that goes right into the g...

saved passwords not working
I have 4 email accounts in outlook 2002. Everytime Outlook is started, it prompts me for my passwords on each account, even though they are saved. It only does this when it is started for the first time and it saves the passwords for the rest of the session. But, the next time Outlook is restarted, it prompts me for the passwords again. I have SP2 installed and have searched the support KB for this problem. Anyhelp would be appreciated. Carley@CarleyCapers.com ...

Disabling a CButton in a dialog
Hallo, I want to disable a button directly after clicking on it with this code: void CElternDialog::OnBnClickedEdit() { CButton* pbEdit = (CButton*)GetDlgItem( IDC_EDIT ); pbEdit->EnableWindow( FALSE ); ... GetDlgItem( IDC_NAME1 )->SetFocus(); } At runtime the button text looks 'grayed' and the button is disabled. The focus is in the desired control, but the clicked button has a bold black frame like it is if it were the BS_DEFPUSHBUTTON style. Before clicking the button hadn't the black frame. Is it necessary to 'repaint' the disabled button to prevent...

Scrolling not working in spreadsheet (Excel 2000)
Good afternoon. We have Excel 2000 running on Windows 2000. I have a spreadsheet with a column that is filtered by Status - Open or Closed. If I am showing the 'Open' items, I can page up and down, use the up/down arrows and the mouse to scroll up and down in the document. If I show the 'Closed' items, none of the scrolling options work. The scroll bar on the right indicates that I'm 'moving' down in the document, and the cell reference in the upper left corner changes (as does the display of the cell contents) but all I see on the screen is the first page. An...

TimerInterval not working
I have an access db application which needs to call the macro on startup. The macro is to call the function opening two forms on startup and set the TimerInterval of two forms. Public Function auto_login() DoCmd.OpenForm "frm_A" Forms![frm_Import&Export].TimerInterval = 300000 DoCmd.OpenForm "frm_B" Forms![frm_TREATS_ftp].TimerInterval = 120000 End Function However only the Timer for form B (at the toppest) works. It works for form A but not B if I open form B first and then A later. Is there any way to solve the problem? Regards Caris Caris, This seems a litl...

Re: Suggest Name Now Not Working
"Karl Burrows" <kfb1@spambellsouth.net> wrote in message news:... > My bad, it's the automatic name checking I use, not the suggest name. I get > confused between the two. Name checking is the one you get the red or green > underline squiggle to right-click and complete the email address. > > It's been a long week! > > PS Just got your Outlook Programming book. > > "Sue Mosher [MVP-Outlook]" <suemvp@outlookcode.com> wrote in message > news:OIBsc8XgEHA.3864@TK2MSFTNGP10.phx.gbl... > > Did you check your setting in T...

On-line quotes server does not work
OK - there are numerous posts in this Newsgroup stating that the on-line update to stock quotes and news does not work - everyone getting the "unable to connect to quotes server" error. Is it working for anyone? I switched from Quicken to Money and I'm about to switch back - at least Quicken can do something as simple as downloading quotes from a server reliably. Anyone home at Microsoft? On Tue, 3 Feb 2004 21:40:12 -0800, "Anyone home at Microsoft? Hello?" <fbella@aol.com> wrote: > >OK - there are numerous posts in this Newsgroup stating >that...

does any one know how to convert a scanned sheet to a work sheet
does any one know how to convert a scanned sheet to a workable sheet in excel You could use OCR (optical character recognition) software to convert the image to text that could then be loaded into cells. My experience with OCR software has not been entirely satisfactory. Unless this is a large sheet, it may be easier to retype. Jerry bigjoe44 wrote: > does any one know how to convert a scanned sheet to a workable sheet in excel ...

verify that a dialog box exists
I want to verify that a dialog box exists before I send it some message. I have a pointer to its object. Can someone remind me please? Thanks George > I want to verify that a dialog box exists before I send it some message. I > have a pointer to its object. > Can someone remind me please? > if(pDlg && pDlg->m_hWnd) { .... } --- Ajay > I want to verify that a dialog box exists before I send it some message. I > have a pointer to its object. > Can someone remind me please? > You can use ASSERT_VALID as well. It works in Debug only but its of great...

MFC Extension DLL problem
Hi, I created a DLL to make use of a preexisting MFC application. I want to use some dialogs, views and some other stuff from it. Except for some linker warning I got the dll compiled. If I now start using a dialog from the DLL I get an Debug Assertion Error, when exiting my client application. The Expression is: _CrtIsValidHeapPointer(pUserData) and the error was triggered in dbgheap.c . So, I assume I have a memory leak somewhere. Do anyone have an explanation for this? After researching a bit, it occured to me that I have two heaps, one for the DLL and one for my client application. I th...