Help!!! How to set position of a dialog
-
Hi i want to know how to set the position of the dialog to the right bottom corner of the screen.i used GetSystemMetrics to get the resolution (infact) width and height of the desktop screen. but how can i retrive width and height of dialog? And how to retrive the hieght of the TaskBar. 1.if i get width and height of dialog,i can use SetWindowPos(...) 2.what about the tsakbar????
-
Hi i want to know how to set the position of the dialog to the right bottom corner of the screen.i used GetSystemMetrics to get the resolution (infact) width and height of the desktop screen. but how can i retrive width and height of dialog? And how to retrive the hieght of the TaskBar. 1.if i get width and height of dialog,i can use SetWindowPos(...) 2.what about the tsakbar????
Something like this in your dialog's init method:
RECT rcDisplay,
rcDialog;SystemParametersInfo(SPI_GETWORKAREA, 0, &rcDisplay, 0);
GetWindowRect(&rcDialog);
rcDialog.left = rcDisplay.right - rcDialog.right;
rcDialog.top = rcDisplay.bottom - rcDialog.bottom;
rcDialog.right = rcDisplay.right;
rcDialog.bottom = rcDisplay.bottom;MoveWindow(&rcDialog);
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
-
Something like this in your dialog's init method:
RECT rcDisplay,
rcDialog;SystemParametersInfo(SPI_GETWORKAREA, 0, &rcDisplay, 0);
GetWindowRect(&rcDialog);
rcDialog.left = rcDisplay.right - rcDialog.right;
rcDialog.top = rcDisplay.bottom - rcDialog.bottom;
rcDialog.right = rcDisplay.right;
rcDialog.bottom = rcDisplay.bottom;MoveWindow(&rcDialog);
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
hi DavidCrow thanks a lot for help! :)