Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » SetActiveView asserts when pane is undocked Collapse All
Subject Author Date
MUKESH GUPTA Dec 13, 2013 - 7:06 AM

Hi,

If I try to set a view as active by calling SetActiveView on CView which is in a pane not docked to the mainframe, the asset call of IsChild fails.
Please suggest, what should be the correct implementation to avoid the scenario.

Thanks in advance.

Art Wilkes Dec 16, 2013 - 8:53 AM

We suggest that you create a sample program that exhibits the problem and submit it to Prof-UIS support and we will correct the problem or advice you on the correct coding technique.
Prof-UIS Support

Art Wilkes Dec 13, 2013 - 9:15 AM

What value does the SetActiveView return.
If it returns a NULL that normally means the view fails.
MSDN
If the window identified by the hWnd parameter was created by the calling thread, the active window status of the calling thread is set to hWnd. Otherwise, the active window status of the calling thread is set to NULL..
MSDN again
The SetActiveWindow function activates a window, but not if the application is in the background. The window will be brought into the foreground (top of Z-Order) if its application is in the foreground when the system activates the window.

I would suggest you look at the GetLastError Section

MSDN Page on the subject.
http://msdn.microsoft.com/en-us/library/windows/desktop/ms646311(v=vs.85).aspx

What operating system are you using?
What Visual Studio are you using to compile with?
Is this a Dialog, SDI, or MDI project.

Prof-UIS Support

MUKESH GUPTA Dec 16, 2013 - 5:46 AM

Also, my app is not in background just the window is.

MUKESH GUPTA Dec 14, 2013 - 2:17 PM

I am on Windows 7 (though I know the issue is not OS specific).
I am compiling with VS 2008 and on profuis version 2.91
My application is has SDI.