<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1528" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>In my ATL Class, I have a function with the
body</FONT></DIV><FONT face=Arial size=2>
<DIV><BR>STDMETHODIMP CSimpleObj::Show()<BR>{<BR>
AFX_MANAGE_STATE(AfxGetStaticModuleState())</DIV>
<DIV> </DIV>
<DIV> // TODO: Add your implementation code
here<BR> CSimpleDialog
myDialog;<BR> int result =
myDialog.DoModal();<BR> MessageBox(NULL,TEXT("Live From
Python"),<BR> TEXT("MFC ATL COM"),
MB_OK);<BR> return S_OK;<BR>}</DIV>
<DIV> </DIV>
<DIV>and python script is very simple</DIV>
<DIV> </DIV>
<DIV>from comtypes.client import CreateObject</DIV>
<DIV>MFC = CreateObject("MFCATLCom.SimpleObj.1")</DIV>
<DIV>MFC.Show( )</DIV>
<DIV> </DIV>
<DIV>if does return a success message, but niether the Dialog nor the Message
box appears. Does any one know what's going on?</DIV>
<DIV> </DIV>
<DIV>-Aladin</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV>*BTW Thanks to Luke Dunstan for helping me out with getting PythonCE
and comtypes running.</DIV></BODY></HTML>