Click here to Skip to main content
15,920,687 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: The Heap Pin
Vikram A Punathambekar7-Jun-03 9:32
Vikram A Punathambekar7-Jun-03 9:32 
QuestionHooking other applications? Pin
User 66587-Jun-03 8:20
User 66587-Jun-03 8:20 
AnswerRe: Hooking other applications? Pin
jmkhael7-Jun-03 11:48
jmkhael7-Jun-03 11:48 
GeneralRe: Hooking other applications? Pin
User 66587-Jun-03 12:44
User 66587-Jun-03 12:44 
GeneralFontSize Pin
Cpudood7-Jun-03 6:47
Cpudood7-Jun-03 6:47 
GeneralRe: FontSize Pin
Vikram A Punathambekar7-Jun-03 9:37
Vikram A Punathambekar7-Jun-03 9:37 
GeneralSmart Card Inserts & Removes Pin
Fad B7-Jun-03 6:39
Fad B7-Jun-03 6:39 
GeneralResize CToolbar Pin
Konrad Windszus7-Jun-03 3:24
Konrad Windszus7-Jun-03 3:24 
I use a toolbar within an dialog. This toolbar is resized, whenever the dialog is resized via a call to SetSizes (the height and the width are changed). But sometimes if the dialog windows was inactive for some time, the toolbar gets the wrong size. Looking into the code of CToolBar::SetSizes I found the following:
<br />
if (::IsWindow(m_hWnd))<br />
{<br />
// set the sizes via TB_SETBITMAPSIZE and TB_SETBUTTONSIZE<br />
VERIFY(SendMessage(TB_SETBITMAPSIZE, 0, MAKELONG(sizeImage.cx,<br />
sizeImage.cy)));<br />
VERIFY(SendMessage(TB_SETBUTTONSIZE, 0, MAKELONG(sizeButton.cx,<br />
sizeButton.cy)));<br />
Invalidate(); // just to be nice if called when toolbar is visible<br />
}<br />
else<br />
{<br />
// just set our internal values for later<br />
m_sizeButton = sizeButton;<br />
m_sizeImage = sizeImage;<br />
}


I think the problem is that the toolbar is only resized, but the new size isn't stored in the local variables m_sizeButton and m_sizeImage. I can't access them because they are private. It seems that sometimes, the Toolbar is completely redrawn with the sizes stored in m_sizeButton and m_sizeImage. I think this is a bug in CToolbar. It should always set the local variables to the current sizes (no matter if the window exists already or not). How can I get around this bug.
In which method the Toolbar is redrawn with the sizes from m_sizeButton/Image? When is this method called? And the most important question, how can get around this?
I use Visual Studio 2003 with the MFC 7.1. Thanks in advance, Konrad Windszus
GeneralCListCtrl bug Pin
Konrad Windszus7-Jun-03 3:19
Konrad Windszus7-Jun-03 3:19 
GeneralStatusbar text for toolbar Pin
Konrad Windszus7-Jun-03 3:11
Konrad Windszus7-Jun-03 3:11 
GeneralRe: Statusbar text for toolbar Pin
Maximilien7-Jun-03 3:33
Maximilien7-Jun-03 3:33 
GeneralRe: Statusbar text for toolbar Pin
Konrad Windszus7-Jun-03 3:36
Konrad Windszus7-Jun-03 3:36 
GeneralRe: Statusbar text for toolbar Pin
Roger Allen9-Jun-03 0:39
Roger Allen9-Jun-03 0:39 
Generaladdress parsing Pin
Rome Singh7-Jun-03 0:54
Rome Singh7-Jun-03 0:54 
GeneralRe: address parsing Pin
RichardGrimmer10-Jun-03 5:13
RichardGrimmer10-Jun-03 5:13 
GeneralQuestion about 'CreateEvent' method Pin
Anonymous6-Jun-03 23:35
Anonymous6-Jun-03 23:35 
GeneralRe: Question about 'CreateEvent' method Pin
Mike Nordell7-Jun-03 5:36
Mike Nordell7-Jun-03 5:36 
GeneralRe: Question about 'CreateEvent' method Pin
Michael Dunn7-Jun-03 6:44
sitebuilderMichael Dunn7-Jun-03 6:44 
GeneralClient Details Pin
SatyaDY6-Jun-03 21:45
SatyaDY6-Jun-03 21:45 
GeneralRe: Client Details Pin
Mike Nordell7-Jun-03 5:48
Mike Nordell7-Jun-03 5:48 
GeneralRe: Client Details Pin
Laimis7-Jun-03 9:25
Laimis7-Jun-03 9:25 
GeneralRe: Client Details Pin
SatyaDY8-Jun-03 17:52
SatyaDY8-Jun-03 17:52 
GeneralCPropertySheet &amp; CPropertyPage Pin
ladder6-Jun-03 19:25
ladder6-Jun-03 19:25 
GeneralRe: CPropertySheet &amp; CPropertyPage Pin
olinn7-Jun-03 1:24
olinn7-Jun-03 1:24 
GeneralRe: CPropertySheet &amp; CPropertyPage Pin
ladder8-Jun-03 17:10
ladder8-Jun-03 17:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.