Question about ShowWindow()

Posted on 16th Feb 2014 by admin

Hello....

I'm struggling with sumpin, and I hope y'all can help.

I've got a CFormView with a small web browser control (CWebBrowser2), that only needs to be displayed occasionally, when a user selects a particular option from a list.

At any rate, I have no problem using:

m_Browser.ShowWindow(SW_HIDE);

to hide the control. But, when I try to display it, the app crashes.

Shouldn't this (or similar) work:

m_Browser.ShowWindow(SW_SHOW);

I've tried SW_SHOWDEFAULT, SW_SHOWNORMAL, etc. but it keeps crashing on me.

Debug takes it straight to the ShowWindow function in winocc.cpp, so I'm obviously not using ShowWindow properly for this control.

Any help or suggestions are GREATLY appreciated, as always!

Thanks,

Other forums