Robin Dunn wrote:
Patrick Roberts wrote:
Hi,
On Windows, I'd like to know when my app should start minimized. In wxWidgets, I'm supposed to be able to use wxApp::m_nCmdShow In wxPython, accessing myapp.m_nCmdShow causes my program to exit. How can a wxPython app know when to start minimized?
I'll add a getter for that attribute.
On second thought it won't do much good. The nCmdShow is passed by Windows to the WinMain function, but since wxPython and wxWidgets are DLLs they will not get the value and so it will never be set in wxApp. WinMain is in pythonw.exe and it looks like this:
int WINAPI WinMain(
HINSTANCE hInstance, /* handle to current instance */
HINSTANCE hPrevInstance, /* handle to previous instance */
LPSTR lpCmdLine, /* pointer to command line */
int nCmdShow /* show state of window */
)
{
return Py_Main(__argc, __argv);
}
The nCmdShow parameter is ignored and not saved. Does anybody know of a win32api that can fetch this value?
ยทยทยท
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!