470,836 Members | 1,897 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,836 developers. It's quick & easy.

Getting Python to show ATL & MFC Dialogs

In my ATL Class, I have a function with the body

STDMETHODIMP CSimpleObj::Show()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState())

// TODO: Add your implementation code here
CSimpleDialog myDialog;
int result = myDialog.DoModal();
MessageBox(NULL,TEXT("Live From Python"),
TEXT("MFC ATL COM"), MB_OK);
return S_OK;
}

and python script is very simple

from comtypes.client import CreateObject
MFC = CreateObject("MFCATLCom.SimpleObj.1")
MFC.Show( )

if does return a success message, but niether the Dialog nor the
Message box appears. Does any one know what's going on?

Mar 27 '06 #1
0 1022

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Christian Wilcox | last post: by
28 posts views Thread by Andre | last post: by
16 posts views Thread by PyDenis | last post: by
10 posts views Thread by KDawg44 | last post: by
11 posts views Thread by geoffbache | last post: by
5 posts views Thread by Enij | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.