![]() |
MKI_DialogCenter (Dialogs) Changed in Version 2022.1 |
www.CAD6.com |
C++ Syntaxvoid MKI_DialogCenter( HWND f_hWindow, HICON f_hIcon );
Centers a dialog box relative to the application's main window.
ParametersWindow [HWND] Handle of the dialog window to be centered. Icon New in Version 2022.1 [HICON] Handle of a Windows icon to be displayed in the upper left corner of the dialog window. If nullptr, a default icons will be displayed.
CommentThis procedure should be called in the WM_INITDIALOG case of all dialog windows of the plug-in in order to achieve a common dialog window positioning:
INT_PTR CALLBACK DialogProc( HWND f_hDlg, UINT f_unMessage, WPARAM f_wParam, LPARAM f_lParam ) { switch( f_unMessage ) { case WM_INITDIALOG: MKI_DialogCenter( f_hDlg, hMyIcon );
...
} return( 0 ); }
This also applies to sub-classed common dialog windows!
|
CAD6interface 2025.0 - Copyright 2025 Malz++Kassner® GmbH