Click here to Skip to main content
15,910,130 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: convert twips to pixels? Pin
Mark Salsbery7-Oct-07 15:38
Mark Salsbery7-Oct-07 15:38 
GeneralRe: convert twips to pixels? Pin
littleGreenDude9-Oct-07 4:32
littleGreenDude9-Oct-07 4:32 
GeneralRe: convert twips to pixels? Pin
littleGreenDude9-Oct-07 4:38
littleGreenDude9-Oct-07 4:38 
GeneralRe: convert twips to pixels? Pin
Mark Salsbery9-Oct-07 5:52
Mark Salsbery9-Oct-07 5:52 
QuestionSimple %s issue help Pin
monsieur_jj7-Oct-07 15:07
monsieur_jj7-Oct-07 15:07 
AnswerRe: Simple %s issue help Pin
Mark Salsbery7-Oct-07 15:30
Mark Salsbery7-Oct-07 15:30 
GeneralRe: Simple %s issue help Pin
monsieur_jj7-Oct-07 17:07
monsieur_jj7-Oct-07 17:07 
GeneralRe: Simple %s issue help [modified] Pin
Mark Salsbery7-Oct-07 17:22
Mark Salsbery7-Oct-07 17:22 
wsprintf(c,"%s%i %s%i %s%i %s%i", day, stLocal.wDay, month, stLocal.wYear, stLocal.wHour, ":", stLocal.wMinute, ":", stLocal.wSecond);

You have 8 specifiers, 9 passed arguments

The order of the 8 specifiers is

string
int
string
int
string
int
string
int

The order of the passed arguments is

string
int
string
int
string
string
int
string
int

Note that you're also passing the wrong types if those int arguments are WORD sized.
"%i" expects an int, not a WORD.  If those are WORDs you are passing, cast the arguments
to ints (e.g. "(int)stLocal.wDay")
*edit* Or if they are WORD arguments, you can pass them like you are, but change the
format specifiers to "%hu" instead of "%i"


The passed arguments corresponding to each "%s" format specifier MUST
be a pointer (const is OK) to a char (const char *).

Mark


Last modified: 11mins after originally posted --


Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: Simple %s issue help Pin
Michael Dunn7-Oct-07 17:38
sitebuilderMichael Dunn7-Oct-07 17:38 
GeneralRe: Simple %s issue help Pin
Mark Salsbery7-Oct-07 17:47
Mark Salsbery7-Oct-07 17:47 
GeneralRe: Simple %s issue help Pin
monsieur_jj7-Oct-07 17:53
monsieur_jj7-Oct-07 17:53 
AnswerRe: Simple %s issue help Pin
TooShy2Talk7-Oct-07 17:48
TooShy2Talk7-Oct-07 17:48 
QuestionRe: Simple %s issue help Pin
David Crow8-Oct-07 4:06
David Crow8-Oct-07 4:06 
AnswerRe: Simple %s issue help Pin
Vaclav_8-Oct-07 9:17
Vaclav_8-Oct-07 9:17 
Question.NET Pin
Dobromir Dimitrov7-Oct-07 12:18
Dobromir Dimitrov7-Oct-07 12:18 
AnswerRe: .NET Pin
Mark Salsbery7-Oct-07 14:19
Mark Salsbery7-Oct-07 14:19 
AnswerRe: .NET Pin
Michael Dunn7-Oct-07 17:52
sitebuilderMichael Dunn7-Oct-07 17:52 
QuestionMFC Pin
vaibhva7-Oct-07 11:44
vaibhva7-Oct-07 11:44 
AnswerRe: MFC Pin
Hamid_RT7-Oct-07 20:08
Hamid_RT7-Oct-07 20:08 
QuestionHow to resize client area without resizing window?? Pin
zarraza7-Oct-07 11:00
zarraza7-Oct-07 11:00 
AnswerRe: How to resize client area without resizing window?? Pin
Mark Salsbery7-Oct-07 14:52
Mark Salsbery7-Oct-07 14:52 
AnswerRe: How to resize client area without resizing window?? Pin
Hamid_RT7-Oct-07 20:11
Hamid_RT7-Oct-07 20:11 
AnswerRe: How to resize client area without resizing window?? Pin
Nelek7-Oct-07 20:51
protectorNelek7-Oct-07 20:51 
AnswerRe: How to resize client area without resizing window?? Pin
zarraza8-Oct-07 11:44
zarraza8-Oct-07 11:44 
QuestionAn easy way to embed flash swf files in C++/MFC .exe? Pin
CryHaven7-Oct-07 8:16
CryHaven7-Oct-07 8:16 

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.