• R/O
  • HTTP
  • SSH
  • HTTPS

PeerCastIM: Commit


Commit MetaInfo

Revisionf7da08786a05a8f091c637d627303d9486b082ff (tree)
Time2007-12-22 22:52:47
Authoreru <eru01@user...>
Commitereru

Log Message

起動時にGUI表示
GUIを自動で最前面機能追加

Change Summary

Incremental Difference

--- a/PeerCast.root/PeerCast/core/common/servmgr.cpp
+++ b/PeerCast.root/PeerCast/core/common/servmgr.cpp
@@ -138,6 +138,9 @@ ServMgr::ServMgr()
138138 saveGuiPos = false;
139139 keepDownstreams = true;
140140
141+ topmostGui = false;
142+ startWithGui = false;
143+
141144 chanLog="";
142145
143146 maxRelaysIndexTxt = 1; // for PCRaw (relay)
@@ -1053,6 +1056,9 @@ void ServMgr::saveSettings(const char *fn)
10531056 iniFile.writeIntValue("guiLeft", winPlace.rcNormalPosition.left);
10541057 iniFile.writeIntValue("guiRight", winPlace.rcNormalPosition.right);
10551058 }
1059+
1060+ iniFile.writeBoolValue("topmostGui", servMgr->topmostGui);
1061+ iniFile.writeBoolValue("startWithGui", servMgr->startWithGui);
10561062 #endif
10571063 int i;
10581064
@@ -1431,6 +1437,14 @@ void ServMgr::loadSettings(const char *fn)
14311437 guiFlg = true;
14321438 }
14331439 }
1440+
1441+ else if (iniFile.isName("topmostGui"))
1442+ {
1443+ servMgr->topmostGui = iniFile.getBoolValue();
1444+ } else if (iniFile.isName("startWithGui"))
1445+ {
1446+ servMgr->startWithGui = iniFile.getBoolValue();
1447+ }
14341448 #endif
14351449
14361450 // debug
--- a/PeerCast.root/PeerCast/core/common/servmgr.h
+++ b/PeerCast.root/PeerCast/core/common/servmgr.h
@@ -416,6 +416,9 @@ public:
416416 bool saveGuiPos;
417417 bool keepDownstreams;
418418
419+ bool topmostGui; // 最前面
420+ bool startWithGui; // 起動時にGUI
421+
419422 int maxRelaysIndexTxt; // for PCRaw (relay)
420423
421424 private:
--- a/PeerCast.root/PeerCast/ui/win32/simple/Simple.cpp
+++ b/PeerCast.root/PeerCast/ui/win32/simple/Simple.cpp
@@ -75,6 +75,9 @@ bool chanInfoIsRelayed;
7575 String exePath;
7676 ULONG_PTR gdiplusToken;
7777
78+// プロトタイプ宣言
79+void createGUI(HWND);
80+
7881 // ---------------------------------
7982 Sys * APICALL MyPeercastInst::createSys()
8083 {
@@ -390,6 +393,11 @@ int APIENTRY WinMain(HINSTANCE hInstance,
390393 if (mask & ServMgr::NT_TRACKINFO)
391394 CheckMenuItem(trayMenu,ID_POPUP_SHOWMESSAGES_TRACKINFO,MF_CHECKED|MF_BYCOMMAND);
392395
396+ if (servMgr->startWithGui)
397+ {
398+ createGUI((HWND)0);
399+ }
400+
393401 // Main message loop:
394402 while (GetMessage(&msg, NULL, 0, 0))
395403 {
@@ -823,6 +831,12 @@ void createGUI(HWND hWnd)
823831 NULL);
824832 }
825833 ShowWindow(guiWnd,SW_SHOWNORMAL);
834+
835+ // 自動で最前面
836+ if (servMgr->topmostGui)
837+ {
838+ ::SetWindowPos(guiWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE);
839+ }
826840 }
827841
828842
@@ -1046,6 +1060,23 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
10461060 CheckMenuItem(trayMenu, ID_POPUP_SAVE_GUI_POS, MF_UNCHECKED|MF_BYCOMMAND);
10471061 }
10481062
1063+ // 自動GUI/最前面機能
1064+ if (servMgr->topmostGui)
1065+ {
1066+ CheckMenuItem(trayMenu, ID_POPUP_TOPMOST, MF_CHECKED|MF_BYCOMMAND);
1067+ } else
1068+ {
1069+ CheckMenuItem(trayMenu, ID_POPUP_TOPMOST, MF_UNCHECKED|MF_BYCOMMAND);
1070+ }
1071+
1072+ if (servMgr->startWithGui)
1073+ {
1074+ CheckMenuItem(trayMenu, ID_POPUP_START_WITH_GUI, MF_CHECKED|MF_BYCOMMAND);
1075+ } else
1076+ {
1077+ CheckMenuItem(trayMenu, ID_POPUP_START_WITH_GUI, MF_UNCHECKED|MF_BYCOMMAND);
1078+ }
1079+
10491080 SetForegroundWindow(hWnd);
10501081 bool skipMenu=false;
10511082
@@ -1256,6 +1287,34 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
12561287 //peercastInst->saveSettings();
12571288 break;
12581289
1290+ case ID_POPUP_TOPMOST:
1291+ // 最前面表示
1292+ if (servMgr->topmostGui)
1293+ {
1294+ servMgr->topmostGui = false;
1295+ CheckMenuItem(trayMenu, ID_POPUP_TOPMOST, MF_UNCHECKED|MF_BYCOMMAND);
1296+ } else
1297+ {
1298+ servMgr->topmostGui = true;
1299+ CheckMenuItem(trayMenu, ID_POPUP_TOPMOST, MF_CHECKED|MF_BYCOMMAND);
1300+ }
1301+ peercastInst->saveSettings();
1302+ break;
1303+
1304+ case ID_POPUP_START_WITH_GUI:
1305+ // 起動時にGUI表示
1306+ if (servMgr->startWithGui)
1307+ {
1308+ servMgr->startWithGui = false;
1309+ CheckMenuItem(trayMenu, ID_POPUP_START_WITH_GUI, MF_UNCHECKED|MF_BYCOMMAND);
1310+ } else
1311+ {
1312+ servMgr->startWithGui = true;
1313+ CheckMenuItem(trayMenu, ID_POPUP_START_WITH_GUI, MF_CHECKED|MF_BYCOMMAND);
1314+ }
1315+ peercastInst->saveSettings();
1316+ break;
1317+
12591318 case ID_POPUP_EXIT_CONFIRM:
12601319 case IDM_EXIT:
12611320 DestroyWindow(hWnd);
--- a/PeerCast.root/PeerCast/ui/win32/simple/Simple.rc
+++ b/PeerCast.root/PeerCast/ui/win32/simple/Simple.rc
@@ -38,47 +38,38 @@ IDR_TRAYMENU MENU
3838 BEGIN
3939 POPUP "popup"
4040 BEGIN
41- MENUITEM "情報", ID_POPUP_ABOUT
42- MENUITEM "ヘルプ", ID_POPUP_HELP
41+ MENUITEM "情報", ID_POPUP_ABOUT
42+ MENUITEM "ヘルプ", ID_POPUP_HELP
4343 MENUITEM SEPARATOR
4444 POPUP "ポップアップメッセージ"
4545 BEGIN
4646 MENUITEM "PeerCast", ID_POPUP_SHOWMESSAGES_PEERCAST
47-
48- MENUITEM "配信者", ID_POPUP_SHOWMESSAGES_BROADCASTERS
49-
50- MENUITEM "トラック情報", ID_POPUP_SHOWMESSAGES_TRACKINFO
51-
52- MENUITEM "アップデート情報", ID_POPUP_POPUPMESSAGES_UPGRADEALERTS
53- , CHECKED, GRAYED
47+ MENUITEM "配信者", ID_POPUP_SHOWMESSAGES_BROADCASTERS
48+ MENUITEM "トラック情報", ID_POPUP_SHOWMESSAGES_TRACKINFO
49+ MENUITEM "アップデート情報", ID_POPUP_POPUPMESSAGES_UPGRADEALERTS, CHECKED, GRAYED
5450 END
5551 POPUP "高度"
5652 BEGIN
57- MENUITEM "情報", ID_POPUP_ADVANCED_INFORMATION
58-
59- MENUITEM "リレーチャンネル", ID_POPUP_ADVANCED_RELAYEDCHANNELS
60-
61- MENUITEM "配信", ID_POPUP_ADVANCED_BROADCAST
62-
63- MENUITEM "コネクション", ID_POPUP_CONNECTIONS
64- MENUITEM "ログ", ID_POPUP_ADVANCED_VIEWLOG
65-
66- MENUITEM "設定", ID_POPUP_SETTINGS
67- MENUITEM "GUIを開く", ID_POPUP_ADVANCED_SHOWGUI
68-
53+ MENUITEM "情報", ID_POPUP_ADVANCED_INFORMATION
54+ MENUITEM "リレーチャンネル", ID_POPUP_ADVANCED_RELAYEDCHANNELS
55+ MENUITEM "配信", ID_POPUP_ADVANCED_BROADCAST
56+ MENUITEM "コネクション", ID_POPUP_CONNECTIONS
57+ MENUITEM "ログ", ID_POPUP_ADVANCED_VIEWLOG
58+ MENUITEM "設定", ID_POPUP_SETTINGS
59+ MENUITEM "GUIを開く", ID_POPUP_ADVANCED_SHOWGUI
6960 END
7061 POPUP "追加設定"
7162 BEGIN
72- MENUITEM "終了時、表示位置を保存", ID_POPUP_SAVE_GUI_POS
73- , CHECKED
74- MENUITEM "再接続時下流維持", ID_POPUP_KEEP_DOWNSTREAMS
75- , CHECKED
63+ MENUITEM "終了時、表示位置を保存", ID_POPUP_SAVE_GUI_POS, CHECKED
64+ MENUITEM "再接続時下流維持", ID_POPUP_SHOWGUI, CHECKED
65+ MENUITEM "常に手前に表示", ID_POPUP_TOPMOST
66+ MENUITEM "起動時、GUIを表示", ID_POPUP_START_WITH_GUI
7667 END
7768 MENUITEM SEPARATOR
7869 POPUP "終了"
7970 BEGIN
80- MENUITEM "はい", ID_POPUP_EXIT_CONFIRM
81- MENUITEM "いいえ", ID_POPUP_EXIT_NO
71+ MENUITEM "はい", ID_POPUP_EXIT_CONFIRM
72+ MENUITEM "いいえ", ID_POPUP_EXIT_NO
8273 END
8374 END
8475 END
@@ -88,7 +79,7 @@ BEGIN
8879 POPUP "popup"
8980 BEGIN
9081 MENUITEM SEPARATOR
91- MENUITEM "イエローページ", ID_POPUP_YELLOWPAGES
82+ MENUITEM "イエローページ", ID_POPUP_YELLOWPAGES
9283 POPUP "イエローページ"
9384 BEGIN
9485 MENUITEM "AAA", ID_POPUP_YELLOWPAGES1
@@ -97,7 +88,7 @@ BEGIN
9788 END
9889 END
9990
100-IDR_GUIMENU MENU
91+IDR_GUIMENU MENU
10192 BEGIN
10293 POPUP "popup"
10394 BEGIN
@@ -111,51 +102,41 @@ BEGIN
111102 END
112103 END
113104
105+
114106 /////////////////////////////////////////////////////////////////////////////
115107 //
116108 // Dialog
117109 //
118110
119111 IDD_MAINWINDOW DIALOGEX 0, 0, 298, 341
120-STYLE DS_SETFONT | DS_CENTER | WS_MINIMIZEBOX | WS_CAPTION | WS_SYSMENU |
121- WS_THICKFRAME
112+STYLE DS_SETFONT | DS_CENTER | WS_MINIMIZEBOX | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
122113 EXSTYLE WS_EX_APPWINDOW
123114 CAPTION "PeerCast"
124115 FONT 9, "MS UI Gothic", 0, 0, 0x1
125116 BEGIN
126- LISTBOX IDC_LIST1,3,291,291,43,LBS_NOINTEGRALHEIGHT | WS_VSCROLL |
127- WS_TABSTOP
128- CONTROL "有効",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | BS_PUSHLIKE |
129- WS_TABSTOP,9,29,60,20,WS_EX_TRANSPARENT
117+ LISTBOX IDC_LIST1,3,291,291,43,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
118+ CONTROL "有効",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | BS_PUSHLIKE | WS_TABSTOP,9,29,60,20,WS_EX_TRANSPARENT
130119 EDITTEXT IDC_EDIT1,127,18,47,12,ES_AUTOHSCROLL
131120 RTEXT "ポート :",IDC_STATIC,107,20,18,8
132- LISTBOX IDC_LIST2,3,206,291,71,LBS_OWNERDRAWFIXED |
133- LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
121+ LISTBOX IDC_LIST2,3,206,291,71,LBS_OWNERDRAWFIXED | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
134122 LTEXT "ログ",IDC_STATIC_LOG,3,282,13,8
135123 LTEXT "コネクション",IDC_STATIC_CONNECTION,3,184,40,8
136124 GROUPBOX "",IDC_STATIC,3,4,291,49
137125 PUSHBUTTON "クリア",IDC_BUTTON1,35,279,25,11
138- LISTBOX IDC_LIST3,3,81,291,67,LBS_OWNERDRAWFIXED |
139- LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
126+ LISTBOX IDC_LIST3,3,81,291,67,LBS_OWNERDRAWFIXED | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
140127 PUSHBUTTON "切断",IDC_BUTTON5,67,65,43,13
141128 GROUPBOX "リレー",IDC_GROUPBOX_RELAY,3,54,291,96
142129 EDITTEXT IDC_EDIT3,127,34,47,12,ES_PASSWORD | ES_AUTOHSCROLL
143130 RTEXT "パスワード :",IDC_STATIC,89,36,36,8
144- CONTROL "デバッグ",IDC_LOGDEBUG,"Button",BS_AUTOCHECKBOX |
145- BS_PUSHLIKE | WS_TABSTOP,127,279,32,11
146- CONTROL "ネットワーク",IDC_LOGNETWORK,"Button",BS_AUTOCHECKBOX |
147- BS_PUSHLIKE | WS_TABSTOP,185,279,35,11
148- CONTROL "エラー",IDC_LOGERRORS,"Button",BS_AUTOCHECKBOX |
149- BS_PUSHLIKE | WS_TABSTOP,159,279,25,11
150- CONTROL "停止",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | BS_PUSHLIKE |
151- WS_TABSTOP,60,279,30,11
131+ CONTROL "デバッグ",IDC_LOGDEBUG,"Button",BS_AUTOCHECKBOX | BS_PUSHLIKE | WS_TABSTOP,127,279,32,11
132+ CONTROL "ネットワーク",IDC_LOGNETWORK,"Button",BS_AUTOCHECKBOX | BS_PUSHLIKE | WS_TABSTOP,185,279,35,11
133+ CONTROL "エラー",IDC_LOGERRORS,"Button",BS_AUTOCHECKBOX | BS_PUSHLIKE | WS_TABSTOP,159,279,25,11
134+ CONTROL "停止",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | BS_PUSHLIKE | WS_TABSTOP,60,279,30,11
152135 PUSHBUTTON "再生",IDC_BUTTON8,10,65,22,13
153- CONTROL "チャンネル",IDC_LOGCHANNELS,"Button",BS_AUTOCHECKBOX |
154- BS_PUSHLIKE | WS_TABSTOP,221,279,35,11
136+ CONTROL "チャンネル",IDC_LOGCHANNELS,"Button",BS_AUTOCHECKBOX | BS_PUSHLIKE | WS_TABSTOP,221,279,35,11
155137 PUSHBUTTON "再接続",IDC_BUTTON3,41,65,24,13
156138 EDITTEXT IDC_EDIT9,33,159,261,14,ES_AUTOHSCROLL
157- CONTROL "DJ",IDC_CHECK11,"Button",BS_AUTOCHECKBOX | BS_PUSHLIKE |
158- WS_TABSTOP,5,160,23,12
139+ CONTROL "DJ",IDC_CHECK11,"Button",BS_AUTOCHECKBOX | BS_PUSHLIKE | WS_TABSTOP,5,160,23,12
159140 RTEXT "最大リレー数 :",IDC_STATIC,203,20,40,8
160141 EDITTEXT IDC_MAXRELAYS,248,18,40,14,ES_AUTOHSCROLL | ES_NUMBER
161142 PUSHBUTTON "キープ",IDC_BUTTON9,112,65,24,13
@@ -170,27 +151,20 @@ CAPTION "Channel Information"
170151 FONT 9, "MS UI Gothic", 400, 0, 0x80
171152 BEGIN
172153 LTEXT "名前:",IDC_STATIC,7,8,24,9
173- EDITTEXT IDC_EDIT_NAME,7,18,170,21,ES_MULTILINE | ES_READONLY |
174- NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_STATICEDGE
154+ EDITTEXT IDC_EDIT_NAME,7,18,170,21,ES_MULTILINE | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_STATICEDGE
175155 LTEXT "内容:",IDC_STATIC,7,79,93,9
176- EDITTEXT IDC_EDIT_PLAYING,8,90,170,21,ES_MULTILINE | ES_READONLY |
177- NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_STATICEDGE
156+ EDITTEXT IDC_EDIT_PLAYING,8,90,170,21,ES_MULTILINE | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_STATICEDGE
178157 LTEXT "DJ メッセージ:",IDC_STATIC,7,117,41,9
179- EDITTEXT IDC_EDIT_MESSAGE,8,128,170,21,ES_MULTILINE | ES_READONLY |
180- NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_STATICEDGE
158+ EDITTEXT IDC_EDIT_MESSAGE,8,128,170,21,ES_MULTILINE | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_STATICEDGE
181159 PUSHBUTTON "URL",IDC_CONTACT,7,185,34,15,0,0,HIDC_CONTACT
182160 LTEXT "詳細:",IDC_STATIC,7,43,67,8
183- EDITTEXT IDC_EDIT_DESC,8,53,170,21,ES_MULTILINE | ES_READONLY |
184- NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_STATICEDGE
161+ EDITTEXT IDC_EDIT_DESC,8,53,170,21,ES_MULTILINE | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_STATICEDGE
185162 RTEXT "形式",IDC_FORMAT,69,80,107,8
186163 LTEXT "ジャンル:",IDC_STATIC,63,5,22,8
187- EDITTEXT IDC_EDIT_GENRE,87,3,90,12,ES_AUTOHSCROLL | ES_READONLY |
188- NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_STATICEDGE
189- CONTROL "キープ",IDC_KEEP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
190- 144,188,33,10
164+ EDITTEXT IDC_EDIT_GENRE,87,3,90,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_STATICEDGE
165+ CONTROL "キープ",IDC_KEEP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,144,188,33,10
191166 LTEXT "ステータス:",IDC_STATIC,7,153,41,9
192- EDITTEXT IDC_EDIT_STATUS,8,163,82,12,ES_READONLY | NOT WS_BORDER |
193- NOT WS_TABSTOP,WS_EX_STATICEDGE
167+ EDITTEXT IDC_EDIT_STATUS,8,163,82,12,ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_STATICEDGE
194168 PUSHBUTTON "再生",IDC_PLAY,56,185,34,15
195169 END
196170
@@ -259,8 +233,7 @@ IDR_VERMENU MENU
259233 BEGIN
260234 POPUP "popup"
261235 BEGIN
262- MENUITEM "Please upgrade PeerCast. Click here to download.",
263- ID_POPUP_UPGRADE
236+ MENUITEM "Please upgrade PeerCast. Click here to download.", ID_POPUP_UPGRADE
264237 END
265238 END
266239
@@ -271,8 +244,7 @@ END
271244 //
272245
273246 IDD_ABOUTBOX DIALOG 22, 17, 163, 59
274-STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_CAPTION |
275- WS_SYSMENU
247+STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_CAPTION | WS_SYSMENU
276248 CAPTION "About"
277249 FONT 8, "System"
278250 BEGIN
--- a/PeerCast.root/PeerCast/ui/win32/simple/Simple.vcproj
+++ b/PeerCast.root/PeerCast/ui/win32/simple/Simple.vcproj
@@ -214,8 +214,8 @@
214214 />
215215 <Tool
216216 Name="VCPostBuildEventTool"
217- Description="Copy exe to pimp &amp; program files"
218- CommandLine="copy release\peercast.exe &quot;c:\program files\peercast&quot;&#x0D;&#x0A;copy release\peercast.exe ..\pimp\&#x0D;&#x0A;"
217+ Description="Copy exe to pimp"
218+ CommandLine="copy release\peercast.exe ..\pimp\&#x0D;&#x0A;"
219219 />
220220 </Configuration>
221221 <Configuration
@@ -902,5 +902,9 @@
902902 </Filter>
903903 </Files>
904904 <Globals>
905+ <Global
906+ Name="RESOURCE_FILE"
907+ Value="Simple.rc"
908+ />
905909 </Globals>
906910 </VisualStudioProject>
--- a/PeerCast.root/PeerCast/ui/win32/simple/gui.cpp
+++ b/PeerCast.root/PeerCast/ui/win32/simple/gui.cpp
@@ -446,6 +446,21 @@ int ChannelData::drawChannel(Graphics *g, int x, int y){
446446 // 次の基点
447447 origin.X += r1.Width;
448448
449+ //// 上流IP/リスナー数/リレー数表示
450+ //// NOTE:
451+ //// ぴあかすの動作勉強用。リリースビルドでは元のコードを使用の事。
452+ //// 文字表示範囲は幅220ぐらいでおk
453+ //char tmp[512]; // 表示用バッファ
454+ //char hostip[256]; // IPアドレスバッファ
455+ //chDisp.uphost.toStr(hostip); // 上流IP
456+ //sprintf(tmp, "%d/%d - [%d/%d] - %s",
457+ // getTotalListeners(),
458+ // getTotalRelays(),
459+ // getLocalListeners(),
460+ // getLocalRelays(),
461+ // hostip
462+ // );
463+
449464 // リスナー数/リレー数表示
450465 char tmp[256];
451466 sprintf(tmp, "%d/%d - [%d/%d]", getTotalListeners(), getTotalRelays(), getLocalListeners(), getLocalRelays());
@@ -1342,6 +1357,12 @@ void PopupOtherMenu(){
13421357 }
13431358
13441359 void WmCreateProc(HWND hwnd){
1360+ // 自動最前面機能
1361+ if (servMgr->topmostGui)
1362+ {
1363+ ::gbDispTop = true;
1364+ }
1365+
13451366 if (backImage){
13461367 ::delete backImage;
13471368 }
--- a/PeerCast.root/PeerCast/ui/win32/simple/resource.h
+++ b/PeerCast.root/PeerCast/ui/win32/simple/resource.h
@@ -1,5 +1,5 @@
11 //{{NO_DEPENDENCIES}}
2-// Microsoft Developer Studio generated include file.
2+// Microsoft Visual C++ generated include file.
33 // Used by Simple.rc
44 //
55 #define IDC_MYICON 2
@@ -96,6 +96,11 @@
9696 #define ID_POPUP_YELLOWPAGES2 32821
9797 #define ID_POPUP_SAVE_GUI_POS 32823
9898 #define ID_POPUP_KEEP_DOWNSTREAMS 32825
99+#define ID_Menu 32826
100+#define ID_Menu32827 32827
101+#define ID_POPUP_TOPMOST 32828
102+#define ID_32829 32829
103+#define ID_POPUP_START_WITH_GUI 32830
99104 #define IDC_STATIC -1
100105
101106 // Next default values for new objects
@@ -103,7 +108,7 @@
103108 #ifdef APSTUDIO_INVOKED
104109 #ifndef APSTUDIO_READONLY_SYMBOLS
105110 #define _APS_NEXT_RESOURCE_VALUE 142
106-#define _APS_NEXT_COMMAND_VALUE 32826
111+#define _APS_NEXT_COMMAND_VALUE 32831
107112 #define _APS_NEXT_CONTROL_VALUE 1019
108113 #define _APS_NEXT_SYMED_VALUE 110
109114 #endif
--- a/c:/Git/PeerCast.root/PeerCast/core/common/servmgr.cpp
+++ b/c:/Git/PeerCast.root/PeerCast/core/common/servmgr.cpp
@@ -138,6 +138,9 @@ ServMgr::ServMgr()
138138 saveGuiPos = false;
139139 keepDownstreams = true;
140140
141+ topmostGui = false;
142+ startWithGui = false;
143+
141144 chanLog="";
142145
143146 maxRelaysIndexTxt = 1; // for PCRaw (relay)
@@ -1053,6 +1056,9 @@ void ServMgr::saveSettings(const char *fn)
10531056 iniFile.writeIntValue("guiLeft", winPlace.rcNormalPosition.left);
10541057 iniFile.writeIntValue("guiRight", winPlace.rcNormalPosition.right);
10551058 }
1059+
1060+ iniFile.writeBoolValue("topmostGui", servMgr->topmostGui);
1061+ iniFile.writeBoolValue("startWithGui", servMgr->startWithGui);
10561062 #endif
10571063 int i;
10581064
@@ -1431,6 +1437,14 @@ void ServMgr::loadSettings(const char *fn)
14311437 guiFlg = true;
14321438 }
14331439 }
1440+
1441+ else if (iniFile.isName("topmostGui"))
1442+ {
1443+ servMgr->topmostGui = iniFile.getBoolValue();
1444+ } else if (iniFile.isName("startWithGui"))
1445+ {
1446+ servMgr->startWithGui = iniFile.getBoolValue();
1447+ }
14341448 #endif
14351449
14361450 // debug
--- a/c:/Git/PeerCast.root/PeerCast/core/common/servmgr.h
+++ b/c:/Git/PeerCast.root/PeerCast/core/common/servmgr.h
@@ -416,6 +416,9 @@ public:
416416 bool saveGuiPos;
417417 bool keepDownstreams;
418418
419+ bool topmostGui; // 最前面
420+ bool startWithGui; // 起動時にGUI
421+
419422 int maxRelaysIndexTxt; // for PCRaw (relay)
420423
421424 private:
--- a/c:/Git/PeerCast.root/PeerCast/ui/win32/simple/Simple.cpp
+++ b/c:/Git/PeerCast.root/PeerCast/ui/win32/simple/Simple.cpp
@@ -75,6 +75,9 @@ bool chanInfoIsRelayed;
7575 String exePath;
7676 ULONG_PTR gdiplusToken;
7777
78+// プロトタイプ宣言
79+void createGUI(HWND);
80+
7881 // ---------------------------------
7982 Sys * APICALL MyPeercastInst::createSys()
8083 {
@@ -390,6 +393,11 @@ int APIENTRY WinMain(HINSTANCE hInstance,
390393 if (mask & ServMgr::NT_TRACKINFO)
391394 CheckMenuItem(trayMenu,ID_POPUP_SHOWMESSAGES_TRACKINFO,MF_CHECKED|MF_BYCOMMAND);
392395
396+ if (servMgr->startWithGui)
397+ {
398+ createGUI((HWND)0);
399+ }
400+
393401 // Main message loop:
394402 while (GetMessage(&msg, NULL, 0, 0))
395403 {
@@ -823,6 +831,12 @@ void createGUI(HWND hWnd)
823831 NULL);
824832 }
825833 ShowWindow(guiWnd,SW_SHOWNORMAL);
834+
835+ // 自動で最前面
836+ if (servMgr->topmostGui)
837+ {
838+ ::SetWindowPos(guiWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE);
839+ }
826840 }
827841
828842
@@ -1046,6 +1060,23 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
10461060 CheckMenuItem(trayMenu, ID_POPUP_SAVE_GUI_POS, MF_UNCHECKED|MF_BYCOMMAND);
10471061 }
10481062
1063+ // 自動GUI/最前面機能
1064+ if (servMgr->topmostGui)
1065+ {
1066+ CheckMenuItem(trayMenu, ID_POPUP_TOPMOST, MF_CHECKED|MF_BYCOMMAND);
1067+ } else
1068+ {
1069+ CheckMenuItem(trayMenu, ID_POPUP_TOPMOST, MF_UNCHECKED|MF_BYCOMMAND);
1070+ }
1071+
1072+ if (servMgr->startWithGui)
1073+ {
1074+ CheckMenuItem(trayMenu, ID_POPUP_START_WITH_GUI, MF_CHECKED|MF_BYCOMMAND);
1075+ } else
1076+ {
1077+ CheckMenuItem(trayMenu, ID_POPUP_START_WITH_GUI, MF_UNCHECKED|MF_BYCOMMAND);
1078+ }
1079+
10491080 SetForegroundWindow(hWnd);
10501081 bool skipMenu=false;
10511082
@@ -1256,6 +1287,34 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
12561287 //peercastInst->saveSettings();
12571288 break;
12581289
1290+ case ID_POPUP_TOPMOST:
1291+ // 最前面表示
1292+ if (servMgr->topmostGui)
1293+ {
1294+ servMgr->topmostGui = false;
1295+ CheckMenuItem(trayMenu, ID_POPUP_TOPMOST, MF_UNCHECKED|MF_BYCOMMAND);
1296+ } else
1297+ {
1298+ servMgr->topmostGui = true;
1299+ CheckMenuItem(trayMenu, ID_POPUP_TOPMOST, MF_CHECKED|MF_BYCOMMAND);
1300+ }
1301+ peercastInst->saveSettings();
1302+ break;
1303+
1304+ case ID_POPUP_START_WITH_GUI:
1305+ // 起動時にGUI表示
1306+ if (servMgr->startWithGui)
1307+ {
1308+ servMgr->startWithGui = false;
1309+ CheckMenuItem(trayMenu, ID_POPUP_START_WITH_GUI, MF_UNCHECKED|MF_BYCOMMAND);
1310+ } else
1311+ {
1312+ servMgr->startWithGui = true;
1313+ CheckMenuItem(trayMenu, ID_POPUP_START_WITH_GUI, MF_CHECKED|MF_BYCOMMAND);
1314+ }
1315+ peercastInst->saveSettings();
1316+ break;
1317+
12591318 case ID_POPUP_EXIT_CONFIRM:
12601319 case IDM_EXIT:
12611320 DestroyWindow(hWnd);
--- a/c:/Git/PeerCast.root/PeerCast/ui/win32/simple/Simple.rc
+++ b/c:/Git/PeerCast.root/PeerCast/ui/win32/simple/Simple.rc
@@ -38,47 +38,38 @@ IDR_TRAYMENU MENU
3838 BEGIN
3939 POPUP "popup"
4040 BEGIN
41- MENUITEM "情報", ID_POPUP_ABOUT
42- MENUITEM "ヘルプ", ID_POPUP_HELP
41+ MENUITEM "情報", ID_POPUP_ABOUT
42+ MENUITEM "ヘルプ", ID_POPUP_HELP
4343 MENUITEM SEPARATOR
4444 POPUP "ポップアップメッセージ"
4545 BEGIN
4646 MENUITEM "PeerCast", ID_POPUP_SHOWMESSAGES_PEERCAST
47-
48- MENUITEM "配信者", ID_POPUP_SHOWMESSAGES_BROADCASTERS
49-
50- MENUITEM "トラック情報", ID_POPUP_SHOWMESSAGES_TRACKINFO
51-
52- MENUITEM "アップデート情報", ID_POPUP_POPUPMESSAGES_UPGRADEALERTS
53- , CHECKED, GRAYED
47+ MENUITEM "配信者", ID_POPUP_SHOWMESSAGES_BROADCASTERS
48+ MENUITEM "トラック情報", ID_POPUP_SHOWMESSAGES_TRACKINFO
49+ MENUITEM "アップデート情報", ID_POPUP_POPUPMESSAGES_UPGRADEALERTS, CHECKED, GRAYED
5450 END
5551 POPUP "高度"
5652 BEGIN
57- MENUITEM "情報", ID_POPUP_ADVANCED_INFORMATION
58-
59- MENUITEM "リレーチャンネル", ID_POPUP_ADVANCED_RELAYEDCHANNELS
60-
61- MENUITEM "配信", ID_POPUP_ADVANCED_BROADCAST
62-
63- MENUITEM "コネクション", ID_POPUP_CONNECTIONS
64- MENUITEM "ログ", ID_POPUP_ADVANCED_VIEWLOG
65-
66- MENUITEM "設定", ID_POPUP_SETTINGS
67- MENUITEM "GUIを開く", ID_POPUP_ADVANCED_SHOWGUI
68-
53+ MENUITEM "情報", ID_POPUP_ADVANCED_INFORMATION
54+ MENUITEM "リレーチャンネル", ID_POPUP_ADVANCED_RELAYEDCHANNELS
55+ MENUITEM "配信", ID_POPUP_ADVANCED_BROADCAST
56+ MENUITEM "コネクション", ID_POPUP_CONNECTIONS
57+ MENUITEM "ログ", ID_POPUP_ADVANCED_VIEWLOG
58+ MENUITEM "設定", ID_POPUP_SETTINGS
59+ MENUITEM "GUIを開く", ID_POPUP_ADVANCED_SHOWGUI
6960 END
7061 POPUP "追加設定"
7162 BEGIN
72- MENUITEM "終了時、表示位置を保存", ID_POPUP_SAVE_GUI_POS
73- , CHECKED
74- MENUITEM "再接続時下流維持", ID_POPUP_KEEP_DOWNSTREAMS
75- , CHECKED
63+ MENUITEM "終了時、表示位置を保存", ID_POPUP_SAVE_GUI_POS, CHECKED
64+ MENUITEM "再接続時下流維持", ID_POPUP_SHOWGUI, CHECKED
65+ MENUITEM "常に手前に表示", ID_POPUP_TOPMOST
66+ MENUITEM "起動時、GUIを表示", ID_POPUP_START_WITH_GUI
7667 END
7768 MENUITEM SEPARATOR
7869 POPUP "終了"
7970 BEGIN
80- MENUITEM "はい", ID_POPUP_EXIT_CONFIRM
81- MENUITEM "いいえ", ID_POPUP_EXIT_NO
71+ MENUITEM "はい", ID_POPUP_EXIT_CONFIRM
72+ MENUITEM "いいえ", ID_POPUP_EXIT_NO
8273 END
8374 END
8475 END
@@ -88,7 +79,7 @@ BEGIN
8879 POPUP "popup"
8980 BEGIN
9081 MENUITEM SEPARATOR
91- MENUITEM "イエローページ", ID_POPUP_YELLOWPAGES
82+ MENUITEM "イエローページ", ID_POPUP_YELLOWPAGES
9283 POPUP "イエローページ"
9384 BEGIN
9485 MENUITEM "AAA", ID_POPUP_YELLOWPAGES1
@@ -97,7 +88,7 @@ BEGIN
9788 END
9889 END
9990
100-IDR_GUIMENU MENU
91+IDR_GUIMENU MENU
10192 BEGIN
10293 POPUP "popup"
10394 BEGIN
@@ -111,51 +102,41 @@ BEGIN
111102 END
112103 END
113104
105+
114106 /////////////////////////////////////////////////////////////////////////////
115107 //
116108 // Dialog
117109 //
118110
119111 IDD_MAINWINDOW DIALOGEX 0, 0, 298, 341
120-STYLE DS_SETFONT | DS_CENTER | WS_MINIMIZEBOX | WS_CAPTION | WS_SYSMENU |
121- WS_THICKFRAME
112+STYLE DS_SETFONT | DS_CENTER | WS_MINIMIZEBOX | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
122113 EXSTYLE WS_EX_APPWINDOW
123114 CAPTION "PeerCast"
124115 FONT 9, "MS UI Gothic", 0, 0, 0x1
125116 BEGIN
126- LISTBOX IDC_LIST1,3,291,291,43,LBS_NOINTEGRALHEIGHT | WS_VSCROLL |
127- WS_TABSTOP
128- CONTROL "有効",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | BS_PUSHLIKE |
129- WS_TABSTOP,9,29,60,20,WS_EX_TRANSPARENT
117+ LISTBOX IDC_LIST1,3,291,291,43,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
118+ CONTROL "有効",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | BS_PUSHLIKE | WS_TABSTOP,9,29,60,20,WS_EX_TRANSPARENT
130119 EDITTEXT IDC_EDIT1,127,18,47,12,ES_AUTOHSCROLL
131120 RTEXT "ポート :",IDC_STATIC,107,20,18,8
132- LISTBOX IDC_LIST2,3,206,291,71,LBS_OWNERDRAWFIXED |
133- LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
121+ LISTBOX IDC_LIST2,3,206,291,71,LBS_OWNERDRAWFIXED | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
134122 LTEXT "ログ",IDC_STATIC_LOG,3,282,13,8
135123 LTEXT "コネクション",IDC_STATIC_CONNECTION,3,184,40,8
136124 GROUPBOX "",IDC_STATIC,3,4,291,49
137125 PUSHBUTTON "クリア",IDC_BUTTON1,35,279,25,11
138- LISTBOX IDC_LIST3,3,81,291,67,LBS_OWNERDRAWFIXED |
139- LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
126+ LISTBOX IDC_LIST3,3,81,291,67,LBS_OWNERDRAWFIXED | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
140127 PUSHBUTTON "切断",IDC_BUTTON5,67,65,43,13
141128 GROUPBOX "リレー",IDC_GROUPBOX_RELAY,3,54,291,96
142129 EDITTEXT IDC_EDIT3,127,34,47,12,ES_PASSWORD | ES_AUTOHSCROLL
143130 RTEXT "パスワード :",IDC_STATIC,89,36,36,8
144- CONTROL "デバッグ",IDC_LOGDEBUG,"Button",BS_AUTOCHECKBOX |
145- BS_PUSHLIKE | WS_TABSTOP,127,279,32,11
146- CONTROL "ネットワーク",IDC_LOGNETWORK,"Button",BS_AUTOCHECKBOX |
147- BS_PUSHLIKE | WS_TABSTOP,185,279,35,11
148- CONTROL "エラー",IDC_LOGERRORS,"Button",BS_AUTOCHECKBOX |
149- BS_PUSHLIKE | WS_TABSTOP,159,279,25,11
150- CONTROL "停止",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | BS_PUSHLIKE |
151- WS_TABSTOP,60,279,30,11
131+ CONTROL "デバッグ",IDC_LOGDEBUG,"Button",BS_AUTOCHECKBOX | BS_PUSHLIKE | WS_TABSTOP,127,279,32,11
132+ CONTROL "ネットワーク",IDC_LOGNETWORK,"Button",BS_AUTOCHECKBOX | BS_PUSHLIKE | WS_TABSTOP,185,279,35,11
133+ CONTROL "エラー",IDC_LOGERRORS,"Button",BS_AUTOCHECKBOX | BS_PUSHLIKE | WS_TABSTOP,159,279,25,11
134+ CONTROL "停止",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | BS_PUSHLIKE | WS_TABSTOP,60,279,30,11
152135 PUSHBUTTON "再生",IDC_BUTTON8,10,65,22,13
153- CONTROL "チャンネル",IDC_LOGCHANNELS,"Button",BS_AUTOCHECKBOX |
154- BS_PUSHLIKE | WS_TABSTOP,221,279,35,11
136+ CONTROL "チャンネル",IDC_LOGCHANNELS,"Button",BS_AUTOCHECKBOX | BS_PUSHLIKE | WS_TABSTOP,221,279,35,11
155137 PUSHBUTTON "再接続",IDC_BUTTON3,41,65,24,13
156138 EDITTEXT IDC_EDIT9,33,159,261,14,ES_AUTOHSCROLL
157- CONTROL "DJ",IDC_CHECK11,"Button",BS_AUTOCHECKBOX | BS_PUSHLIKE |
158- WS_TABSTOP,5,160,23,12
139+ CONTROL "DJ",IDC_CHECK11,"Button",BS_AUTOCHECKBOX | BS_PUSHLIKE | WS_TABSTOP,5,160,23,12
159140 RTEXT "最大リレー数 :",IDC_STATIC,203,20,40,8
160141 EDITTEXT IDC_MAXRELAYS,248,18,40,14,ES_AUTOHSCROLL | ES_NUMBER
161142 PUSHBUTTON "キープ",IDC_BUTTON9,112,65,24,13
@@ -170,27 +151,20 @@ CAPTION "Channel Information"
170151 FONT 9, "MS UI Gothic", 400, 0, 0x80
171152 BEGIN
172153 LTEXT "名前:",IDC_STATIC,7,8,24,9
173- EDITTEXT IDC_EDIT_NAME,7,18,170,21,ES_MULTILINE | ES_READONLY |
174- NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_STATICEDGE
154+ EDITTEXT IDC_EDIT_NAME,7,18,170,21,ES_MULTILINE | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_STATICEDGE
175155 LTEXT "内容:",IDC_STATIC,7,79,93,9
176- EDITTEXT IDC_EDIT_PLAYING,8,90,170,21,ES_MULTILINE | ES_READONLY |
177- NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_STATICEDGE
156+ EDITTEXT IDC_EDIT_PLAYING,8,90,170,21,ES_MULTILINE | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_STATICEDGE
178157 LTEXT "DJ メッセージ:",IDC_STATIC,7,117,41,9
179- EDITTEXT IDC_EDIT_MESSAGE,8,128,170,21,ES_MULTILINE | ES_READONLY |
180- NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_STATICEDGE
158+ EDITTEXT IDC_EDIT_MESSAGE,8,128,170,21,ES_MULTILINE | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_STATICEDGE
181159 PUSHBUTTON "URL",IDC_CONTACT,7,185,34,15,0,0,HIDC_CONTACT
182160 LTEXT "詳細:",IDC_STATIC,7,43,67,8
183- EDITTEXT IDC_EDIT_DESC,8,53,170,21,ES_MULTILINE | ES_READONLY |
184- NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_STATICEDGE
161+ EDITTEXT IDC_EDIT_DESC,8,53,170,21,ES_MULTILINE | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_STATICEDGE
185162 RTEXT "形式",IDC_FORMAT,69,80,107,8
186163 LTEXT "ジャンル:",IDC_STATIC,63,5,22,8
187- EDITTEXT IDC_EDIT_GENRE,87,3,90,12,ES_AUTOHSCROLL | ES_READONLY |
188- NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_STATICEDGE
189- CONTROL "キープ",IDC_KEEP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
190- 144,188,33,10
164+ EDITTEXT IDC_EDIT_GENRE,87,3,90,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_STATICEDGE
165+ CONTROL "キープ",IDC_KEEP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,144,188,33,10
191166 LTEXT "ステータス:",IDC_STATIC,7,153,41,9
192- EDITTEXT IDC_EDIT_STATUS,8,163,82,12,ES_READONLY | NOT WS_BORDER |
193- NOT WS_TABSTOP,WS_EX_STATICEDGE
167+ EDITTEXT IDC_EDIT_STATUS,8,163,82,12,ES_READONLY | NOT WS_BORDER | NOT WS_TABSTOP,WS_EX_STATICEDGE
194168 PUSHBUTTON "再生",IDC_PLAY,56,185,34,15
195169 END
196170
@@ -259,8 +233,7 @@ IDR_VERMENU MENU
259233 BEGIN
260234 POPUP "popup"
261235 BEGIN
262- MENUITEM "Please upgrade PeerCast. Click here to download.",
263- ID_POPUP_UPGRADE
236+ MENUITEM "Please upgrade PeerCast. Click here to download.", ID_POPUP_UPGRADE
264237 END
265238 END
266239
@@ -271,8 +244,7 @@ END
271244 //
272245
273246 IDD_ABOUTBOX DIALOG 22, 17, 163, 59
274-STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_CAPTION |
275- WS_SYSMENU
247+STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_CAPTION | WS_SYSMENU
276248 CAPTION "About"
277249 FONT 8, "System"
278250 BEGIN
--- a/c:/Git/PeerCast.root/PeerCast/ui/win32/simple/Simple.vcproj
+++ b/c:/Git/PeerCast.root/PeerCast/ui/win32/simple/Simple.vcproj
@@ -214,8 +214,8 @@
214214 />
215215 <Tool
216216 Name="VCPostBuildEventTool"
217- Description="Copy exe to pimp &amp; program files"
218- CommandLine="copy release\peercast.exe &quot;c:\program files\peercast&quot;&#x0D;&#x0A;copy release\peercast.exe ..\pimp\&#x0D;&#x0A;"
217+ Description="Copy exe to pimp"
218+ CommandLine="copy release\peercast.exe ..\pimp\&#x0D;&#x0A;"
219219 />
220220 </Configuration>
221221 <Configuration
@@ -902,5 +902,9 @@
902902 </Filter>
903903 </Files>
904904 <Globals>
905+ <Global
906+ Name="RESOURCE_FILE"
907+ Value="Simple.rc"
908+ />
905909 </Globals>
906910 </VisualStudioProject>
--- a/c:/Git/PeerCast.root/PeerCast/ui/win32/simple/gui.cpp
+++ b/c:/Git/PeerCast.root/PeerCast/ui/win32/simple/gui.cpp
@@ -446,6 +446,21 @@ int ChannelData::drawChannel(Graphics *g, int x, int y){
446446 // 次の基点
447447 origin.X += r1.Width;
448448
449+ //// 上流IP/リスナー数/リレー数表示
450+ //// NOTE:
451+ //// ぴあかすの動作勉強用。リリースビルドでは元のコードを使用の事。
452+ //// 文字表示範囲は幅220ぐらいでおk
453+ //char tmp[512]; // 表示用バッファ
454+ //char hostip[256]; // IPアドレスバッファ
455+ //chDisp.uphost.toStr(hostip); // 上流IP
456+ //sprintf(tmp, "%d/%d - [%d/%d] - %s",
457+ // getTotalListeners(),
458+ // getTotalRelays(),
459+ // getLocalListeners(),
460+ // getLocalRelays(),
461+ // hostip
462+ // );
463+
449464 // リスナー数/リレー数表示
450465 char tmp[256];
451466 sprintf(tmp, "%d/%d - [%d/%d]", getTotalListeners(), getTotalRelays(), getLocalListeners(), getLocalRelays());
@@ -1342,6 +1357,12 @@ void PopupOtherMenu(){
13421357 }
13431358
13441359 void WmCreateProc(HWND hwnd){
1360+ // 自動最前面機能
1361+ if (servMgr->topmostGui)
1362+ {
1363+ ::gbDispTop = true;
1364+ }
1365+
13451366 if (backImage){
13461367 ::delete backImage;
13471368 }
--- a/c:/Git/PeerCast.root/PeerCast/ui/win32/simple/resource.h
+++ b/c:/Git/PeerCast.root/PeerCast/ui/win32/simple/resource.h
@@ -1,5 +1,5 @@
11 //{{NO_DEPENDENCIES}}
2-// Microsoft Developer Studio generated include file.
2+// Microsoft Visual C++ generated include file.
33 // Used by Simple.rc
44 //
55 #define IDC_MYICON 2
@@ -96,6 +96,11 @@
9696 #define ID_POPUP_YELLOWPAGES2 32821
9797 #define ID_POPUP_SAVE_GUI_POS 32823
9898 #define ID_POPUP_KEEP_DOWNSTREAMS 32825
99+#define ID_Menu 32826
100+#define ID_Menu32827 32827
101+#define ID_POPUP_TOPMOST 32828
102+#define ID_32829 32829
103+#define ID_POPUP_START_WITH_GUI 32830
99104 #define IDC_STATIC -1
100105
101106 // Next default values for new objects
@@ -103,7 +108,7 @@
103108 #ifdef APSTUDIO_INVOKED
104109 #ifndef APSTUDIO_READONLY_SYMBOLS
105110 #define _APS_NEXT_RESOURCE_VALUE 142
106-#define _APS_NEXT_COMMAND_VALUE 32826
111+#define _APS_NEXT_COMMAND_VALUE 32831
107112 #define _APS_NEXT_CONTROL_VALUE 1019
108113 #define _APS_NEXT_SYMED_VALUE 110
109114 #endif
Show on old repository browser