Bonjour,
J'ai cherche sur internet comment faire conversion c++ -> c# mais cela reste tres difficile. Je n'ai pas beaucoup de connaissance en windows c++.
Comment convertir ce code suivant en c# winform ?
Sachant que CDialog est un winform en c#. Par contre je ne sais pas comment realiser m_pParentWnd = CWnd::GetSafeOwner(pParent); en c#.
Je ne sais pas quoi faire !

pParent represente IEWin32Window pParent en c#.
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
 
BOOL CCabinetSelectionDlg::Create(CWnd *pParent)
{
    m_pParentWnd = CWnd::GetSafeOwner(pParent);
 
    if((m_pParentWnd!=NULL) && m_pParentWnd->IsWindowEnabled())
    {
      m_pParentWnd->EnableWindow(FALSE);
      m_bParentDisabled = TRUE;
    }
 
    if(!CDialog::Create(CCabinetSelectionDlg::IDD,pParent))
    {
      ReEnableParent();
      return FALSE;
    }
 
    return TRUE;
}
pParent represente IEWin32Window pParent en c# car ne je n'ai pas acces a Cwnd en c# .