Commits

Palmer, 2E0EOL committed cada69f

Display error about RTTB library when opening file and library not linked

  • Participants
  • Parent commits fee6c9a

Comments (0)

Files changed (4)

src/MainBrowseUnit.cpp

         );
 }
 //---------------------------------------------------------------------------
+void __fastcall TMainBrowse::Open1Click(TObject *Sender)
+{
+	if ( !this->OpenDialog1->Execute() )
+       		return;
 
+        Application->MessageBox(
+        	"RTTB library not linked",
+                "Error: Library not linked",
+                MB_OK|MB_ICONEXCLAMATION
+        );
+}
+//---------------------------------------------------------------------------

src/MainBrowseUnit.dfm

Binary file modified.

src/MainBrowseUnit.h

 #include <Forms.hpp>
 #include <ComCtrls.hpp>
 #include <Menus.hpp>
+#include <Dialogs.hpp>
 //---------------------------------------------------------------------------
 class TMainBrowse : public TForm
 {
         TMenuItem *Commands1;
         TMenuItem *Index1;
         TMenuItem *Contents1;
+        TOpenDialog *OpenDialog1;
         void __fastcall Exit1Click(TObject *Sender);
         void __fastcall About1Click(TObject *Sender);
+        void __fastcall Open1Click(TObject *Sender);
 private:	// User declarations
 public:		// User declarations
         __fastcall TMainBrowse(TComponent* Owner);

src/winrttb.res

Binary file modified.