[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Dialog problems




"Joel C. Keay" wrote:
> 
> In your derived dialog class use the overloaded DialogDisplayed () function
> to reposition your dialog.  I use pointer to the parent command window to
> find the current position of the window and adjust my dialog position to
> lie outside this area.
> 
> void ADialog :: DialogDisplayed ()
> {
>         int dx, dy, dw, dh;     // dialog position
>         GetDialogPosition (dx, dy, dw, dh);
> 
>         int wx, wy, ww, wh;     // command window position
>         pCmdWin->GetPosition (wx, wy, ww, wh);
> 
>         ... check to see if the dialog is over the command window
>         ... if covering then
>         SetDialogPosition (wx+ww+10, wy);
> 
>         // Now update all the dialog settings
>         UpdateDialog ();
> }
> 
> My dialog is modeless, but I believe that the function is available for
> modal dialogs as well.

Thanks, this is exactly what I was looking for as well.


Reply to: