The SIP moves the dialogs position

I have converted an eVC4 app to VS2005. All works fine apart from the
dialogs being repositioned to the 0,0 positon everytime the SIP is used. I
dont want this as the dialogs title bar is removed and I cant view the 'OK'
at the top right of the dialog. The only way I can close the dialogs is to
bring up the SIP again and the dialogs go back to normal.

Everything works fine when I run the program on a PPC2003 device but I see
the problem on WM5 devices.

My dialogs have a 'tile bar' but no 'system menu'. If I create a new MFC
application in VS2005 for WM5 I see that the OnSize function is generated :

void CtestingAgainDialogsDlg:nSize(UINT /*nType*/, int /*cx*/, int /*cy*/)
{
if (AfxIsDRAEnabled())
{
DRA::RelayoutDialog(AfxGetResourceHandle(),
this->m_hWnd,DRA::GetDisplayMode() != DRASurprisertrait ?
MAKEINTRESOURCE(IDD_TESTINGAGAINDIALOGS_DIALOG_WIDE) :
MAKEINTRESOURCE(IDD_TESTINGAGAINDIALOGS_DIALOG));
}

}

And in debug mode this gets called after I close the SIP. If I put this
function into my converted project it seems to have no effect.

I have tried to put in an OnMove(..) functon with

MoveWindow(0,26,240,320,TRUE);

but then it just gets stuck in a loop as MoveWindow calls OnMove again and
again ....

I also have put in an OnActivate(..) handler and put
MoveWindow(0,26,240,320,TRUE); in to that but this function does not get
called after the SIP closes.

I appreciate any help on this matter.

Thanks

Harry

[1628 byte] By [Harry123] at [2008-1-9]