mirror of
https://github.com/simtactics/mysimulation.git
synced 2025-07-06 22:50:30 -04:00
Somewhat of a start
This commit is contained in:
commit
8a16e52bf6
66 changed files with 1872 additions and 0 deletions
11
Tools/FARDive/windows/common.cpp
Normal file
11
Tools/FARDive/windows/common.cpp
Normal file
|
@ -0,0 +1,11 @@
|
|||
#include "Windows.hpp"
|
||||
#include "GUI.hpp"
|
||||
|
||||
void CenterDialog(HWND hDlg){
|
||||
RECT parent, child;
|
||||
GetWindowRect(hWnd, &parent);
|
||||
GetWindowRect(hDlg, &child);
|
||||
int x = (parent.right + parent.left - child.right + child.left)/2,
|
||||
y = (parent.bottom + parent.top - child.bottom + child.top)/2;
|
||||
SetWindowPos(hDlg, 0, x, y, 0, 0, SWP_NOOWNERZORDER | SWP_NOSIZE | SWP_NOZORDER);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue