Click here to Skip to main content
15,917,731 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: c++ basic class Pin
Daklan26-Feb-05 12:34
Daklan26-Feb-05 12:34 
GeneralRe: c++ basic class Pin
Anonymous27-Feb-05 10:20
Anonymous27-Feb-05 10:20 
GeneralChanging colours of a combo box Pin
Alton Williams26-Feb-05 10:08
Alton Williams26-Feb-05 10:08 
QuestionHow to set up dynamic context menus in MS Word Pin
Sabuncu26-Feb-05 7:12
Sabuncu26-Feb-05 7:12 
GeneralCrashes in international version Pin
JWood26-Feb-05 6:21
JWood26-Feb-05 6:21 
GeneralRe: Crashes in international version Pin
Michael Dunn26-Feb-05 6:51
sitebuilderMichael Dunn26-Feb-05 6:51 
GeneralRe: Crashes in international version Pin
JWood26-Feb-05 8:14
JWood26-Feb-05 8:14 
GeneralRe: Crashes in international version Pin
Michael Dunn26-Feb-05 9:23
sitebuilderMichael Dunn26-Feb-05 9:23 
GeneralRe: Crashes in international version Pin
JWood27-Feb-05 9:34
JWood27-Feb-05 9:34 
GeneralMinidumps! Pin
jhwurmbach27-Feb-05 1:08
jhwurmbach27-Feb-05 1:08 
GeneralRe: Minidumps! Pin
JWood27-Feb-05 9:32
JWood27-Feb-05 9:32 
GeneralRe: Minidumps! Pin
jhwurmbach27-Feb-05 21:04
jhwurmbach27-Feb-05 21:04 
GeneralTab Cntrl String issue Pin
realloc26-Feb-05 4:46
realloc26-Feb-05 4:46 
GeneralRe: Tab Cntrl String issue Pin
Ravi Bhavnani26-Feb-05 5:20
professionalRavi Bhavnani26-Feb-05 5:20 
GeneralRe: Tab Cntrl String issue Pin
Michael Dunn26-Feb-05 6:04
sitebuilderMichael Dunn26-Feb-05 6:04 
I see four problems there.
1. You're not zero-initializing the TCITEM struct. Always do this.
TCITEM tab = {0};
2. The TCIF_* flags go in the mask member, not dwStateMask.
3. The cchTextMax member is set to 25, not the actual length of the string. cchTextMax is actually not used when you're setting the text, since the control assumes the string is zero-terminated, but the fact that you're setting it wrong makes me think you'll have problems elsewhere when cchTextMax is used.
4. You're storing a TCITEM struct in a list, but the TCITEM contains a pointer to a char array on the stack. As soon as that array goes out of scope, the pointer becomes invalid.

--Mike--
LINKS~! Ericahist updated! | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ
Strange things are afoot at the U+004B U+20DD

GeneralRe: Tab Cntrl String issue Pin
realloc26-Feb-05 6:47
realloc26-Feb-05 6:47 
GeneralRe: Tab Cntrl String issue Pin
Michael Dunn26-Feb-05 12:40
sitebuilderMichael Dunn26-Feb-05 12:40 
Generalnamespaces and libraries Pin
Anonymous26-Feb-05 2:21
Anonymous26-Feb-05 2:21 
GeneralRe: namespaces and libraries Pin
Michael Dunn26-Feb-05 4:32
sitebuilderMichael Dunn26-Feb-05 4:32 
GeneralPicture Tracking ... Not compilable to VS.NET 2005 Pin
x2bf326-Feb-05 0:28
x2bf326-Feb-05 0:28 
QuestionTo change the last-modified time of a file? Pin
Monisankar25-Feb-05 23:48
Monisankar25-Feb-05 23:48 
AnswerRe: To change the last-modified time of a file? Pin
David Crow26-Feb-05 3:23
David Crow26-Feb-05 3:23 
AnswerRe: To change the last-modified time of a file? Pin
Ravi Bhavnani26-Feb-05 4:27
professionalRavi Bhavnani26-Feb-05 4:27 
GeneralPerfect coders wanted (freelancers) Pin
PavelMenshikov25-Feb-05 23:44
PavelMenshikov25-Feb-05 23:44 
GeneralRe: Perfect coders wanted (freelancers) Pin
Ravi Bhavnani26-Feb-05 4:33
professionalRavi Bhavnani26-Feb-05 4:33 

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.