Click here to Skip to main content
15,907,874 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to avoid flickering in CListCtrl Pin
shir_k19-Sep-07 18:11
shir_k19-Sep-07 18:11 
AnswerRe: How to avoid flickering in CListCtrl Pin
Nelek19-Sep-07 20:08
protectorNelek19-Sep-07 20:08 
GeneralRe: How to avoid flickering in CListCtrl Pin
shir_k20-Sep-07 20:36
shir_k20-Sep-07 20:36 
GeneralRe: How to avoid flickering in CListCtrl Pin
Nelek21-Sep-07 1:44
protectorNelek21-Sep-07 1:44 
AnswerRe: How to avoid flickering in CListCtrl Pin
David Crow20-Sep-07 2:45
David Crow20-Sep-07 2:45 
GeneralRe: How to avoid flickering in CListCtrl Pin
shir_k20-Sep-07 20:24
shir_k20-Sep-07 20:24 
QuestionRe: How to avoid flickering in CListCtrl Pin
David Crow21-Sep-07 2:40
David Crow21-Sep-07 2:40 
QuestionHelp me convert Pin
monsieur_jj19-Sep-07 16:15
monsieur_jj19-Sep-07 16:15 
Hi all,

I am having an issue converting this

string pRetVal;
	// make sure the requested property's type is unicode
	if ((PROP_TYPE_MASK & PropertyID) != PT_STRING8)
	{
		return 0;
	}

	// find the property
	redmap::mapi::FoundProperty prop = m_Message->FindProperty(PropertyID);
	
	if (prop.second)
	{
		pRetVal = _bstr_t(prop.first.lpszW);
		return (pRetVal);
	} 
	else 
	{
		pRetVal = ("");
		return (pRetVal);
	}


There is something wrong in how I am converting prop.first.lpszW because the out put I am getting is instead of "text here" I am getting "????????"

originally this is a COM made snippet

BSTR* pRetVal;
if ((PROP_TYPE_MASK & PropertyID) != PT_STRING8)
	{
		Error("Invalid property type");
		return E_FAIL;
	}

	// find the property
	redmap::mapi::FoundProperty prop = m_Message->FindProperty(PropertyID);

	if (prop.second)
	{
		// BSTR-convert and return the property value
		ATL::CComBSTR bstr (prop.first.lpszA);
		return bstr.CopyTo(pRetVal);
	} 
	else 
	{
		ATL::CComBSTR bstr (L"");
		return bstr.CopyTo(pRetVal);
	}


Now what is wrong with my conversion? What is the right thing to do?

Thank you all,
Jj
AnswerRe: Help me convert Pin
monsieur_jj19-Sep-07 17:07
monsieur_jj19-Sep-07 17:07 
QuestionMemory Corruption [modified] Pin
devvvy19-Sep-07 15:59
devvvy19-Sep-07 15:59 
AnswerRe: Memory Corruption Pin
Roger Broomfield19-Sep-07 18:07
Roger Broomfield19-Sep-07 18:07 
GeneralRe: Memory Corruption Pin
devvvy19-Sep-07 18:10
devvvy19-Sep-07 18:10 
QuestionHow to Monitor an application which required kill and regenerate if hang Pin
littlecheer19-Sep-07 15:18
littlecheer19-Sep-07 15:18 
AnswerRe: Monitor an application - kill and regenerate if hang Pin
Nathan Holt at EMOM19-Sep-07 15:42
Nathan Holt at EMOM19-Sep-07 15:42 
GeneralRe: Monitor an application - kill and regenerate if hang Pin
littlecheer19-Sep-07 15:55
littlecheer19-Sep-07 15:55 
GeneralRe: Monitor an application - kill and regenerate if hang Pin
devvvy19-Sep-07 18:49
devvvy19-Sep-07 18:49 
GeneralRe: Monitor an application - kill and regenerate if hang Pin
ThatsAlok19-Sep-07 20:35
ThatsAlok19-Sep-07 20:35 
GeneralRe: Monitor an application - kill and regenerate if hang Pin
devvvy19-Sep-07 20:43
devvvy19-Sep-07 20:43 
GeneralRe: Monitor an application - kill and regenerate if hang Pin
littlecheer19-Sep-07 22:26
littlecheer19-Sep-07 22:26 
QuestionMessage Removed Pin
19-Sep-07 12:01
Armond Sarkisian19-Sep-07 12:01 
AnswerRe: Checking for downloadable link Pin
Mark Salsbery19-Sep-07 12:13
Mark Salsbery19-Sep-07 12:13 
GeneralMessage Removed Pin
19-Sep-07 12:16
Armond Sarkisian19-Sep-07 12:16 
GeneralRe: Checking for downloadable link Pin
ThatsAlok19-Sep-07 20:36
ThatsAlok19-Sep-07 20:36 
QuestionGPS Open just right after Close=> Error Pin
shpid3r19-Sep-07 11:04
shpid3r19-Sep-07 11:04 
AnswerRe: GPS Open just right after Close=> Error Pin
Nathan Holt at EMOM19-Sep-07 11:34
Nathan Holt at EMOM19-Sep-07 11:34 

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.