Click here to Skip to main content
15,894,276 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Unditable combobox via code Pin
hariakuthota23-Jul-08 8:43
hariakuthota23-Jul-08 8:43 
QuestionRun time error when ticked the option "owner draw" for a button Pin
hariakuthota23-Jul-08 6:53
hariakuthota23-Jul-08 6:53 
AnswerRe: Run time error when ticked the option "owner draw" for a button Pin
CPallini23-Jul-08 6:56
mveCPallini23-Jul-08 6:56 
GeneralRe: Run time error when ticked the option "owner draw" for a button Pin
Luc Pattyn23-Jul-08 7:11
sitebuilderLuc Pattyn23-Jul-08 7:11 
GeneralRe: Run time error when ticked the option "owner draw" for a button Pin
CPallini23-Jul-08 7:13
mveCPallini23-Jul-08 7:13 
GeneralRe: Run time error when ticked the option "owner draw" for a button Pin
Luc Pattyn23-Jul-08 8:04
sitebuilderLuc Pattyn23-Jul-08 8:04 
GeneralRe: Run time error when ticked the option "owner draw" for a button Pin
CPallini23-Jul-08 9:26
mveCPallini23-Jul-08 9:26 
Questionhow to truncate a string based on buffer size. Pin
Nandu_77b23-Jul-08 6:26
Nandu_77b23-Jul-08 6:26 
Can any one help me to truncate the string based on the buffer size, for the below show scenario.



main()
{
int size = 50;
char errmsg [size];
get_last_error( errmsg, size );
cout<<errmsg;

}

get_last_error( char *errmsg, int bufsize )
{
string sErrMsg;

if ( sErrMsg.capacity() > bufsize )
{
// here i want to truncate the string, so that the size of string will fit into "bufsize". Then copy the string to errmsg
// strcpy( errmsg, sErrMsg.c_str() );
// how to truncate the string based on given buffersize
// so that we can atlest copy the possible string to errmsg if not the whole string
}
else
{
strcpy( errmsg, sErrMsg.c_str() );
*errcode = nErrCode;
}
}
QuestionRe: how to truncate a string based on buffer size. Pin
David Crow23-Jul-08 6:30
David Crow23-Jul-08 6:30 
QuestionRe: how to truncate a string based on buffer size. Pin
Nandu_77b23-Jul-08 6:42
Nandu_77b23-Jul-08 6:42 
AnswerRe: how to truncate a string based on buffer size. Pin
David Crow23-Jul-08 7:25
David Crow23-Jul-08 7:25 
QuestionRe: how to truncate a string based on buffer size. Pin
CPallini23-Jul-08 6:55
mveCPallini23-Jul-08 6:55 
AnswerRe: how to truncate a string based on buffer size. Pin
Nandu_77b23-Jul-08 7:05
Nandu_77b23-Jul-08 7:05 
QuestionRe: how to truncate a string based on buffer size. Pin
Nandu_77b23-Jul-08 7:06
Nandu_77b23-Jul-08 7:06 
QuestionRe: how to truncate a string based on buffer size. Pin
CPallini23-Jul-08 7:20
mveCPallini23-Jul-08 7:20 
AnswerRe: how to truncate a string based on buffer size. Pin
Nandu_77b23-Jul-08 10:09
Nandu_77b23-Jul-08 10:09 
AnswerRe: how to truncate a string based on buffer size. Pin
Joe Woodbury23-Jul-08 12:55
professionalJoe Woodbury23-Jul-08 12:55 
QuestionToolBar Switching Pin
Nuri Ismail23-Jul-08 5:56
Nuri Ismail23-Jul-08 5:56 
QuestionStatic variable Pin
AnithaSubramani23-Jul-08 4:52
AnithaSubramani23-Jul-08 4:52 
AnswerRe: Static variable Pin
Alan Balkany23-Jul-08 5:02
Alan Balkany23-Jul-08 5:02 
GeneralRe: Static variable Pin
AnithaSubramani23-Jul-08 5:27
AnithaSubramani23-Jul-08 5:27 
GeneralRe: Static variable Pin
AnithaSubramani23-Jul-08 5:33
AnithaSubramani23-Jul-08 5:33 
GeneralRe: Static variable Pin
Mark Salsbery23-Jul-08 6:25
Mark Salsbery23-Jul-08 6:25 
GeneralRe: Static variable Pin
Alan Balkany23-Jul-08 7:38
Alan Balkany23-Jul-08 7:38 
GeneralRe: Static variable Pin
Mark Salsbery23-Jul-08 8:08
Mark Salsbery23-Jul-08 8:08 

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.