Click here to Skip to main content
16,021,559 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have developed an MDI MFC image viewer application for simultaneously viewing and comparing more than one images. In my application I need to implement dual monitor support which can view the displaying images in two monitors connected to the system and viewer should have provision to arrange the opened images in desired monitor screen.
I have connected two monitors to my computer using a graphics card.
But when I open my MDI application its window only displaying in primary monitor even though the windows desktop extended to whole two monitor screens.
How can I extent size of MDI application frame to occupy the whole screen of the two monitor.

I don't exactly know how to solve my issue
Anyway I'm thinking if the application window extent to whole monitor, then can split(by using splitter window type of method) the whole screen to a number of windows placed in the two monitors to display the different images.
But I'm not sure about whether it is a proper solution.
I have few doubts in this regard
- can I extent the MDI frame window to occupy the whole screen space (of two monitors)
- can I place the child frames in the desired area of mainframe

A second approach I planning is to simultaneously creating two instance of my image viewer application by calling from another main application (using threads if necessary) then place the individual image viewer application windows in two monitors screens and control the images displaying in image viewer applications from the main application. For successfulness of this approach I need to create a second application which can create and control two instances of the image viewer application and should able to place their windows in the two monitor screen. I don't know whether this is technically possible.
I searched a lot in web but I couldn't find any help. I only found one somewhat useful information from the code project article in the post http://www.codeproject.com/Articles/3690/MFC-classes-for-multiple-monitors
and I tried to use it in my MDI application, but I failed.
If anyone share their knowledge about implementation of dual monitor support in MFC MDI application, it will be more helpful for me.
Posted
Updated 28-Apr-14 22:49pm
v2
Comments
Sergey Alexandrovich Kryukov 29-Apr-14 2:00am    
What "mainframe"? :-)
MDI is a really bad thing, even Microsoft tries hard to phase it out. When MDI was created, nothing supported more than one monitor. Just forget it. A window application can be monitor-agnostic; so it's the user's responsibility to stretch an application window to occupy two monitors (even with MDI; this is really an irrelevant thing).
—SA
the vacuum 29-Apr-14 3:45am    
how can extend the application window to second monitor?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900