Click here to Skip to main content
14,575,900 members

C / C++ / MFC

 
GeneralRe: Enable/Disable Ribbon Menu Item Dynamically Pin
Jochen Arndt27-Jan-16 21:35
professionalJochen Arndt27-Jan-16 21:35 
QuestionInterview Test Question Pin
Richard Andrew x6426-Jan-16 13:18
professionalRichard Andrew x6426-Jan-16 13:18 
AnswerRe: Interview Test Question Pin
David Crow27-Jan-16 4:22
MemberDavid Crow27-Jan-16 4:22 
AnswerRe: Interview Test Question Pin
Albert Holguin28-Jan-16 5:13
professionalAlbert Holguin28-Jan-16 5:13 
QuestionWin32 Function To Convert Floating Point Number To Character String Pin
Frederick J. Harris26-Jan-16 12:49
MemberFrederick J. Harris26-Jan-16 12:49 
AnswerRe: Win32 Function To Convert Floating Point Number To Character String Pin
Frederick J. Harris26-Jan-16 13:30
MemberFrederick J. Harris26-Jan-16 13:30 
GeneralRe: Win32 Function To Convert Floating Point Number To Character String Pin
Frederick J. Harris26-Jan-16 17:18
MemberFrederick J. Harris26-Jan-16 17:18 
AnswerRe: Win32 Function To Convert Floating Point Number To Character String Pin
Jochen Arndt26-Jan-16 21:47
professionalJochen Arndt26-Jan-16 21:47 
So you don't want to use the standard C library with your program.

Than you have to implement all necessary functionality provided by that library and required by your application yourself. The common method to do such things is to place such functions in a library to be re-used by other projects. As a result, you will have your own standard C library (or a sub set) when using the same function declarations (which makes sense). The LIBCTINY mentioned in your article link is such an implementation.

The StringCch... functions mentioned above are just MS specific extensions to the standard library providing safe and ANSI/Unicode operations. If you have a look at StrSafe.h where they are defined, you will notice that they use the standard C library functions. So you have to implement the used functions when not using the default library.

You may search further for some Windows API function that can perform a required operation. The FormatMessage function (Windows)[^] is a candidate but did not support floating point values. However, it allows passing a pre-formatted floating point argument as string. So it may be sufficient to have a function that converts a floating point number to a string.

As far as I know the Windows API did not provide such a function. I guess there is an internal / undocumented one. But that might not be available.

So the solution is to write your own. As starting point you may have a look at some C standard library source. Candidates are for example The GNU C Library[^] and diet libc - a libc optimized for small size[^].

Finally you should know that your program will use a special standard library version when calling Windows API functions because the OS contains it's own implementations of required functions.
GeneralRe: Win32 Function To Convert Floating Point Number To Character String Pin
Frederick J. Harris27-Jan-16 10:01
MemberFrederick J. Harris27-Jan-16 10:01 
GeneralRe: Win32 Function To Convert Floating Point Number To Character String Pin
Jochen Arndt27-Jan-16 21:26
professionalJochen Arndt27-Jan-16 21:26 
GeneralRe: Win32 Function To Convert Floating Point Number To Character String Pin
Frederick J. Harris28-Jan-16 4:22
MemberFrederick J. Harris28-Jan-16 4:22 
GeneralRe: Win32 Function To Convert Floating Point Number To Character String Pin
Jochen Arndt28-Jan-16 4:45
professionalJochen Arndt28-Jan-16 4:45 
GeneralRe: Win32 Function To Convert Floating Point Number To Character String Pin
Frederick J. Harris29-Jan-16 5:10
MemberFrederick J. Harris29-Jan-16 5:10 
GeneralRe: Win32 Function To Convert Floating Point Number To Character String Pin
Jochen Arndt29-Jan-16 5:34
professionalJochen Arndt29-Jan-16 5:34 
AnswerRe: Win32 Function To Convert Floating Point Number To Character String Pin
Richard MacCutchan26-Jan-16 22:27
mveRichard MacCutchan26-Jan-16 22:27 
QuestionC, Win32 API: l need help with tab control [Solved] Pin
Member 1213944226-Jan-16 11:20
MemberMember 1213944226-Jan-16 11:20 
AnswerRe: C, Win32 API: l need help with tab control Pin
bling26-Jan-16 12:03
Memberbling26-Jan-16 12:03 
GeneralRe: C, Win32 API: l need help with tab control Pin
Member 1213944226-Jan-16 21:07
MemberMember 1213944226-Jan-16 21:07 
GeneralRe: C, Win32 API: l need help with tab control Pin
bling27-Jan-16 14:15
Memberbling27-Jan-16 14:15 
AnswerRe: C, Win32 API: l need help with tab control Pin
Richard MacCutchan26-Jan-16 22:34
mveRichard MacCutchan26-Jan-16 22:34 
QuestionRe: C, Win32 API: l need help with tab control Pin
David Crow27-Jan-16 4:27
MemberDavid Crow27-Jan-16 4:27 
QuestionToo many initializers error in MSVC. Pin
Brisingr Aerowing20-Jan-16 13:02
professionalBrisingr Aerowing20-Jan-16 13:02 
SuggestionRe: Too many initializers error in MSVC. Pin
David Crow22-Jan-16 4:49
MemberDavid Crow22-Jan-16 4:49 
GeneralRe: Too many initializers error in MSVC. Pin
Brisingr Aerowing22-Jan-16 5:02
professionalBrisingr Aerowing22-Jan-16 5:02 
GeneralRe: Too many initializers error in MSVC. Pin
Richard MacCutchan22-Jan-16 6:35
mveRichard MacCutchan22-Jan-16 6:35 

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.