COM Component
-
I am placing COM component (WMP) on dialog. When I place it and run the application, dialog does not appear but when I delete it and run, dialog appears. Please suggest what can be issue? I debug the code and saw DoModal function. It is executing the portion of DoModal as m_hWnd is comiing NULL.
// hide the window before enabling the parent, etc.
if (m_hWnd != NULL)
SetWindowPos(NULL, 0, 0, 0, 0, SWP_HIDEWINDOW|
SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_NOZORDER); -
I am placing COM component (WMP) on dialog. When I place it and run the application, dialog does not appear but when I delete it and run, dialog appears. Please suggest what can be issue? I debug the code and saw DoModal function. It is executing the portion of DoModal as m_hWnd is comiing NULL.
// hide the window before enabling the parent, etc.
if (m_hWnd != NULL)
SetWindowPos(NULL, 0, 0, 0, 0, SWP_HIDEWINDOW|
SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_NOZORDER);Add the function
AfxEnableControlContainer()
in theInitInstance
method of you app class.«_Superman_» _I love work. It gives me something to do between weekends.
_Microsoft MVP (Visual C++) (October 2009 - September 2013)