salut,
j'essaie de centrer la forme en affichage j ai ecrit ce code
mais ca ne merche po, ke dois je faire?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 void CGraP::OnInitialUpdate() { CFormView::OnInitialUpdate(); // TODO: Add your specialized code here and/or call the base class CRect Rect; GetParentFrame()->GetWindowRect(&Rect); GetParentFrame()->SetWindowPos( NULL,0,0,700 ,400 ,SWP_NOMOVE | SWP_NOZORDER); SIZE size; size.cx=Rect.Width()/2; size.cy=Rect.Height()/2; SetScaleToFitSize(size); CWnd* pMainWnd = AfxGetMainWnd(); CenterWindow(pMainWnd); }
Partager