c++ Posted March 2, 2014 Share Posted March 2, 2014 First we start with a message box. This is going to be like the gui version of the C++ "Hello World" Program. I highly recommend buying sublime text to use and a mingw compilier.//api.cpp#include <Windows.h>int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLine, int iCmdShow){ MessageBox(0,"Hello World","Hello World", MB_YESNOCANCEL | MB_ICONINFORMATION);}Now we add a reply function (a simple beep)#include <Windows.h>int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLine, int iCmdShow){ int reply = MessageBox(0,"Hello World","Hello World", MB_YESNOCANCEL | MB_ICONINFORMATION); if(reply==IDYES){ while(1){ Beep(533,1000); } }} Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.