I have a dialog I am creating SDK-style (createDialog). On WM_INITDIALOG I can detect a condition in which I no longer want to show the dialog at all.
While I can end the dialog by posting WM_CLOSE, I get a "flicker" of it which is annoying.
I have tried changing the style (add stule (NOT %WS_VISIBLE)) and Hiding it (ShowWindow hWnd, %SW_HIDE), both on WM_INITDIALOG , but I still get a flicker.
With "non-dialog" windows you can abort window creation by returning TRUE to WM_CREATE; but it does not appear you can abort on WM_INITDIALOG when using a dialog (vs registered window class).
Before I go change all my logic to do the test first or maybe change to a registered window class, am I missing some way to abort the presentation of the dialog BEFORE it ever shows?
I don't get WM_NCCREATE, either, so I can't do it there.
Thanks,
While I can end the dialog by posting WM_CLOSE, I get a "flicker" of it which is annoying.
I have tried changing the style (add stule (NOT %WS_VISIBLE)) and Hiding it (ShowWindow hWnd, %SW_HIDE), both on WM_INITDIALOG , but I still get a flicker.
With "non-dialog" windows you can abort window creation by returning TRUE to WM_CREATE; but it does not appear you can abort on WM_INITDIALOG when using a dialog (vs registered window class).
Before I go change all my logic to do the test first or maybe change to a registered window class, am I missing some way to abort the presentation of the dialog BEFORE it ever shows?
I don't get WM_NCCREATE, either, so I can't do it there.
Thanks,
Comment