OSDN Git Service

全角半角問わないPosをMojuUtilsに移動して、レスの絞込みを全角半角問わないようにした。
[gikonavigoeson/gikonavi.git] / gikoNavi.dpr
1 program gikoNavi;
2
3 {%ToDo 'gikoNavi.todo'}
4
5 uses
6   Memcheck in 'Memcheck.pas',
7   Windows,
8   SysUtils,
9   Forms,
10   Messages,
11   MainForm in 'MainForm.pas' {MainWindow},
12   Giko in 'Giko.pas' {GikoForm},
13   Splash in 'Splash.pas' {SplashWindow},
14   About in 'About.pas' {AboutDialog},
15   Option in 'Option.pas' {OptionDialog},
16   Editor in 'Editor.pas' {EditorForm},
17   Round in 'Round.pas' {RoundDialog},
18   ListSelect in 'ListSelect.pas' {ListSelectDialog},
19   Search in 'Search.pas' {SearchDialog},
20   GikoSystem in 'GikoSystem.pas',
21   Setting in 'Setting.pas',
22   BoardGroup in 'BoardGroup.pas',
23   SaveFile in 'SaveFile.pas',
24   Sort in 'Sort.pas',
25   ThreadControl in 'ThreadControl.pas',
26   ItemDownload in 'ItemDownload.pas',
27   RoundData in 'RoundData.pas',
28   RoundName in 'RoundName.pas' {RoundNameDialog},
29   NewBoard in 'NewBoard.pas' {NewBoardDialog},
30   Dolib in 'Dolib.pas',
31   UBase64 in 'Encrypt\UBase64.pas',
32   UCryptAuto in 'Encrypt\UCryptAuto.pas',
33   KeySetting in 'KeySetting.pas' {KeySettingForm},
34   FavoriteAdd in 'FavoriteAdd.pas' {FavoriteAddDialog},
35   NewFavoriteFolder in 'NewFavoriteFolder.pas' {NewFavoriteFolderDialog},
36   FavoriteArrange in 'FavoriteArrange.pas' {FavoriteArrangeDialog},
37   Favorite in 'Favorite.pas' {FavoriteDM: TDataModule},
38   AddressHistory in 'AddressHistory.pas' {AddressHistoryDM: TDataModule},
39   Preview in 'Preview.pas',
40   HTMLDocumentEvent in 'HTMLDocumentEvent.pas',
41   Kotehan in 'Kotehan.pas' {KotehanDialog},
42   MonaUtils in 'MonaUtils.pas',
43   HintWindow in 'HintWindow.pas',
44   GikoUtil in 'GikoUtil.pas',
45   ToolBarSetting in 'ToolBarSetting.pas' {ToolBarSettingDialog},
46   ToolBarUtil in 'ToolBarUtil.pas',
47   YofUtils in 'YofUtils.pas',
48   AbonUnit in 'AbonUnit.pas',
49   IndividualAbon in 'IndividualAbon.pas' {IndividualAbonForm},
50   Trip in 'Trip.pas',
51   GikoXMLDoc in 'GikoXMLDoc.pas',
52   ExternalBoardManager in 'ExternalBoardManager.pas',
53   ExternalThreadItem in 'ExternalThreadItem.pas',
54   ExternalBoardItem in 'ExternalBoardItem.pas',
55   ExternalBoardPlugInMain in 'ExternalBoardPlugInMain.pas',
56   ExternalFilePath in 'ExternalFilePath.pas',
57   MojuUtils in 'MojuUtils.pas';
58
59 {$R *.RES}
60 {$R gikoResource.res}
61
62 var
63         hMutex: THandle;
64         Wnd{, AppWnd}: HWnd;
65         i: Integer;
66         CDS: TCopyDataStruct;
67 const
68         MutexString: string = 'gikoNaviInstance';
69 begin
70         hMutex := OpenMutex(MUTEX_ALL_ACCESS, False, PChar(MutexString));
71         if hMutex <> 0 then begin
72                 //\83~\83\85\81[\83e\83b\83N\83X\82ª\91\8dÝ\82µ\82½\8fê\8d\87\82Í\8bN\93®\92\86\8e~
73                 Wnd := FindWindow('TGikoForm', nil);
74                 if Wnd <> 0 then begin
75                         //\8aù\82É\8bN\93®\8dÏ\82Ý\83M\83R\83i\83r\82Ì\83A\83N\83e\83B\83u\89»\81\95\83A\83C\83R\83\93\89»\82³\82ê\82Ä\82½\82ç\95\9c\8c³
76                         SetForegroundWindow(Wnd);
77                         if IsIconic(Wnd) then
78                                 SendMessage(Wnd, WM_SYSCOMMAND, SC_RESTORE, -1);
79 //                      AppWnd := GetWindowLong(Wnd, GWL_HWNDPARENT);
80 //                      if (AppWnd <> 0) and (IsIconic(AppWnd)) then
81 //                              SendMessage(AppWnd, WM_SYSCOMMAND, SC_RESTORE, -1);
82
83                         //\82Å\81A\88ø\90\94\82ª\82 \82Á\82½\82ç\8bN\93®\8dÏ\82Ý\83M\83R\83i\83r\82É\91\97\82é
84                         for i := 1 to ParamCount do     begin
85                                 CDS.dwData := 0;
86                                 CDS.cbData := Length(ParamStr(i)) + 1;
87                                 GetMem(CDS.lpData, CDS.cbData);
88                                 try
89                                         StrPCopy(CDS.lpData, ParamStr(i));
90                                         SendMessage(Wnd, WM_COPYDATA, 0, LParam(@CDS));
91                                 finally
92                                         FreeMem(CDS.lpData);
93                                 end;
94                         end;
95                 end;
96
97                 CloseHandle(hMutex);
98         end else begin
99                 //\83~\83\85\81[\83e\83b\83N\83X\82ª\91\8dÝ\82µ\82È\82¢\8fê\8d\87\82Í\83A\83v\83\8a\83P\81[\83V\83\87\83\93\8bN\93®\91±\8ds
100                 hMutex := CreateMutex(nil, False, PChar(MutexString));
101                 Application.Initialize;
102                 Application.Title := '\83M\83R\83i\83r';
103                 Application.ShowMainForm := False;
104                 Application.CreateForm(TMainWindow, MainWindow);
105   Application.CreateForm(TFavoriteDM, FavoriteDM);
106   Application.CreateForm(TAddressHistoryDM, AddressHistoryDM);
107   Application.CreateForm(TGikoForm, GikoForm);
108   Application.Run;
109                 ReleaseMutex(hMutex);
110         end;
111 end.
112