Bonjour,

j'ai une fenètre dérivée de CFrameWnd qui apparait, avec une toolbar.
voici le code :

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
 
// VisualisationLoi.cpp : implementation file
//
 
#include "stdafx.h"
#include "resource.h"       // symboles principaux
 
#include "VisualisationLoi.h"
 
 
// CVisualisationLoi
 
IMPLEMENT_DYNCREATE(CVisualisationLoi, CFrameWnd)
 
CVisualisationLoi::CVisualisationLoi()
{
 
}
 
CVisualisationLoi::~CVisualisationLoi()
{
}
 
//_______________________________________________________________
 
BEGIN_MESSAGE_MAP(CVisualisationLoi, CFrameWnd)
	ON_WM_CREATE()
	ON_COMMAND(ID_GAIN_BEZIER,GainBezier)
END_MESSAGE_MAP()
 
 
// CVisualisationLoi message handlers
//_______________________________________________________________
 
 
 
//_____________________________________________________________________________
int CVisualisationLoi::OnCreate(LPCREATESTRUCT lpCreateStruct) 	{
	if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
		return -1;
 
	// TODO:  Add your specialized creation code here
 
 
	if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_DISABLED | CBRS_TOP
		| CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY |  CBRS_BORDER_3D ) ||
		!m_wndToolBar.LoadToolBar(IDR_LOIS))
		{
		TRACE0("Failed to create toolbar\n");
		return -1;      // fail to create
		} //if
 
 
ToolBarLois=static_cast<CToolBar *>(&m_wndToolBar);
ShowControlBar(ToolBarLois, TRUE,TRUE );
 
	return 0;
} //proc
 
 
//_______________________________________________________________
void CVisualisationLoi::GainBezier() {
 
TRACE("Gain Bézier\n");
}//proc
ma toolbar comporte 4 boutons (j'sais pas si c'est le terme ...)
3 sont grisés, 1 seul est affiché correctement : c'est normal, car je ne gère qu'un seul message ID_GAIN_BEZIER

mais rien ne se passe en cliquant dessus ...

pourtant j'ai exactement le même code dans ma MainFrame, qui a aussi une toolbar, et celle-ci fonctionne ...

Qu'est ce que j'ai mal fait ?
Merci d'avance