Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Windows.h>
- template <class TYPE>
- void GenericMB(bool bError, TYPE tMessage)
- {
- MessageBoxA(NULL, tMessage, (bError ? "Error" : "Information"), MB_OK | MB_TOPMOST | (bError ? MB_ICONERROR : MB_ICONINFORMATION));
- }
- int main()
- {
- GenericMB(true, "GetLastError(): " + GetLastError());
- GenericMB(false, "Some information box.");
- system("pause");
- return EXIT_SUCCESS;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement