Window Placement

  • Thread starter Thread starter Zebedee6
  • Start date Start date
Z

Zebedee6

Guest
Hi


I have created a window into which I have placed two modeless dialogs. I want the two dialogs to sit next to each other. I created it on one machine with a high screen resolution using

CRect m_rect;

GetClientRect(&m_rect);

ClientToScreen(&m_rect);

//***************************************************************************************************************************************************
CAlbumTitles *AlbumTitles = new CAlbumTitles(this);

AlbumTitles->Create(IDD_ALBUM_TITLES, this);

AlbumTitles->SetWindowPos(NULL, m_rect.left, m_rect.top, 500, 400, SWP_SHOWWINDOW);
//***************************************************************************************************************************************************

CAlbumInfo *AlbumInfo = new CAlbumInfo(this);

AlbumInfo->Create(IDD_ALBUM_INFO, this);

AlbumInfo->SetWindowPos(NULL, m_rect.left + 500, m_rect.top, 500, 400, SWP_SHOWWINDOW);
//***************************************************************************************************************************************************

It works fine on that machine. The two modeless dialogs sit next to each other. But when I try it on a machine with a lower screen resolution the two modeless dialogs are miles apart.

Is there a way to possibly fix this so it's the same on both machines.


Many thanks



P.S.

Have included two screen shots of the problem. Second is the correct one. First is of same on machine with lower resolution. The second modelss dialog is no longer against the first modeless dialog

1279563.png1279560.png

Continue reading...
 
Back
Top