Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » Problem related with use for urs library in ATL Collapse All
Subject Author Date
Amit Apr 23, 2003 - 8:03 AM

hi

I am creating a composite control in ATl with MFC support using yous extension classes( using Freeware version).
In control i am using CExtControlBar and call the create function of it and pass handle of control window to it.

When i create the control in SDI application , the application is not responding when the control is reached to creation of control bar window.

So will u pls. tell me how to create a control by using your library in ATL.
And the client should be in SDI/MDI application using MFC.

So pls send the solution for that.


Thx
Amit




Sergiy Lavrynenko Apr 24, 2003 - 10:18 AM

Hi Amit,

There are two types of MFC-based DLL modules:
1) MFC extension DLLs (like Prof-UIS) – these DLLs have no own global CWinApp object and should be used only with MFC-based EXE programs;
2) MFC regular DLLs (like your ATL-based control) – these DLLs have an instance of CWinApp object (like MFC-based EXE programs) and can be used from EXE programs which are not MFC-based;

There are two limitations which make your task unresolved:
1) In the MFC-based EXE you can use CWnd-objects which are created in this EXE or in any extension DLL; It is impossible to use CWnd-objects created by regular DLL in this EXE;
2) A frame window with control bars requires the message loop which is provided by CWinThread class (or CWinApp);

Some tips to reorganize your projects:
1) Do not create control bars in your control; Create them in EXE when needed;
2) In your ATL project create only windows (OLE controls) which may be inserted into resizable bars of a frame window implemented in EXE;
3) It is possible to develop event/notification interfaces in both MFC-EXE-client and ATL-control projects which will let know client application when it should create new resizable bar for further usage as an ATL control container;

You can send me a letter to l_sergiy@fossware.com with detailed description of your task and I will help you with appropriate advice.

Best regards,
Sergiy.