Toolbar Activation Problem
Joseph M. Koral -- jkoral@tiac.net Friday, July 26, 1996 In response to the toolbar problems experienced after installing the new = COMCTL32.DLL that ships with IE 3.0 Beta 2 and MS News and Mail: My guess is that you are not going through the new CToolBar::LoadToolBar = method and instead performing the old style CToolBar::LoadBitmap, and = CToolBar::SetButtons mechanism generated by MFC 3.x AppWizard. (In = other words, if you still have the array of button ids, static UINT = buttons[], in your mainfrm.cpp, you are using the old mechanism). The new mechanism, (which uses the RT_TOOLBAR resource type) calls = CToolBar::LoadToolBar, which implicitly calls CToolBar::SetSizes. This = call, which sends the TB_SETBITMAPSIZE and TB_SETBUTTONSIZE, should be = unnecessary (according to the Win32 SDK) when using the standard bitmap = and button sizes (16x15 and 24x22, respectively) generated by MFC. However, I found that adding this explicit call to SetSizes, fixed the = toolbar painting problems I experienced with the new COMCTL32.DLL. I = reported this problem and my solution to Microsoft some time ago. - joseph
Christine Hagberg -- CHAGBERG@datx.com Wednesday, July 31, 1996 I had a 2.2 app which I converted to 4.0. I created a toolbar and called LoadToolBar rather than LoadBitmap. I then made a call to SetSizes right after creating the toolbar. I still have the painting problem with the toolbar. What am I doing wrong. I think my problem is I do not know where to make the explicit call to SetSizes. I am currently calling SetSizes right after I create the toolbar. Where should I call SetSizes? (Oh and yes I too am using the IE 3.0 Beta 2) Thanks in advance Chris Hagberg (chagberg@datx.com) >In response to the toolbar problems experienced after installing the new = >COMCTL32.DLL that ships with IE 3.0 Beta 2 and MS News and Mail: >My guess is that you are not going through the new CToolBar::LoadToolBar = >method and instead performing the old style CToolBar::LoadBitmap, and = >CToolBar::SetButtons mechanism generated by MFC 3.x AppWizard. (In = >other words, if you still have the array of button ids, static UINT = >buttons[], in your mainfrm.cpp, you are using the old mechanism). >The new mechanism, (which uses the RT_TOOLBAR resource type) calls = >CToolBar::LoadToolBar, which implicitly calls CToolBar::SetSizes. This = >call, which sends the TB_SETBITMAPSIZE and TB_SETBUTTONSIZE, should be = >unnecessary (according to the Win32 SDK) when using the standard bitmap = >and button sizes (16x15 and 24x22, respectively) generated by MFC. >However, I found that adding this explicit call to SetSizes, fixed the = >toolbar painting problems I experienced with the new COMCTL32.DLL. I = >reported this problem and my solution to Microsoft some time ago.
| Вернуться в корень Архива |