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 » Bug in application position when using Dual-View Collapse All
Subject Author Date
Offer Har Aug 25, 2008 - 7:21 AM

Hi,


We have a simple MDI application, and we run it on NVidia dual view. The application is defined to show maximized pMainFrame->ShowWindow(SW_SHOWMAXIMIZED);


We do this:


1) Put the shortcut on the left (main) monitor


2) Put the shortcut on the right monitor


When we run from the left monitor, the application opens on the left monitor, maximized, and all is well.


When we run it from the right monitor, the application opens on the right monitor, maximzied (according to the icons on the top right corner...) but does not occupies the whole area of the monitor (seems like it leaves space for the start menu...)


Few issues:


1) Why does it starts on the right monitor at all? If it saves the location, it should starte always on the left monitor.


2) Why does it leave space for the start menu? it is very confising and looks very weird that the application is ’maximized’ but is not.


Please fix for version 2.84


You can reproduce this with the test MDI application I sent you.


Thanks,


Ron.

Technical Support Aug 28, 2008 - 12:32 PM

We used SDI sample and v.2.83 on dual monitor (main on left is 1400x1050, secondary on right is 1280x1024) Windows XP SP3, NVidia 7600 Go video card, LG M1 Pro computer. We removed the HKEY_CURRENT_USER\Software\Foss\SDI registry each time before starting this application. That means the main frame window placement was not restored. We created a shortcut on the desktop, we tried to place it on both monitor before starting the application. Each time it starts on the same monitor where shortcut is. The maximization works OK and the maximized window always appears on the correct monitor. If we do not remove the registry settings, the main frame window appears restored on the same monitor where it was closed. So, we found no problems. The incorrect maximization behavior on the multi monitor systems amy be because of:

1) You are using the SetWindowPlacement() API for your main frame window at startup and the specified window placement parameters were composed incorrectly.

2) You are handling the WM_GETMINMAXINFO standard Windows message and fill the min/max information coordinates incorrectly.

3) You perform any other incorrect window position changing using SetWindowPos(), DeferWindowPos() and/or MoveWindow() APIs somewhere at initialization steps.

The first two cases can provide you with ability to manipulate with initial position of your main frame window and allow you to forcibly show it maximized on the primary monitor with x=0 and y=0 coordinates of top/left corner when your application runs for the first time.

Offer Har Aug 28, 2008 - 2:17 PM

Dear Support,


I sent you a sample application that reproduce this bug.


You know exactly what I do, because I sent you all the sources... just run teh application I sent you, which is an MDI application created bythe MFC wizard and you will see the problem, none of the things you wrote are done in my application, and you already have it running.


Please run my application (which you already compiled and ran) and you will see the problems.


Regards,


Ron.

Technical Support Sep 2, 2008 - 11:57 AM

Yes, we confirm that the problem really occurs in your test application. But only in the test application you provided. In fact, we sent you a modified (fixed) version of your test app and our comments several days ago (on 26th of August). This fixed version behaves exactly like any of our sample applications.

Offer Har Sep 2, 2008 - 12:02 PM

Dear Support, your modified application did not fully solve all the probelms I reported (and I replied on the 26th with these comments)


a) If I double-click the application icon on the right monitor, it opens on the right monitor - can’t I have it open always on the left monitor (this happens even if I close it on the left monitor)

b) If I open the application from the right window, you can clearly see that the status bar is missing a few pixels at the bottom, which it doesn’t if I open on the left window

c) If I double-click the title bar (restore) the application goes to the left monitor, even if it opened maximized on the right monitor, this is very confusing.

Technical Support Sep 5, 2008 - 6:24 AM

Please download the following ZIP file and unpack it over installed Prof-UIS folder:

CExtNCW-maximization-fix.zip

This ZIP file includes an improved version of the CExtNCW template class. Now maximization, restoring, system command processing and window resizing work in a absolutely differently way because the WM_GETMINMAXINFO message is handled by skinned windows more correctly. You should not encounter skinned windows problem on any monitors.

Offer Har Aug 26, 2008 - 5:39 AM

Dear Support,



a) If I double-click the application icon on the right monitor, it opens on the right monitor - can’t I have it open always on the left monitor (this happens even if I close it on the left monitor, which means the position data is saved)

b) If I open the application from the right window, you can clearly see that the status bar is missing a few pixels at the bottom, which it doesn’t if I open on the left window

b) If I double-click the title bar (restore) the application goes to the left monitor. this is very confusing.



Regards,

Ron.