Click here to Skip to main content
14,977,850 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to avoid flickering in CListCtrl Pin
shir_k19-Sep-07 18:11
Membershir_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
Membershir_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
MemberDavid Crow20-Sep-07 2:45 
GeneralRe: How to avoid flickering in CListCtrl Pin
shir_k20-Sep-07 20:24
Membershir_k20-Sep-07 20:24 
QuestionRe: How to avoid flickering in CListCtrl Pin
David Crow21-Sep-07 2:40
MemberDavid Crow21-Sep-07 2:40 
QuestionHelp me convert Pin
monsieur_jj19-Sep-07 16:15
Membermonsieur_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
Membermonsieur_jj19-Sep-07 17:07 
QuestionMemory Corruption [modified] Pin
devvvy19-Sep-07 15:59
Memberdevvvy19-Sep-07 15:59 
AnswerRe: Memory Corruption Pin
Roger Broomfield19-Sep-07 18:07
MemberRoger Broomfield19-Sep-07 18:07 
GeneralRe: Memory Corruption Pin
devvvy19-Sep-07 18:10
Memberdevvvy19-Sep-07 18:10 
QuestionHow to Monitor an application which required kill and regenerate if hang Pin
littlecheer19-Sep-07 15:18
Memberlittlecheer19-Sep-07 15:18 
AnswerRe: Monitor an application - kill and regenerate if hang Pin
Nathan Holt at EMOM19-Sep-07 15:42
MemberNathan Holt at EMOM19-Sep-07 15:42 
GeneralRe: Monitor an application - kill and regenerate if hang Pin
littlecheer19-Sep-07 15:55
Memberlittlecheer19-Sep-07 15:55 
GeneralRe: Monitor an application - kill and regenerate if hang Pin
devvvy19-Sep-07 18:49
Memberdevvvy19-Sep-07 18:49 
GeneralRe: Monitor an application - kill and regenerate if hang Pin
ThatsAlok19-Sep-07 20:35
MemberThatsAlok19-Sep-07 20:35 
GeneralRe: Monitor an application - kill and regenerate if hang Pin
devvvy19-Sep-07 20:43
Memberdevvvy19-Sep-07 20:43 
GeneralRe: Monitor an application - kill and regenerate if hang Pin
littlecheer19-Sep-07 22:26
Memberlittlecheer19-Sep-07 22:26 
AnswerRe: Checking for downloadable link Pin
Mark Salsbery19-Sep-07 12:13
MemberMark Salsbery19-Sep-07 12:13 
GeneralRe: Checking for downloadable link Pin
ThatsAlok19-Sep-07 20:36
MemberThatsAlok19-Sep-07 20:36 
QuestionGPS Open just right after Close=> Error Pin
shpid3r19-Sep-07 11:04
Membershpid3r19-Sep-07 11:04 
AnswerRe: GPS Open just right after Close=> Error Pin
Nathan Holt at EMOM19-Sep-07 11:34
MemberNathan Holt at EMOM19-Sep-07 11:34 
AnswerRe: GPS Open just right after Close=> Error Pin
shpid3r19-Sep-07 15:00
Membershpid3r19-Sep-07 15:00 
GeneralRe: GPS Open just right after Close=> Error Pin
Nathan Holt at EMOM19-Sep-07 15:12
MemberNathan Holt at EMOM19-Sep-07 15:12 

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.