Click here to Skip to main content
15,925,602 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generaladd a short cut Pin
aguest7-Jun-03 11:17
aguest7-Jun-03 11:17 
GeneralRe: add a short cut Pin
includeh107-Jun-03 12:08
includeh107-Jun-03 12:08 
GeneralRe: add a short cut Pin
aguest7-Jun-03 14:15
aguest7-Jun-03 14:15 
GeneralRe: add a short cut Pin
includeh107-Jun-03 14:22
includeh107-Jun-03 14:22 
GeneralRe: add a short cut Pin
aguest7-Jun-03 14:24
aguest7-Jun-03 14:24 
GeneralRe: add a short cut Pin
includeh107-Jun-03 14:38
includeh107-Jun-03 14:38 
GeneralRe: add a short cut Pin
aguest7-Jun-03 14:58
aguest7-Jun-03 14:58 
QuestionHow to slow down process in Windows Pin
Valera2411767-Jun-03 9:30
Valera2411767-Jun-03 9:30 
AnswerRe: How to slow down process in Windows Pin
PJ Arends7-Jun-03 10:14
professionalPJ Arends7-Jun-03 10:14 
AnswerRe: How to slow down process in Windows Pin
Ravi Bhavnani7-Jun-03 10:27
professionalRavi Bhavnani7-Jun-03 10:27 
Questionhow to change field order in *.mdb Pin
Wormhole52307-Jun-03 9:29
Wormhole52307-Jun-03 9:29 
AnswerRe: how to change field order in *.mdb Pin
Ryan Binns8-Jun-03 4:54
Ryan Binns8-Jun-03 4:54 
Generalc++ question Pin
includeh107-Jun-03 8:44
includeh107-Jun-03 8:44 
GeneralRe: syntax question Pin
Joaquín M López Muñoz7-Jun-03 9:51
Joaquín M López Muñoz7-Jun-03 9:51 
GeneralThe Heap Pin
Ken Mazaika7-Jun-03 8:31
Ken Mazaika7-Jun-03 8:31 
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 

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.