I've been programming in c++ a while now, and in the program I'm writing I want to use some simple gui. I am wondering if it is possible to make a dialog box without starting a new Win32 project? I found some code online, but I can't make it work..
#include <windows.h>
int main()
{
You really need to set up the proper kind of project to get things to work with Windows programming nadine. The reason for this is that various compiler settings and linker options need to be set.
Thank you! I found what you had posted previously on the c++ forum really helpfull!
I used your cbox code and just changed it a little bit to fit my program, but I had a problem when I used sprintf() on a function that returned an int value. It didn't return what I expected it to.. Does it have anything to do with the "%3.2f"?
Yep. The printf family of C Runtime functions take quite a variety of format specifiers to tell the function what sort of variable is to be formatted in terms of field size, decimal points or lack thereof, etc.
@chipp: Do not hijack other people's threads. If you have a question of your own, post your own thread, especially when the question seems unrelated. To quickly answer you: TRUE and FALSE are defined in the Windows SDK because the Windows SDK is C, not C++, and C did not have a boolean data type, much less boolean values true and false. Therefore, the Windows SDK provide a BOOL type and the respective boolean values TRUE and FALSE.
i don't understand. isn't it C does have boolean data type which have boolean values of true or false? what do you mean by: C doesn't have boolean data type?