Re: wsprintf I64 - how to get it to include a plus sign ?

JJ <[email protected]> Wed, 7 Jan 2026 17:49:54 +0700
Newsgroups comp.os.ms-windows.programmer.win32,alt.comp.os.windows-xp,alt.windows7.general
Organization A noiseless patient Spider
Message-ID <[email protected]>
On Wed, 7 Jan 2026 09:35:45 +0100, R.Wieser wrote:

> Hello all,
> 
> OS XPsp3 :
> 
> I'm using wsprintfA (user32) with the format-string "%010I64d" to output
> a provided 64-bit number.  Which works.
> 
> The thing is that I would like to see a "+" sign for the positive numbers,
> and I can't seem to do it.  No matter where I put a "+" symbol in the format
> string the output breaks.
> 
> Question : is there a way to get wsprintfA to include a plus sign when 
> displaying decimal numbers, and if so what is it ?
> 
> Remark : I've also tried sprintf (crtdll), but it doesn't seem to understand 
> either "%I64d" or "%lld".
> 
> Remark #2 : wsprintfA doesn't understand "%+d" either.  :-|
> 
> Regards,
> Rudy Wieser

`+` is never part of format control string in the first place. It'd just be
treated as literal text.