Microsoft KB Archive/35643: Difference between revisions

From BetaArchive Wiki
m (Text replacement - "&" to "&")
m (X010 moved page Microsoft KB Archive/Q35643 to Microsoft KB Archive/35643 without leaving a redirect: Text replacement - "Microsoft KB Archive/Q" to "Microsoft KB Archive/")
 
(No difference)

Latest revision as of 19:21, 12 August 2020

INF: Dialog Box Placement ID Number: Q35643

2.03 2.10 3.00 WINDOWS

Summary:

Adding the following code to the dialog-box routine will move the side of the dialog box to be flush with the left side of the screen. This code will move the dialog box before it is displayed.

RECT r;

case WM_INITDIALOG: GetWindowRect(hDlg,&r); MoveWindow (hDlg, 0,r.top,r.right-r.left,r.bottom-r.top , TRUE); break;

GetWindowRect() will get the current size of the window and the MoveWindow() call will move the window to the left of the screen. As a result, the dialog box will be at the same Y position at which it was originally located.