Showing MFC dialog from Python

liya liya.chernyakova at
Fri Jun 21 15:33:02 EDT 2002

Please, help, I am trying to use the MFC dialog (in
"PyOmegaParamDlg.dll") in the Python script. I am not sure what is
missing, but the dialog is not shown and it's functions are not
The Python code I am trying is following:
class TestDialogApp(dlgappcore.DialogApp):
	def CreateDialog(self):
		return PyWraperDlg()

class PyWraperDlg(dlgappcore.AppDialog):
	def __init__(self):
		self.edit = None
		print 'loading dll'
		mydll = win32ui.LoadLibrary("PyOmegaParamDlg.dll")
		print 'initializing dialog'
		dlgappcore.AppDialog.__init__(self, IDD_CONFIG_DIALOG, mydll)
		print 'dialog initialized'

app.AppBuilder = TestDialogApp
print 'instantiating the application'

All the print statements are executed, but the dialog does not appear
on the screen.
IDD_CONFIG_DIALOG = 1000 is the resource ID for the dialog in my dll's
resource.h file.
I am sure I am missing something, but I am not sure what. Ideally I
want to acces the dialog functions, that are declared as public in my
Thank you

More information about the Python-list mailing list