Click here to Skip to main content
15,893,622 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to find Child Window of another Application? Pin
narayanagvs5-Dec-07 23:50
narayanagvs5-Dec-07 23:50 
QuestionHow to change the background of the slider control Pin
yaminisridaran5-Dec-07 23:23
yaminisridaran5-Dec-07 23:23 
AnswerRe: How to change the background of the slider control Pin
Naveen6-Dec-07 2:10
Naveen6-Dec-07 2:10 
GeneralDrag in CListCtrl, the dragging image doesn't cover the orignal image wholely when start dragging [modified] Pin
followait5-Dec-07 23:21
followait5-Dec-07 23:21 
GeneralAccess a remote hard disk. Pin
vijay_aroli5-Dec-07 22:52
vijay_aroli5-Dec-07 22:52 
QuestionGet events via CWMPPlayer4 Pin
sleepfox5-Dec-07 22:48
sleepfox5-Dec-07 22:48 
AnswerRe: Get events via CWMPPlayer4 Pin
zandar the great29-Sep-08 10:01
zandar the great29-Sep-08 10:01 
GeneralWhere to submit C++ Games Pin
Vince Rojas5-Dec-07 22:30
Vince Rojas5-Dec-07 22:30 
GeneralRe: Where to submit C++ Games Pin
toxcct5-Dec-07 22:33
toxcct5-Dec-07 22:33 
GeneralRe: Where to submit C++ Games Pin
Vince Rojas5-Dec-07 22:36
Vince Rojas5-Dec-07 22:36 
GeneralRe: Where to submit C++ Games Pin
toxcct5-Dec-07 22:39
toxcct5-Dec-07 22:39 
GeneralRe: Where to submit C++ Games Pin
Vince Rojas5-Dec-07 22:44
Vince Rojas5-Dec-07 22:44 
GeneralRe: Where to submit C++ Games Pin
toxcct5-Dec-07 22:47
toxcct5-Dec-07 22:47 
GeneralRe: Where to submit C++ Games [modified] Pin
Nelek5-Dec-07 23:02
protectorNelek5-Dec-07 23:02 
GeneralRe: Where to submit C++ Games Pin
ThatsAlok6-Dec-07 0:21
ThatsAlok6-Dec-07 0:21 
GeneralRe: Where to submit C++ Games Pin
Cedric Moonen6-Dec-07 0:00
Cedric Moonen6-Dec-07 0:00 
GeneralThanks Pin
Vince Rojas6-Dec-07 15:42
Vince Rojas6-Dec-07 15:42 
GeneralRe: Thanks Pin
ThatsAlok6-Dec-07 20:17
ThatsAlok6-Dec-07 20:17 
GeneralRe: Thanks Pin
Nelek6-Dec-07 21:23
protectorNelek6-Dec-07 21:23 
GeneralRead a byte stream into separate buffers. Pin
CodingLover5-Dec-07 22:22
CodingLover5-Dec-07 22:22 
GeneralRe: Read a byte stream into separate buffers. [modified] Pin
toxcct5-Dec-07 22:31
toxcct5-Dec-07 22:31 
GeneralRe: Read a byte stream into separate buffers. Pin
CodingLover5-Dec-07 22:51
CodingLover5-Dec-07 22:51 
GeneralRe: Read a byte stream into separate buffers. Pin
toxcct5-Dec-07 22:55
toxcct5-Dec-07 22:55 
GeneralRe: Read a byte stream into separate buffers. Pin
CodingLover5-Dec-07 23:04
CodingLover5-Dec-07 23:04 
GeneralRe: Read a byte stream into separate buffers. [modified] Pin
toxcct5-Dec-07 23:05
toxcct5-Dec-07 23:05 
what about using strncpy() and pass it the integer formerly extracted ?
<font color="green">//The 4 bytes buffer</font>
 nSize = 0;
 
<font color="green">//The 4 bytes extract</font>
::memcpy(&nSize, InMsg.GetDataBuffer(), <font color="blue">sizeof</font>(nSize));
 
char* pszBuffer = new char[nSize + 1];  <font color="green">//+1 is for the trailing \0 character</font>
::strncpy(pszBuffer, <font color="green">/* your source data */</font>, nSize);
pszBuffer[nSize] = <font color="gray">'\0'</font>;
std::string strData = pszBuffer;
delete[] pszBuffer;



modified on Thursday, December 06, 2007 5:15:54 AM

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.