Dialogs in EVC++ dll not visible ....

  • Thread starter Thread starter Augusto
  • Start date Start date
A

Augusto

My problem is that when I add a resource like a dialog in EVC++ 3.0 and I
try to start
the dialog from the CF C# the dialog does not start.


the EVC++ dll code is a test function that computes a product and start the
dialog.
The function is computed correctly, but the form is not shown on the PDA


extern "C" _declspec(dllexport) int WINAPI MyFunc(int n1, int n2)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());

CDialog DLG;
DLG. DoModal();

return(n1 * n2);


}


the C# code is the following

private void button1_Click(object sender, System.EventArgs e)

{

int result;

result = MyFunc(3,7);

MessageBox.Show(result.ToString());

}



What's wrong woth my code? The DLL is a regular MFC DLL.

Ciao Augusto.
 
I suppose that it's theoretically possible that that could work, but it's
not worth the trouble. Recode the form that you want in managed code and
call it from your main program. Don't try to call into a DLL, especially
one based on MFC, and get it to display a dialog.

Paul T.
 
Ok, the problem is that I'm trying to wrap an ACTIVEX control.

The ActiveX control in question is the pocket CORTONA Control (VRML).

I think that a wrapper into a DLL is the only viable solution to run VRML
into
the compact frame work.


Otherwise, do you know a method to start two application concurrently on the
PPC
and let them exchange datas?

The final goal is to develop a location aware mobile application.

The VRML control displays a 3dWorld guided with GPS data.
The application is actually functioning on EVC++, but our project, for some
reason, needs to port the application on C# and use the EVC++ VRML control.
 
Back
Top