using a control from a .dll
-
I wrote this CTreeCtrl-based control and put it in a .dll The control consists of a dialog/resource class DIALOG_TREE and a private tree-manipulating class. Now to use this control in a app, I create an empty dialog as a placeholder for the control, then I declare a global pointer to the class
DIALOG_TREE* pTreeDialog;]
then in DoDataExchange()pTreeDialog=new DIALOG_TREE(); pTreeDialog->Create(IDD_DIALOG_TREE,this); pTreeDialog->SetWindowPos(NULL,x+25,y,cx,cy,SWP_SHOWWINDOW); pTreeDialog->ShowWindow(SW_SHOW);
There are two problems which I can't seem to be able to solve: i. I would like to call the control directly (response = pTreeDialog->do Modal()) so I would be able to react. (and maybe dispense with the empty dialog in the app resources) ii. The tree manipulating class builds a list of items and I can't seem to succeed passing the list back to the client app. Any suggestions would be appreciated. TIA alex