printf() can not be used to display text in a MS-Windows GUI program because there is no console window. Depending on your compiler the simplest way to test it is to compile for debug then set a breakpoint on the printf() line. Another alternative is to create a console window then output text to it (see the console win32 api functions).
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
Is the code you posted only a tiny part of some much larger windows gui program ? According to the code you posted PostMessage() doesn't work because there is no window.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
Post the complete code you have. If it is large, zip it and attach the zipped file.
mitrmkar
Posting Virtuoso
1,809 posts since Nov 2007
Reputation Points: 1,105
Solved Threads: 395