Microsoft KB Archive/35643

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 19:21, 12 August 2020 by X010 (talk | contribs) (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/")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

INF: Dialog Box Placement ID Number: Q35643

2.03 2.10 3.00 WINDOWS


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.


case WM_INITDIALOG: GetWindowRect(hDlg,&r); MoveWindow (hDlg, 0,,r.right-r.left, , 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.