lanteau
lanteau

Reputation: 275

Why is call to CDialog::OnShowWindow hanging my application?

My application is hanging when a call to CDialog::OnShowWindow is made in my override of OnShowWindow. It only hangs when an editbox in the dialog currently has focus. It is hanging when both bShow and nStatus are 0 meaning the dialog is being hidden.

I have other similar dialogs and the call to CDialog::OnShowWindow() does not hang in them when an editbox has focus.

I'm really not sure how to debug this...

Upvotes: 0

Views: 998

Answers (1)

lanteau
lanteau

Reputation: 275

I needed to set the DS_CONTROL style for the dialog. This fixes the infinite loop that was causing the hang.

These articles were of assistance:

http://blogs.msdn.com/b/oldnewthing/archive/2004/07/30/201988.aspx http://support.microsoft.com/kb/149501

Upvotes: 2

Related Questions