IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Visual C++ Discussion :

probleme migration VC6->VC2005 avec MFC


Sujet :

Visual C++

  1. #1
    Membre du Club
    Inscrit en
    Décembre 2006
    Messages
    166
    Détails du profil
    Informations personnelles :
    Âge : 44

    Informations forums :
    Inscription : Décembre 2006
    Messages : 166
    Points : 62
    Points
    62
    Par défaut probleme migration VC6->VC2005 avec MFC
    j'ai un petit sous de migration de code (de VC6.0 à VC2005)

    Voilà j'ai une appli qui possède plusieurs ToolBar qui sont positionnées les unes à côté des autres selon la largeur de la MainFrame et qui peuvent être soit cachées soit visibles.

    Sous VC6.0 ça marche impeccable, par exemple GetWindowRect retour bien les bons paramètres de chaque ToolBar.

    Sous VC2005 ça marche pas...
    GetWindowRect fonctionne que si la ToolBar à été affichée au moins une fois.
    j'ai même une erreur d'exécution avec les RecalcLayout() dans mon CMainFrame::OnCreate() au démarrage de mon application.

    S'il existe une technique je suis preneur.
    Merci d'avance

    Ci dessous une de mes fonctions qui place une Toolbar à côté d'une autre :
    Cette fonction est appelée dans MainFrame::OnCreate() à la place de certain DockControlBar();

    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
    void CMainFrame::DockControlBarLeftOf(CToolBar* Bar,CToolBar* LeftOf)
    {
    CRect rect;
    DWORD dw;
    UINT n;
     
    //RecalcLayout(); Ici je suis obliger de le retirer sous VC2005 car sinon ça plante.
    LeftOf->GetWindowRect(&rect);
    rect.OffsetRect(1,0);
    dw=LeftOf->GetBarStyle();
    n = 0;
    n = (dw&CBRS_ALIGN_TOP) ? AFX_IDW_DOCKBAR_TOP : n;
    n = (dw&CBRS_ALIGN_BOTTOM && n==0) ? AFX_IDW_DOCKBAR_BOTTOM : n;
    n = (dw&CBRS_ALIGN_LEFT && n==0) ? AFX_IDW_DOCKBAR_LEFT : n;
    n = (dw&CBRS_ALIGN_RIGHT && n==0) ? AFX_IDW_DOCKBAR_RIGHT : n;
     
    DockControlBar(Bar,n,&rect);
    }

    balise [code] rajoutée par r0d. Merci d'y penser la prochaine fois.

  2. #2
    Rédacteur
    Avatar de farscape
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Novembre 2003
    Messages
    9 055
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Alpes Maritimes (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Novembre 2003
    Messages : 9 055
    Points : 17 323
    Points
    17 323
    Par défaut
    salut ,
    tu peux essayer avec cette méthode ?
    http://www.developpez.net/forums/sho...68#post1146468

  3. #3
    Membre du Club
    Inscrit en
    Décembre 2006
    Messages
    166
    Détails du profil
    Informations personnelles :
    Âge : 44

    Informations forums :
    Inscription : Décembre 2006
    Messages : 166
    Points : 62
    Points
    62
    Par défaut Nop
    Désolé mais quand je fais ça j'ai une erreur lors de l'exécution... ça plante sur le RecalcLayout()

    D'ailleurs si je met un quelconque RecalcLayout() ou équivalent (comme ShowControlBar) dans mon CMainFrame::OnCreate() ça fait cette erreur sous VC2005. l'erreur me renvoie sur la fonction Windows : UpdateWindow() qui n'arrive pas a s'executer.

    Je comprends vraiment pas.

    Petite précision, j'ai un SplashScreen avant l'apparition de la fenêtre principale... c'est peut être du a ça, qu'on ne puisse pas rafraichir la MainFrame...

    Si quelqu'un a une idée...??

    Merci d'avance

  4. #4
    Rédacteur
    Avatar de farscape
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Novembre 2003
    Messages
    9 055
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Alpes Maritimes (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Novembre 2003
    Messages : 9 055
    Points : 17 323
    Points
    17 323
    Par défaut
    salut,
    c'est bizarre je viens de faire l'essai sur un projet 2005 (celui de mon tuto)
    je n'ai pas de probléme, j'arrive bien a placer les deux barres de controles et à appeller RecalcLayout()
    le seul point que je n'ai pas essayé c'est le splash window.
    tu peux peut etre essayé de le desactiver pour voir...

  5. #5
    Membre du Club
    Inscrit en
    Décembre 2006
    Messages
    166
    Détails du profil
    Informations personnelles :
    Âge : 44

    Informations forums :
    Inscription : Décembre 2006
    Messages : 166
    Points : 62
    Points
    62
    Par défaut
    Je suis en train de tester... j'ai supprimé le SplashScreen...

    bah toujours pareil ... j'ai une erreur a l'execution et toujours au meme endroit

  6. #6
    Rédacteur
    Avatar de farscape
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Novembre 2003
    Messages
    9 055
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Alpes Maritimes (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Novembre 2003
    Messages : 9 055
    Points : 17 323
    Points
    17 323
    Par défaut
    salut,
    donc il y a autre chose ...
    peut etre un probleme d'initialisation dans ton OnCreate .
    verifie bien le retour de tes fonctions.

  7. #7
    Membre du Club
    Inscrit en
    Décembre 2006
    Messages
    166
    Détails du profil
    Informations personnelles :
    Âge : 44

    Informations forums :
    Inscription : Décembre 2006
    Messages : 166
    Points : 62
    Points
    62
    Par défaut
    En fait si je retire juste la fonction pour que mes deux toolbars soient sur la même ligne mon appli compile et s'execute sans aucun probleme.

    Juste que c'est pas normal que je ne puisse pas mettre un RecalcLayout() dans CMainFrame::OnCreate() qui est bizarre et de plus... je veux que mes deux toolbar soient cote cote...

    Je continue de regarder....

    Petite question : A partir de quel endroit dans le OnCreate peut on mettre un RecalcLayout() ??
    dès le :

    if(CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
    return -1;

    ???

  8. #8
    Rédacteur
    Avatar de farscape
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Novembre 2003
    Messages
    9 055
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Alpes Maritimes (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Novembre 2003
    Messages : 9 055
    Points : 17 323
    Points
    17 323
    Par défaut
    hum c'est un projet SDI , je vais faire l'essai.

  9. #9
    Membre du Club
    Inscrit en
    Décembre 2006
    Messages
    166
    Détails du profil
    Informations personnelles :
    Âge : 44

    Informations forums :
    Inscription : Décembre 2006
    Messages : 166
    Points : 62
    Points
    62
    Par défaut
    Non c'est un projet MDI

  10. #10
    Rédacteur
    Avatar de farscape
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Novembre 2003
    Messages
    9 055
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Alpes Maritimes (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Novembre 2003
    Messages : 9 055
    Points : 17 323
    Points
    17 323
    Par défaut
    trop tard !
    je viens de faire l'essai suivant :
    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
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
     
    int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
    {
        if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
            return -1;
     
        if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
            | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
            !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
        {
            TRACE0("Failed to create toolbar\n");
            return -1;      // fail to create
        }
     
        if (!m_wndStatusBar.Create(this) ||
            !m_wndStatusBar.SetIndicators(indicators,
              sizeof(indicators)/sizeof(UINT)))
        {
            TRACE0("Failed to create status bar\n");
            return -1;      // fail to create
        }
     
    // deuxieme toolbar .
        if (!m_wndToolBar2.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_ALIGN_TOP
            | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
            !m_wndToolBar2.LoadToolBar(IDR_MAINFRAME))
        {
            TRACE0("Failed to create toolbar\n");
            return -1;      // fail to create
        }
     
            m_wndToolBar2.SetWindowText(_T("Toolbar2"));    
            m_wndToolBar2.SetBarStyle(m_wndToolBar.GetBarStyle() | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC);
     
            // TODO: Delete these three lines if you don't want the toolbar to
            //  be dockable
            m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
            m_wndToolBar2.EnableDocking(CBRS_ALIGN_ANY);
     
            EnableDocking(CBRS_ALIGN_ANY);
            DockControlBar(&m_wndToolBar); //placement 1 toolbar
     
            CRect RectOne,RectTwo;
            RecalcLayout();
     
            m_wndToolBar.GetWindowRect(&RectOne);
     
            m_wndToolBar2.GetWindowRect(&RectTwo);
            int nWidth=RectTwo.Width();
            int nHeight=RectTwo.Height();
     
            // calcul emplacement de la toolbar2 a droite de la 1 toolbar
            RectTwo.left=RectOne.right;
            RectTwo.right=RectTwo.left+nWidth;
            RectTwo.top=RectOne.top;
            RectTwo.bottom=RectTwo.top+nHeight;
     
            // placement final.
            DockControlBar(&m_wndToolBar2,(UINT)0,RectTwo);
            RecalcLayout();    
     
        return 0;
    }
    ça fonctionne sans problemes.
    je vais essayer le meme code sur un MDI.

  11. #11
    Rédacteur
    Avatar de farscape
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Novembre 2003
    Messages
    9 055
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Alpes Maritimes (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Novembre 2003
    Messages : 9 055
    Points : 17 323
    Points
    17 323
    Par défaut
    le même code dans un contexte MDI fonctionne aussi...

  12. #12
    Membre du Club
    Inscrit en
    Décembre 2006
    Messages
    166
    Détails du profil
    Informations personnelles :
    Âge : 44

    Informations forums :
    Inscription : Décembre 2006
    Messages : 166
    Points : 62
    Points
    62
    Par défaut
    Non mais au fait moi aussi quand je cree un nouveau projet MDI... (meme importé de VC6) ca marche sans probleme.... c'est le code de mon appli qui a l'air de merder.... j'ai mis un RecalcLayout() juste apres le CMDIFrameWnd::OnCreate(lpCreateStruct)) et la il passe alors que si je le colle juste derriere le premier m_wndMessageBar.Create()... il plante a l'execution.... bizarre bizarre.

    PS: m_wndMessageBar est une DialogBar

  13. #13
    Rédacteur
    Avatar de farscape
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Novembre 2003
    Messages
    9 055
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Alpes Maritimes (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Novembre 2003
    Messages : 9 055
    Points : 17 323
    Points
    17 323
    Par défaut
    j'ai loupé un épisode ? ,il me semble pas avoir vu ton code de OnCreate ....
    et verifie le status de la creation de ta barre de dialogue...

  14. #14
    Membre du Club
    Inscrit en
    Décembre 2006
    Messages
    166
    Détails du profil
    Informations personnelles :
    Âge : 44

    Informations forums :
    Inscription : Décembre 2006
    Messages : 166
    Points : 62
    Points
    62
    Par défaut
    Bon voiçi une partie du OnCreate.. qui est très gros :

    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
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
    {
    	int		i;
    	if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
    		return -1;
    	CSplashWnd::ShowSplashScreen(this);
     
    	if (!m_wndMessageBar.Create(this, IDD_MESSAGE, 
    		WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_SIZE_DYNAMIC | CBRS_HIDE_INPLACE,
    		ID_VIEW_MESSAGE_BAR))
    	{
    		TRACE0("Impossible de créer messagebar\n");
    		return -1;      // fail to create
    	}
     
    	if(!MessageBarInitialize()) {
    		AfxMessageBox("Initialisation de la Zone Message impossible");
    		return -1;
    	}
    	m_MessageListBox.AddString("");
     
    	m_wndMessageBar.SetWindowText("Zone Message");
     
    	// Create Menu toolbar
     
    	if (!m_MenuToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_ALIGN_TOP
    		| CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
    		!m_MenuToolBar.LoadToolBar(IDR_TOOLBAR_MENU))
    	{
    		TRACE0("Impossible de créer menu toolbar\n");
    		return -1;      // fail to create
    	}
    	// Create toolbar Système
     
    	if (!m_ToolBarSystem.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_ALIGN_TOP
    		| CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
    		!m_ToolBarSystem.LoadToolBar(IDR_TOOLBAR_S))
    	{
    		TRACE0("Impossible de créer system toolbar\n");
    		return -1;      // fail to create
    	}
    	m_ToolBarSystem.GetToolBarCtrl().SetExtendedStyle(TBSTYLE_EX_DRAWDDARROWS);
     
    	m_ToolBarSystem.SetDropDown(IDR_TOOLBAR_Z);
    	m_ToolBarSystem.SetDropDown(IDR_TOOLBAR_P);
    	m_ToolBarSystem.SetDropDown(IDR_TOOLBAR_VIEW);
    	m_ToolBarSystem.SetDropDown(IDR_TOOLBAR_SELECT);
    	m_ToolBarSystem.SetDropDown(IDR_TOOLBAR_UNDO);
     
    	// Positionnement des toolbars
     
    	EnableDocking(CBRS_ALIGN_ANY);
     
    	m_MenuToolBar.SetWindowText("Modules");
    	m_MenuToolBar.EnableDocking(CBRS_ALIGN_TOP);
    	DockControlBar(&m_MenuToolBar, AFX_IDW_DOCKBAR_TOP);
    	//ShowControlBar(&m_MenuToolBar, TRUE, FALSE); // je ne peux pas faire les ShowControlBar car ils plantent a l'execution aussi (meme chose que RecalcLayout)
     
    	m_ToolBarSystem.SetWindowText("Systeme");
    	m_ToolBarSystem.EnableDocking(CBRS_ALIGN_TOP);
    	DockControlBar(&m_ToolBarSystem,AFX_IDW_DOCKBAR_TOP);
    	//DockControlBarLeftOf(&m_ToolBarSystem,&m_MenuToolBar); //meme fonction que precedemment qui contient un RecalcLayout()
    	//ShowControlBar(&m_ToolBarSystem, TRUE, FALSE);
             ...
    }

  15. #15
    Rédacteur
    Avatar de farscape
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Novembre 2003
    Messages
    9 055
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Alpes Maritimes (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Novembre 2003
    Messages : 9 055
    Points : 17 323
    Points
    17 323
    Par défaut
    hum je changerais l'odre d'init:
    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
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    [LEFT]int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
    {
        int        i;
        if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
            return -1;
        CSplashWnd::ShowSplashScreen(this);
     
        if (!m_wndMessageBar.Create(this, IDD_MESSAGE, 
            WS_CHILD | WS_VISIBLE | CBRS_TOP | CBRS_SIZE_DYNAMIC | CBRS_HIDE_INPLACE,
            ID_VIEW_MESSAGE_BAR))
        {
            TRACE0("Impossible de créer messagebar\n");
            return -1;      // fail to create
        }
     
        if(!MessageBarInitialize()) {
            AfxMessageBox("Initialisation de la Zone Message impossible");
            return -1;
        }
        m_MessageListBox.AddString("");
     
        m_wndMessageBar.SetWindowText("Zone Message");
     
        // Create Menu toolbar
        
        if (!m_MenuToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_ALIGN_TOP
            | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
            !m_MenuToolBar.LoadToolBar(IDR_TOOLBAR_MENU))
        {
            TRACE0("Impossible de créer menu toolbar\n");
            return -1;      // fail to create
        }
        // Create toolbar Système
        
        if (!m_ToolBarSystem.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_ALIGN_TOP
            | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
            !m_ToolBarSystem.LoadToolBar(IDR_TOOLBAR_S))
        {
            TRACE0("Impossible de créer system toolbar\n");
            return -1;      // fail to create
        }
        m_ToolBarSystem.GetToolBarCtrl().SetExtendedStyle(TBSTYLE_EX_DRAWDDARROWS);
     
        m_ToolBarSystem.SetDropDown(IDR_TOOLBAR_Z);
        m_ToolBarSystem.SetDropDown(IDR_TOOLBAR_P);
        m_ToolBarSystem.SetDropDown(IDR_TOOLBAR_VIEW);
        m_ToolBarSystem.SetDropDown(IDR_TOOLBAR_SELECT);
        m_ToolBarSystem.SetDropDown(IDR_TOOLBAR_UNDO);
        
        m_MenuToolBar.SetWindowText("Modules");
        m_MenuToolBar.EnableDocking(CBRS_ALIGN_TOP);
      
        //ShowControlBar(&m_MenuToolBar, TRUE, FALSE); // je ne peux pas faire les ShowControlBar car ils plantent a l'execution aussi (meme chose que RecalcLayout)
     
        m_ToolBarSystem.SetWindowText("Systeme");
        m_ToolBarSystem.EnableDocking(CBRS_ALIGN_TOP);
    
    
       // Positionnement des toolbars
         EnableDocking(CBRS_ALIGN_ANY);
    
        DockControlBar(&m_MenuToolBar, AFX_IDW_DOCKBAR_TOP);
        DockControlBar(&m_ToolBarSystem,AFX_IDW_DOCKBAR_TOP);
    
        //DockControlBarLeftOf(&m_ToolBarSystem,&m_MenuToolBar); //meme fonction que precedemment qui contient un RecalcLayout()
        //ShowControlBar(&m_ToolBarSystem, TRUE, FALSE);
    d'abord l'enabledocking sur les toolbars, puis l'appel général ,puis le DockControlBar.

  16. #16
    Membre du Club
    Inscrit en
    Décembre 2006
    Messages
    166
    Détails du profil
    Informations personnelles :
    Âge : 44

    Informations forums :
    Inscription : Décembre 2006
    Messages : 166
    Points : 62
    Points
    62
    Par défaut
    Nop... ca veux toujours pas....

  17. #17
    Membre du Club
    Inscrit en
    Décembre 2006
    Messages
    166
    Détails du profil
    Informations personnelles :
    Âge : 44

    Informations forums :
    Inscription : Décembre 2006
    Messages : 166
    Points : 62
    Points
    62
    Par défaut
    J'ai trouvé d'ou ça venais : de ma CDialogBar au début du CMainFrame::OnCreate() si je la retire tout marche .. le RecalcLayout() et tout...

    Par contre j'en ai besoin de ma CDialogBar... le tout est de la rajouter proprement maintenant

  18. #18
    Rédacteur
    Avatar de farscape
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Novembre 2003
    Messages
    9 055
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Alpes Maritimes (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Novembre 2003
    Messages : 9 055
    Points : 17 323
    Points
    17 323
    Par défaut
    essaye d'enlever le style CBRS_HIDE_INPLACE.

  19. #19
    Membre du Club
    Inscrit en
    Décembre 2006
    Messages
    166
    Détails du profil
    Informations personnelles :
    Âge : 44

    Informations forums :
    Inscription : Décembre 2006
    Messages : 166
    Points : 62
    Points
    62
    Par défaut
    Corrigé

    J'ai copié/coller la fonction CalcDynamicLayout() de cette page WEB : http://support.microsoft.com/kb/q143255/
    (trouvé sur l'un des messages du forum)

    A ca marche impeccable... ma fonction CalcDynamicLayout() ne marchait plus avec VC2005.

    Précision : Ma fonction CalcDynamicLayout() est la meme que celle de la page support de Microsoft sauf que j'attachais ON_WM_SIZE() dessus... et c'est ca qui fait planter le reste....


    Merci pour ton aide farscape

  20. #20
    Membre du Club
    Inscrit en
    Décembre 2006
    Messages
    166
    Détails du profil
    Informations personnelles :
    Âge : 44

    Informations forums :
    Inscription : Décembre 2006
    Messages : 166
    Points : 62
    Points
    62
    Par défaut
    Alors le probleme avec le CalcDynamicLayout() est aussi résolu avec le lien avec ON_WM_SIZE()

    Tout simplement c'est que ma CDialogBar contient des élements qui n'étaient pas encore initialisés au moment ou OnSize() était appelé.

+ Répondre à la discussion
Cette discussion est résolue.
Page 1 sur 2 12 DernièreDernière

Discussions similaires

  1. [Migration VC6 -> VC8] Ambigüité avec MSXML
    Par JoSii dans le forum MFC
    Réponses: 3
    Dernier message: 17/01/2007, 16h24
  2. Réponses: 5
    Dernier message: 11/01/2007, 08h53
  3. probleme avec Mfc sous Vc6
    Par raggnar dans le forum MFC
    Réponses: 6
    Dernier message: 25/09/2006, 11h59
  4. Réponses: 7
    Dernier message: 11/07/2006, 09h31
  5. Réponses: 4
    Dernier message: 02/06/2005, 13h08

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo