At the start of my program, I have a window pop up that tells the user about the program. I want to add a checkbox that lets the user prevent that box from showing again. (The only MSDN page I found was for XP only, I'm using win7)
#include <iostream>
#include <thread>
int flagint;
int batteryint;
bool stopper;
usingnamespace std;
#if _WIN32_WINNT < 0x0500
#undef _WIN32_WINNT
#define _WIN32_WINNT 0x0500
#endif
#include <windows.h>
#ifdef _WIN32_WINNT
#undef _WIN32_WINNT
#define _WIN32_WINNT
#endif
int main() {
MessageBox (
NULL,
TEXT("This application will run in hidden mode.\nKeep in mind, it uses very little memory and processor power.\nPress CTRL+ALT+C to close this program."),
TEXT("Battery Notifier"),
MB_ICONINFORMATION | MB_SETFOREGROUND
);
}
MessageBox is of no use to you, you either need to write your own DialogBox and put your controls in it, simulating standard MessageBox API, or use other people code, like this one: http://www.codeproject.com/Articles/9579/CPPMessageBox-v
To remember user option, store some flag in registry or configuration file and read it back every time.