I have a application with a view that has a tabctrl. The tabpages of this tabctrl are CDialog derived objects. There a several dll's that draw controls on these tabpages (I didn't think this up, my predecessor did ).
Anyhow, the problem is that some of the controls do not receive their messages. E.g. button controls do not receive BN_CLICKED, the same account for spinctrl's. But I can edit the fields of a editctrl. Also when I create an ownerdraw button the WM_DRAWITEM message can not be received.
When I create a similar control in the application itself then this control does receive it's messages. My predecessor create a 'sollution' by overriding the OnCommand of the TabCtrl. This does solve the BN_CLICKED problem but still I do not receive the ownerdraw messages. Anyone got a clue about how to solve this?
Search MSDN for IActiveDesktop interface, it has got methods which help you change the background of Desktop. <edit> I was assuming you where asking about changing desktop background image, if you want to paint your apps window with images, then you can override OnDraw if its a CView based app. to start with </edit>
I have a DLL written in Microsoft C 6.0 to be called by VB 6.0 main program. The VB 6.0 main program is compiled into an exe and copied to the DEBUG folder containing the DLL. When VC debug mode is started, a popup with exe not found is displayed even the VB exe exists in the folder.
Previously the VC Debug does function properly but all in a sudden the debug does not work. Please advise.
I'm breaking up a large application into some DLLs, and I'm having trouble with some dialogs. The DLLs are linked to the app implicitly, and use MFC in a shared DLL (in debug).
The problem is that dialogs internal to the DLL don't appear when I call DoModal(). By tracing the code, I've found that it can't load the dialog template, so the dialog fails to load. I've searched MSDN, but I haven't found anything that deals with dialog resources in an implicitly linked DLL.
What am I doing wrong? Do I have to do something to export the dialog template (and any other resources) when I compile, or do I need to do something in the linking application?
I am basically doing what you've suggested, with two important differences that I can see:
1) The function headers are not 'extern "C"' I just use the regular C++ definitions. I don't think that affects my project, since everything uses C++.
2) The function headers used by the app are not declared __declspec(dllimport). Would this prevent the dialog resources from showing? I doubt it, since the functions I call work just fine.
I can call all the functions I export no problem, without 'extern "C"' or __declspec(dllimport). Yes, the lib is imported into my project (so the dll is loaded implicitly). Basically, my code looks very similar to yours: