Use SetWindowLongPtrW() when setting WndProc
[cygwin-setup.git] / package_message.h
blob22d794cbd6b11635176d1e1bfa7e3a8af37ef2e8
1 /*
2 * Copyright (c) Christopher Faylor
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * A copy of the GNU General Public License can be found at
10 * http://www.gnu.org/
13 #ifndef SETUP_PACKAGE_MESSAGE_H
14 #define SETUP_PACKAGE_MESSAGE_H
16 #include "UserSettings.h"
17 #include "state.h"
18 #include "msg.h"
19 #include <stdlib.h>
21 class packagemessage
23 std::string id;
24 std::string message;
25 public:
26 packagemessage (): id (""), message ("") {}
27 void set (const std::string& in_id, const std::string& in_message)
29 id = in_id;
30 message = in_message;
32 void display ()
34 if (unattended_mode || !id.length () || UserSettings::instance().get (id.c_str ()))
35 /* No message or already seen */;
36 else
38 mbox (NULL, message.c_str (), "Cygwin Setup",
39 MB_OK | MB_ICONSTOP | MB_SETFOREGROUND | MB_TOPMOST);
40 UserSettings::instance().set (id.c_str (), "1");
45 #endif /* SETUP_PACKAGE_MESSAGE_H */