Click here to Skip to main content
15,902,299 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRegistry problem(UAC Off or On) Pin
MsmVc31-Oct-08 2:20
MsmVc31-Oct-08 2:20 
AnswerRe: Registry problem(UAC Off or On) Pin
Rajesh R Subramanian31-Oct-08 2:42
professionalRajesh R Subramanian31-Oct-08 2:42 
QuestionASCII to UNICODE Pin
CodingLover31-Oct-08 2:17
CodingLover31-Oct-08 2:17 
AnswerRe: ASCII to UNICODE Pin
David Crow31-Oct-08 2:47
David Crow31-Oct-08 2:47 
AnswerRe: ASCII to UNICODE Pin
CPallini31-Oct-08 2:51
mveCPallini31-Oct-08 2:51 
AnswerRe: ASCII to UNICODE Pin
Nishad S31-Oct-08 2:57
Nishad S31-Oct-08 2:57 
QuestionRe: ASCII to UNICODE Pin
CodingLover31-Oct-08 3:01
CodingLover31-Oct-08 3:01 
AnswerRe: ASCII to UNICODE - What I've done so far Pin
CodingLover31-Oct-08 3:12
CodingLover31-Oct-08 3:12 
Here what I have done so far.

<br />
<br />
	int temp = InMsg[0]; // In the buffer 0th byte contain the int value<br />
<br />
	stringstream str(ios::in|ios::out|ios::binary);<br />
	if(CopyTo(str) == 0) // This return the stream correctly<br />
	{<br />
		wchar_t* results = new wchar_t[1];<br />
		swprintf(results, L"%d", temp);<br />
		<br />
		InMsg.Attach(results, 0); // I'm stuck here<br />
	}<br />


My attach function like this.

<br />
bool CRfMessage::Attach(istream& str, const UINT offset)<br />
{<br />
	size_t		buffer_size;<br />
<br />
	if(str.bad()) <br />
		return false;<br />
<br />
	str.seekg(0,ios_base::end);<br />
<br />
	buffer_size = str.tellg();<br />
<br />
	char* payload = (char*)AdjustDataSize((UINT)buffer_size+offset);<br />
<br />
	//	move to begin and read in to message buffer<br />
	str.seekg(0,ios_base::beg).read(payload+offset,buffer_size);<br />
<br />
	return true;<br />
}<br />


I appreciate your help all the time...
CodingLover Smile | :)

AnswerRe: ASCII to UNICODE Pin
sashoalm31-Oct-08 8:06
sashoalm31-Oct-08 8:06 
QuestionHow to send email through coding? Pin
AnayKulkarni31-Oct-08 1:19
AnayKulkarni31-Oct-08 1:19 
AnswerRe: How to send email through coding? Pin
David Crow31-Oct-08 2:49
David Crow31-Oct-08 2:49 
QuestionMS Compiler Pin
Daniel Kanev31-Oct-08 0:18
Daniel Kanev31-Oct-08 0:18 
AnswerRe: MS Compiler Pin
Maximilien31-Oct-08 0:29
Maximilien31-Oct-08 0:29 
AnswerRe: MS Compiler Pin
CPallini31-Oct-08 0:33
mveCPallini31-Oct-08 0:33 
AnswerRe: MS Compiler Pin
Alan Balkany31-Oct-08 4:26
Alan Balkany31-Oct-08 4:26 
GeneralRe: MS Compiler Pin
Michael Dunn31-Oct-08 12:06
sitebuilderMichael Dunn31-Oct-08 12:06 
Questionhow to set the cmd line option in visual studio 2005 Pin
ptr_Electron30-Oct-08 22:46
ptr_Electron30-Oct-08 22:46 
AnswerRe: how to set the cmd line option in visual studio 2005 [modified] Pin
Windows Koder30-Oct-08 23:15
Windows Koder30-Oct-08 23:15 
Question[solved] CScrollView can't scroll [modified] Pin
followait30-Oct-08 22:01
followait30-Oct-08 22:01 
AnswerRe: CScrollView can't scroll Pin
Iain Clarke, Warrior Programmer31-Oct-08 0:48
Iain Clarke, Warrior Programmer31-Oct-08 0:48 
GeneralRe: CScrollView can't scroll Pin
followait31-Oct-08 1:39
followait31-Oct-08 1:39 
GeneralRe: CScrollView can't scroll Pin
CPallini31-Oct-08 1:49
mveCPallini31-Oct-08 1:49 
GeneralRe: CScrollView can't scroll Pin
led mike31-Oct-08 4:26
led mike31-Oct-08 4:26 
Questionparent and child values Pin
MsmVc30-Oct-08 21:48
MsmVc30-Oct-08 21:48 
AnswerRe: parent and child values Pin
CPallini30-Oct-08 22:30
mveCPallini30-Oct-08 22:30 

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.