]> source.dussan.org Git - tigervnc.git/commitdiff
Added InfoDialog dialog. It is used to display an information.
authorgeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>
Mon, 28 Mar 2005 15:52:13 +0000 (15:52 +0000)
committergeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>
Mon, 28 Mar 2005 15:52:13 +0000 (15:52 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@273 3789f03b-4d11-0410-bbf8-ca57d06f2519

rfbplayer/InfoDialog.h [new file with mode: 0644]
rfbplayer/resource.h
rfbplayer/rfbplayer.dsp
rfbplayer/rfbplayer.rc

diff --git a/rfbplayer/InfoDialog.h b/rfbplayer/InfoDialog.h
new file mode 100644 (file)
index 0000000..bbe9b26
--- /dev/null
@@ -0,0 +1,41 @@
+/* Copyright (C) 2004 TightVNC Team.  All Rights Reserved.
+ *    
+ * This is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * 
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this software; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
+ * USA.
+ */
+
+// -=- InfoDialog.h
+
+#include <rfb_win32/Dialog.h>
+
+class InfoDialog : public rfb::win32::Dialog {
+public:
+  InfoDialog(char *_info_message, char *_title = "Information") 
+  : Dialog(GetModuleHandle(0)), info_message(_info_message), title(_title) {}
+  // - Show the dialog and return true if OK was clicked,
+  //   false in case of error or Cancel
+  virtual bool showDialog(HWND parent = 0) {
+    return Dialog::showDialog(MAKEINTRESOURCE(IDD_INFO), parent);
+  }
+protected:
+
+  // Dialog methods (protected)
+  virtual void initDialog() {
+    SetWindowText(handle, title);
+    setItemString(IDC_INFO_EDIT, info_message);
+  }
+  char *info_message;
+  char *title;
+};
\ No newline at end of file
index 22df8273acbc4d7f2f0312dc0a03d770407b178e..5f2d9bba0c1da50fb3a483083f699bff1b35405c 100644 (file)
@@ -12,6 +12,7 @@
 #define IDD_ABOUT                       138
 #define IDD_USERPF_LIST                 139
 #define IDD_UPF_EDIT                    140
+#define IDD_INFO                        141
 #define IDC_GOTO_EDIT                   1003
 #define IDC_PIXELFORMAT                 1004
 #define IDC_ASK_PF                      1006
@@ -40,6 +41,7 @@
 #define IDC_REDSHIFT_EDIT               1026
 #define IDC_GREENSHIFT_EDIT             1027
 #define IDC_BLUESHIFT_EDIT              1028
+#define IDC_INFO_EDIT                   1076
 #define ID_OPENFILE                     40011
 #define ID_CLOSEFILE                    40012
 #define ID_EXIT                         40013
@@ -64,7 +66,7 @@
 // 
 #ifdef APSTUDIO_INVOKED
 #ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE        141
+#define _APS_NEXT_RESOURCE_VALUE        142
 #define _APS_NEXT_COMMAND_VALUE         40045
 #define _APS_NEXT_CONTROL_VALUE         1031
 #define _APS_NEXT_SYMED_VALUE           101
index cf44895d52ecff0434321632c34ba093ee5a4460..ea43f262c5e7f56de74022f8cab249c7c5ea411c 100644 (file)
@@ -152,6 +152,10 @@ SOURCE=.\GotoPosDialog.h
 # End Source File\r
 # Begin Source File\r
 \r
+SOURCE=.\InfoDialog.h\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=.\OptionsDialog.h\r
 # End Source File\r
 # Begin Source File\r
index e8dd34426ddaf7f9076c90b2c475edc482f94496..f3f846096db46d1968a5660cd2b564030c90957f 100644 (file)
@@ -318,6 +318,17 @@ BEGIN
     LTEXT           "Blue shifts :",IDC_STATIC,112,86,43,13,SS_CENTERIMAGE
 END
 
+IDD_INFO DIALOG DISCARDABLE  0, 0, 295, 207
+STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Information"
+FONT 8, "MS Sans Serif"
+BEGIN
+    DEFPUSHBUTTON   "&OK",IDOK,122,186,50,14
+    EDITTEXT        IDC_INFO_EDIT,7,7,281,172,ES_MULTILINE | ES_AUTOVSCROLL | 
+                    ES_AUTOHSCROLL | ES_READONLY | ES_WANTRETURN | 
+                    WS_VSCROLL | WS_HSCROLL
+END
+
 
 /////////////////////////////////////////////////////////////////////////////
 //
@@ -408,6 +419,14 @@ BEGIN
         TOPMARGIN, 7
         BOTTOMMARGIN, 119
     END
+
+    IDD_INFO, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 288
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 200
+    END
 END
 #endif    // APSTUDIO_INVOKED