Click here to Skip to main content
15,897,187 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionBackground color chaning issue... Pin
Axonn Echysttas16-Jan-06 19:01
Axonn Echysttas16-Jan-06 19:01 
AnswerRe: Background color changing issue... Pin
Owner drawn16-Jan-06 19:16
Owner drawn16-Jan-06 19:16 
GeneralRe: Background color changing issue... Pin
Axonn Echysttas16-Jan-06 19:58
Axonn Echysttas16-Jan-06 19:58 
GeneralRe: Background color changing issue... Pin
Stephen Hewitt16-Jan-06 20:06
Stephen Hewitt16-Jan-06 20:06 
GeneralRe: Background color changing issue... Pin
Axonn Echysttas16-Jan-06 20:35
Axonn Echysttas16-Jan-06 20:35 
GeneralRe: Background color changing issue... Pin
Owner drawn16-Jan-06 20:19
Owner drawn16-Jan-06 20:19 
GeneralRe: Background color changing issue... Pin
Axonn Echysttas16-Jan-06 20:36
Axonn Echysttas16-Jan-06 20:36 
QuestionSysFreeString misbehaving :( ??? Pin
nutkase16-Jan-06 18:34
nutkase16-Jan-06 18:34 
Ok the problem is a lil strange, i am all confused how the hell is this possible, lemme explain with an example...

void Test()<br />
{<br />
       CComBSTR bstrOne("abc");<br />
       {<br />
              CComBSTR bstrTwo("xyz");<br />
       }<br />
       AfxMessageBox(CString(bstrOne));<br />
}


Now this is what happens sometimes.. when the destructor of bstrTwo is called it calls ::SysFreeString( m_str ) and this free's the string of bstrOne. I have checked the address passed to ::SysFreeString it is the address of bstrTwo.m_str, i just dont understand how the string at bstrOne.m_str is freed. If anyone can explain me this. One more thing it doesn't always happens this way.. It just happens when i copy data on clipboard. The only special thing i am doing is that i have written a custom COM component to handle my Clipboard requests. This actually happens in that code. I understand there is some problem with my code.. but what i dont understand is how does ::SysFreeString(something) frees something else.

:-> WHATEVER :->
AnswerRe: SysFreeString misbehaving :( ??? Pin
Stephen Hewitt17-Jan-06 13:26
Stephen Hewitt17-Jan-06 13:26 
GeneralRe: SysFreeString misbehaving :( ??? Pin
nutkase17-Jan-06 18:08
nutkase17-Jan-06 18:08 
GeneralRe: SysFreeString misbehaving :( ??? Pin
Stephen Hewitt17-Jan-06 18:17
Stephen Hewitt17-Jan-06 18:17 
QuestionHow to read the data from PDF file Pin
S_a_n16-Jan-06 16:42
S_a_n16-Jan-06 16:42 
AnswerRe: How to read the data from PDF file Pin
Christian Graus16-Jan-06 16:45
protectorChristian Graus16-Jan-06 16:45 
GeneralRe: How to read the data from PDF file Pin
S_a_n16-Jan-06 16:54
S_a_n16-Jan-06 16:54 
GeneralRe: How to read the data from PDF file Pin
Christian Graus16-Jan-06 16:56
protectorChristian Graus16-Jan-06 16:56 
GeneralRe: How to read the data from PDF file Pin
Anders Gustafsson16-Jan-06 20:32
Anders Gustafsson16-Jan-06 20:32 
GeneralRe: How to read the data from PDF file Pin
basementman17-Jan-06 3:56
basementman17-Jan-06 3:56 
QuestionHow to inerface with COM Objects? Pin
Divyang Mithaiwala16-Jan-06 16:33
Divyang Mithaiwala16-Jan-06 16:33 
AnswerRe: How to inerface with COM Objects? Pin
Christian Graus16-Jan-06 16:45
protectorChristian Graus16-Jan-06 16:45 
GeneralRe: How to inerface with COM Objects? Pin
Divyang Mithaiwala16-Jan-06 16:52
Divyang Mithaiwala16-Jan-06 16:52 
AnswerRe: How to inerface with COM Objects? Pin
Stephen Hewitt16-Jan-06 16:51
Stephen Hewitt16-Jan-06 16:51 
GeneralRe: How to inerface with COM Objects? Pin
Divyang Mithaiwala16-Jan-06 17:03
Divyang Mithaiwala16-Jan-06 17:03 
GeneralRe: How to inerface with COM Objects? Pin
Stephen Hewitt16-Jan-06 17:15
Stephen Hewitt16-Jan-06 17:15 
AnswerRe: How to inerface with COM Objects? Pin
vallikumar16-Jan-06 18:36
vallikumar16-Jan-06 18:36 
QuestionHow to show part of a sketch in a dialog Pin
sandyzf16-Jan-06 16:22
sandyzf16-Jan-06 16:22 

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.