How to move a CToolBar?
C / C++ / MFC
1
Posts
1
Posters
0
Views
1
Watching
-
Hi, I have a dialog in which I have a toolbar in the middle of the dialog window. I put the toolbar there with a m_wndMiddleButtons.SetWindowPlacement(&wpl) in OnInitDialog. m_wndMiddleButtons is a CToolBar and wpl is a WINDOWPLACEMENT structure. I have to move this toolbar in the OnSize method of my dialog, but when I can (from OnSize) m_wndMiddleButtons.SetWindowPlacement(&wpl) my app crashes. I can't call any method of m_wndMiddleButtons without a crash. Anybody nows a method for solving this problem? Thanks. ----- We are what we repeatedly do. Excellence, then, is not an act, but a habit.