Commits

Kaz Nishimura committed 8459ebd

Changed to insert the product name in the menu items.

  • Participants
  • Parent commits 8cf5458

Comments (0)

Files changed (2)

File src/MainFormUnit.cpp

 
 #include <initguid.h>
 #include "MainFormUnit.h"
+#pragma package(smart_init)
 
 #include "About.h"
-#include "product.h"
+#include "Strings.hpp"
 #include <dshow.h>
 #include <wmsdk.h>
 #include <commctrl.h>
 
 using namespace std;
 
-#pragma package(smart_init)
 #pragma resource "*.dfm"
 TMainForm *MainForm;
 
  */
 __fastcall TMainForm::TMainForm(TComponent *Owner)
     : TForm(Owner) {
-    const TVarRec args[] = {PRODUCT_NAME, PRODUCT_VERSION};
-    Caption = Format(Caption, args, 1);
+
+    TVarRec formatArgs[] = {Strings_ProductName};
+    Caption = Format(Caption, formatArgs, 0);
+    Contents1->Caption = Format(Contents1->Caption, formatArgs, 0);
+    About1->Caption = Format(About1->Caption, formatArgs, 0);
 
     typeMap.insert(make_pair(MEDIATYPE_Audio, L"Audio"));
     typeMap.insert(make_pair(MEDIATYPE_Video, L"Video"));

File src/MainFormUnit.dfm

     end
     object AboutAction: TAction
       Category = 'Help'
-      Caption = '&About...'
+      Caption = '&About'
       Hint = 'About|Describes the application'
       OnExecute = AboutActionExecute
     end
       Caption = '&Help'
       object Contents1: TMenuItem
         Action = HelpContents1
+        Caption = '%s &help'
       end
       object HelpN1: TMenuItem
         Caption = '-'
       end
       object About1: TMenuItem
         Action = AboutAction
+        Caption = '&About %s'
       end
     end
   end