[475] | 1 | #include "stdafx.h"
|
---|
| 2 |
|
---|
[3] | 3 | #include "common.h"
|
---|
| 4 |
|
---|
| 5 | #if defined(JPN)
|
---|
| 6 | //日本語
|
---|
| 7 | #include "pj_msg_jpn.h"
|
---|
| 8 | #else
|
---|
| 9 | //英語
|
---|
| 10 | #include "pj_msg_eng.h"
|
---|
| 11 | #endif
|
---|
| 12 |
|
---|
| 13 |
|
---|
| 14 | void Project_CursorResInsert(void){
|
---|
| 15 | extern HANDLE hHeap;
|
---|
| 16 | extern LPSTR CursorFileFilter;
|
---|
[623] | 17 | int i3;
|
---|
[3] | 18 | char temporary[MAX_PATH];
|
---|
| 19 |
|
---|
| 20 | //"カーソル ファイルを指定してください"
|
---|
| 21 | if(!GetFilePathDialog(hOwner,temporary,CursorFileFilter,STRING_FILEOPENTITLE_CURSOR,TRUE)) return;
|
---|
| 22 |
|
---|
[623] | 23 | ActiveBasic::Common::ResourceItem item;
|
---|
| 24 | item.filepath = projectInfo.GetWorkDir().GetRelationalPath( temporary );
|
---|
[3] | 25 |
|
---|
| 26 | for(i3=1;;i3++){
|
---|
| 27 | sprintf(temporary,"IDC_CURSOR%d",i3);
|
---|
[623] | 28 | bool isDuplicate = false;
|
---|
| 29 | BOOST_FOREACH( const ActiveBasic::Common::ResourceItem &resourceItem, projectInfo.resourceManager.cursorResources )
|
---|
| 30 | {
|
---|
| 31 | if( resourceItem.idName == temporary )
|
---|
| 32 | {
|
---|
| 33 | isDuplicate = true;
|
---|
| 34 | break;
|
---|
| 35 | }
|
---|
[3] | 36 | }
|
---|
[623] | 37 |
|
---|
| 38 | if( !isDuplicate )
|
---|
| 39 | {
|
---|
| 40 | break;
|
---|
| 41 | }
|
---|
[3] | 42 | }
|
---|
[623] | 43 | item.idName = temporary;
|
---|
[3] | 44 |
|
---|
| 45 | //ツリービューに追加
|
---|
| 46 | extern HWND hMaterialTreeView;
|
---|
| 47 | TV_INSERTSTRUCT tv;
|
---|
| 48 | tv.hInsertAfter=TVI_SORT;
|
---|
| 49 | tv.item.mask=TVIF_TEXT|TVIF_IMAGE|TVIF_SELECTEDIMAGE;
|
---|
| 50 | tv.item.iImage=6;
|
---|
| 51 | tv.item.iSelectedImage=6;
|
---|
[623] | 52 | tv.hParent = hCursorTreeItemForProjectView;
|
---|
[3] | 53 | tv.item.pszText=temporary;
|
---|
| 54 |
|
---|
[623] | 55 | item.hTreeItem = TreeView_InsertItem(hMaterialTreeView,&tv);
|
---|
[3] | 56 |
|
---|
[623] | 57 | TreeView_SelectItem( hMaterialTreeView, item.hTreeItem );
|
---|
[3] | 58 |
|
---|
[623] | 59 | projectInfo.resourceManager.cursorResources.push_back( item );
|
---|
| 60 |
|
---|
[618] | 61 | projectInfo.ModifuOfResource=1;
|
---|
[3] | 62 | }
|
---|
| 63 | void Project_Cursor_Delete(int CursorInfoNum){
|
---|
| 64 | //ツリービューから削除
|
---|
| 65 | extern HWND hMaterialTreeView;
|
---|
[623] | 66 | TreeView_DeleteItem(hMaterialTreeView,projectInfo.resourceManager.cursorResources[CursorInfoNum].hTreeItem);
|
---|
[3] | 67 |
|
---|
[618] | 68 | //projectInfo.pCursorInfo構造体から削除
|
---|
[623] | 69 | Jenga::Common::EraseVectorItem<ActiveBasic::Common::ResourceItems>( projectInfo.resourceManager.cursorResources, CursorInfoNum );
|
---|
[3] | 70 |
|
---|
[618] | 71 | projectInfo.ModifuOfResource=1;
|
---|
[3] | 72 | }
|
---|
| 73 | void Project_Cursor_RenameID(int CursorInfoNum){
|
---|
| 74 | extern HANDLE hHeap;
|
---|
| 75 | extern char NewIdName[MAX_PATH];
|
---|
| 76 | extern HWND hMaterialTreeView;
|
---|
| 77 | int i2;
|
---|
| 78 | char temporary[MAX_PATH];
|
---|
| 79 | TVITEM tvItem;
|
---|
| 80 |
|
---|
[623] | 81 | if(!DialogBoxParam(hResInst,MAKEINTRESOURCE(IDD_INPUTID),hOwner,(DLGPROC)DlgProject_ResourceID_Input,(long)projectInfo.resourceManager.cursorResources[CursorInfoNum].idName.c_str())) return;
|
---|
[3] | 82 |
|
---|
| 83 | //重複チェック
|
---|
[624] | 84 | for(i2=0;i2<static_cast<int>(projectInfo.resourceManager.cursorResources.size());i2++){
|
---|
[3] | 85 | if(i2==CursorInfoNum) continue;
|
---|
[623] | 86 | if( projectInfo.resourceManager.cursorResources[i2].idName == NewIdName )
|
---|
| 87 | {
|
---|
[3] | 88 | //"ID \"%s\" は既にプロジェクト内に存在します。"
|
---|
| 89 | sprintf(temporary,STRING_DUPLICATIONERROR_ID_IN_PROJECT,NewIdName);
|
---|
| 90 | MessageBox(hOwner,temporary,STRING_ERROR,MB_OK|MB_ICONEXCLAMATION);
|
---|
| 91 | return;
|
---|
| 92 | }
|
---|
| 93 | }
|
---|
| 94 |
|
---|
[623] | 95 | projectInfo.resourceManager.cursorResources[CursorInfoNum].idName = NewIdName;
|
---|
[3] | 96 |
|
---|
[623] | 97 | tvItem.hItem=projectInfo.resourceManager.cursorResources[CursorInfoNum].hTreeItem;
|
---|
[3] | 98 | tvItem.mask=TVIF_TEXT;
|
---|
[623] | 99 | lstrcpy( temporary, projectInfo.resourceManager.cursorResources[CursorInfoNum].idName.c_str() );
|
---|
| 100 | tvItem.pszText=temporary;
|
---|
| 101 | tvItem.cchTextMax=lstrlen(temporary)+1;
|
---|
[3] | 102 | TreeView_SetItem(hMaterialTreeView,&tvItem);
|
---|
| 103 |
|
---|
[618] | 104 | projectInfo.ModifuOfResource=1;
|
---|
[3] | 105 |
|
---|
| 106 | TreeView_SortChildren(hMaterialTreeView,
|
---|
[623] | 107 | TreeView_GetParent(hMaterialTreeView,projectInfo.resourceManager.cursorResources[CursorInfoNum].hTreeItem),
|
---|
[3] | 108 | 0);
|
---|
| 109 | }
|
---|
| 110 |
|
---|
| 111 | void Project_BitmapResInsert(void){
|
---|
| 112 | extern HANDLE hHeap;
|
---|
| 113 | extern LPSTR BitmapFileFilter;
|
---|
| 114 | int i2,i3;
|
---|
| 115 | char temporary[MAX_PATH];
|
---|
| 116 |
|
---|
| 117 | //"ビットマップ ファイルを指定してください"
|
---|
| 118 | if(!GetFilePathDialog(hOwner,temporary,BitmapFileFilter,STRING_FILEOPENTITLE_BITMAP,TRUE)) return;
|
---|
| 119 |
|
---|
[623] | 120 | ActiveBasic::Common::ResourceItem item;
|
---|
| 121 | item.filepath = projectInfo.GetWorkDir().GetRelationalPath( temporary );
|
---|
[3] | 122 |
|
---|
| 123 | for(i3=1;;i3++){
|
---|
| 124 | sprintf(temporary,"IDB_BITMAP%d",i3);
|
---|
[623] | 125 | bool isDuplicate = false;
|
---|
| 126 | BOOST_FOREACH( const ActiveBasic::Common::ResourceItem &resourceItem, projectInfo.resourceManager.bitmapResources )
|
---|
| 127 | {
|
---|
| 128 | if( resourceItem.idName == temporary )
|
---|
| 129 | {
|
---|
| 130 | isDuplicate = true;
|
---|
| 131 | break;
|
---|
| 132 | }
|
---|
[3] | 133 | }
|
---|
[623] | 134 |
|
---|
| 135 | if( !isDuplicate )
|
---|
| 136 | {
|
---|
| 137 | break;
|
---|
| 138 | }
|
---|
[3] | 139 | }
|
---|
[623] | 140 | item.idName = temporary;
|
---|
[3] | 141 |
|
---|
| 142 | //ツリービューに追加
|
---|
| 143 | extern HWND hMaterialTreeView;
|
---|
| 144 | TV_INSERTSTRUCT tv;
|
---|
| 145 | tv.hInsertAfter=TVI_SORT;
|
---|
| 146 | tv.item.mask=TVIF_TEXT|TVIF_IMAGE|TVIF_SELECTEDIMAGE;
|
---|
| 147 | tv.item.iImage=5;
|
---|
| 148 | tv.item.iSelectedImage=5;
|
---|
[623] | 149 | tv.hParent = hBitmapTreeItemForProjectView;
|
---|
[3] | 150 | tv.item.pszText=temporary;
|
---|
| 151 |
|
---|
[623] | 152 | item.hTreeItem = TreeView_InsertItem(hMaterialTreeView,&tv);
|
---|
[3] | 153 |
|
---|
[623] | 154 | TreeView_SelectItem(hMaterialTreeView,item.hTreeItem);
|
---|
[3] | 155 |
|
---|
[623] | 156 | projectInfo.resourceManager.bitmapResources.push_back( item );
|
---|
| 157 |
|
---|
[618] | 158 | projectInfo.ModifuOfResource=1;
|
---|
[3] | 159 |
|
---|
| 160 |
|
---|
| 161 | ////////////////////////////////
|
---|
| 162 | // ウィンドウ プロパティを更新
|
---|
| 163 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 164 | for(i2=0;i2<MAX_WNDNUM;i2++){
|
---|
| 165 | if(MdiInfo[i2].hwnd&&MdiInfo[i2].DocType==WNDTYPE_RAD){
|
---|
| 166 | if(MdiInfo[i2].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW)
|
---|
| 167 | ChangePropertyWindow(i2,GetWndInfoNum(MdiInfo[i2].path));
|
---|
| 168 | }
|
---|
| 169 | }
|
---|
| 170 | }
|
---|
| 171 | void Project_Bitmap_Delete(int BitmapInfoNum){
|
---|
| 172 | //ツリービューから削除
|
---|
| 173 | extern HWND hMaterialTreeView;
|
---|
[623] | 174 | TreeView_DeleteItem(hMaterialTreeView,projectInfo.resourceManager.bitmapResources[BitmapInfoNum].hTreeItem);
|
---|
[3] | 175 |
|
---|
[618] | 176 | //projectInfo.pBitmapInfo構造体から削除
|
---|
[623] | 177 | Jenga::Common::EraseVectorItem<ActiveBasic::Common::ResourceItems>( projectInfo.resourceManager.bitmapResources, BitmapInfoNum );
|
---|
[3] | 178 |
|
---|
[618] | 179 | projectInfo.ModifuOfResource=1;
|
---|
[3] | 180 | }
|
---|
| 181 | void Project_Bitmap_RenameID(int BitmapInfoNum){
|
---|
| 182 | extern HANDLE hHeap;
|
---|
| 183 | extern char NewIdName[MAX_PATH];
|
---|
| 184 | extern HWND hMaterialTreeView;
|
---|
| 185 | int i2;
|
---|
| 186 | char temporary[MAX_PATH];
|
---|
| 187 | TVITEM tvItem;
|
---|
| 188 |
|
---|
[623] | 189 | if(!DialogBoxParam(hResInst,MAKEINTRESOURCE(IDD_INPUTID),hOwner,(DLGPROC)DlgProject_ResourceID_Input,(long)projectInfo.resourceManager.bitmapResources[BitmapInfoNum].idName.c_str())) return;
|
---|
[3] | 190 |
|
---|
| 191 | //重複チェック
|
---|
[624] | 192 | for(i2=0;i2<static_cast<int>(projectInfo.resourceManager.bitmapResources.size());i2++){
|
---|
[3] | 193 | if(i2==BitmapInfoNum) continue;
|
---|
[623] | 194 | if( projectInfo.resourceManager.bitmapResources[i2].idName == NewIdName )
|
---|
| 195 | {
|
---|
[3] | 196 | //"ID \"%s\" は既にプロジェクト内に存在します。"
|
---|
| 197 | sprintf(temporary,STRING_DUPLICATIONERROR_ID_IN_PROJECT,NewIdName);
|
---|
| 198 | MessageBox(hOwner,temporary,STRING_ERROR,MB_OK|MB_ICONEXCLAMATION);
|
---|
| 199 | return;
|
---|
| 200 | }
|
---|
| 201 | }
|
---|
| 202 |
|
---|
[623] | 203 | projectInfo.resourceManager.bitmapResources[BitmapInfoNum].idName = NewIdName;
|
---|
[3] | 204 |
|
---|
[623] | 205 | tvItem.hItem=projectInfo.resourceManager.bitmapResources[BitmapInfoNum].hTreeItem;
|
---|
[3] | 206 | tvItem.mask=TVIF_TEXT;
|
---|
[623] | 207 | lstrcpy( temporary, projectInfo.resourceManager.bitmapResources[BitmapInfoNum].idName.c_str() );
|
---|
| 208 | tvItem.pszText = temporary;
|
---|
| 209 | tvItem.cchTextMax=lstrlen(temporary)+1;
|
---|
[3] | 210 | TreeView_SetItem(hMaterialTreeView,&tvItem);
|
---|
| 211 |
|
---|
[618] | 212 | projectInfo.ModifuOfResource=1;
|
---|
[3] | 213 |
|
---|
| 214 | TreeView_SortChildren(hMaterialTreeView,
|
---|
[623] | 215 | TreeView_GetParent(hMaterialTreeView,projectInfo.resourceManager.bitmapResources[BitmapInfoNum].hTreeItem),
|
---|
[3] | 216 | 0);
|
---|
| 217 | }
|
---|
| 218 | void Project_IconResInsert(void){
|
---|
| 219 | extern HANDLE hHeap;
|
---|
| 220 | extern LPSTR IconFileFilter;
|
---|
| 221 | int i2,i3;
|
---|
| 222 | char temporary[MAX_PATH];
|
---|
| 223 |
|
---|
| 224 | //"アイコン ファイルを指定してください"
|
---|
| 225 | if(!GetFilePathDialog(hOwner,temporary,IconFileFilter,STRING_FILEOPENTITLE_ICON,TRUE)) return;
|
---|
| 226 |
|
---|
[623] | 227 | ActiveBasic::Common::ResourceItem item;
|
---|
| 228 | item.filepath = projectInfo.GetWorkDir().GetRelationalPath( temporary );
|
---|
[3] | 229 |
|
---|
| 230 | for(i3=1;;i3++){
|
---|
| 231 | sprintf(temporary,"IDI_ICON%d",i3);
|
---|
[623] | 232 | bool isDuplicate = false;
|
---|
| 233 | BOOST_FOREACH( const ActiveBasic::Common::ResourceItem &resourceItem, projectInfo.resourceManager.iconResources )
|
---|
| 234 | {
|
---|
| 235 | if( resourceItem.idName == temporary )
|
---|
| 236 | {
|
---|
| 237 | isDuplicate = true;
|
---|
| 238 | break;
|
---|
| 239 | }
|
---|
[3] | 240 | }
|
---|
[623] | 241 |
|
---|
| 242 | if( !isDuplicate )
|
---|
| 243 | {
|
---|
| 244 | break;
|
---|
| 245 | }
|
---|
[3] | 246 | }
|
---|
[623] | 247 | item.idName = temporary;
|
---|
[3] | 248 |
|
---|
| 249 | //ツリービューに追加
|
---|
| 250 | extern HWND hMaterialTreeView;
|
---|
| 251 | TV_INSERTSTRUCT tv;
|
---|
| 252 | tv.hInsertAfter=TVI_SORT;
|
---|
| 253 | tv.item.mask=TVIF_TEXT|TVIF_IMAGE|TVIF_SELECTEDIMAGE;
|
---|
| 254 | tv.item.iImage=4;
|
---|
| 255 | tv.item.iSelectedImage=4;
|
---|
[623] | 256 | tv.hParent = hIconTreeItemForProjectView;
|
---|
| 257 | if(projectInfo.resourceManager.iconResources.size()==0) lstrcat(temporary," (Main)");
|
---|
[3] | 258 | tv.item.pszText=temporary;
|
---|
| 259 |
|
---|
[623] | 260 | item.hTreeItem=
|
---|
[3] | 261 | TreeView_InsertItem(hMaterialTreeView,&tv);
|
---|
| 262 |
|
---|
[623] | 263 | TreeView_SelectItem(hMaterialTreeView,item.hTreeItem);
|
---|
[3] | 264 |
|
---|
[623] | 265 | projectInfo.resourceManager.iconResources.push_back( item );
|
---|
| 266 |
|
---|
[618] | 267 | projectInfo.ModifuOfResource=1;
|
---|
[3] | 268 |
|
---|
| 269 | ////////////////////////////////
|
---|
| 270 | // ウィンドウ プロパティを更新
|
---|
| 271 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 272 | for(i2=0;i2<MAX_WNDNUM;i2++){
|
---|
| 273 | if(MdiInfo[i2].hwnd&&MdiInfo[i2].DocType==WNDTYPE_RAD){
|
---|
| 274 | if(MdiInfo[i2].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW)
|
---|
| 275 | ChangePropertyWindow(i2,GetWndInfoNum(MdiInfo[i2].path));
|
---|
| 276 | }
|
---|
| 277 | }
|
---|
| 278 | }
|
---|
| 279 | void Project_Icon_Delete(int IconInfoNum){
|
---|
| 280 | extern HANDLE hHeap;
|
---|
| 281 | int i2;
|
---|
| 282 | char temporary[MAX_PATH];
|
---|
| 283 | TVITEM tv;
|
---|
| 284 |
|
---|
| 285 | //ツリービューから削除
|
---|
| 286 | extern HWND hMaterialTreeView;
|
---|
[623] | 287 | TreeView_DeleteItem(hMaterialTreeView,projectInfo.resourceManager.iconResources[IconInfoNum].hTreeItem);
|
---|
[3] | 288 |
|
---|
[618] | 289 | //projectInfo.pIconInfo構造体から削除
|
---|
[623] | 290 | Jenga::Common::EraseVectorItem<ActiveBasic::Common::ResourceItems>( projectInfo.resourceManager.iconResources, IconInfoNum );
|
---|
[3] | 291 |
|
---|
[623] | 292 | if(IconInfoNum==0&&projectInfo.resourceManager.iconResources.size()){
|
---|
[3] | 293 | tv.mask=TVIF_TEXT|TVIF_HANDLE;
|
---|
| 294 | tv.pszText=temporary;
|
---|
| 295 | tv.cchTextMax=MAX_PATH;
|
---|
[623] | 296 | tv.hItem=projectInfo.resourceManager.iconResources[0].hTreeItem;
|
---|
[3] | 297 | TreeView_GetItem(hMaterialTreeView,&tv);
|
---|
| 298 | lstrcat(tv.pszText," (Main)");
|
---|
| 299 | TreeView_SetItem(hMaterialTreeView,&tv);
|
---|
| 300 | }
|
---|
| 301 |
|
---|
[618] | 302 | projectInfo.ModifuOfResource=1;
|
---|
[3] | 303 |
|
---|
| 304 | ////////////////////////////////
|
---|
| 305 | // ウィンドウ プロパティを更新
|
---|
| 306 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 307 | for(i2=0;i2<MAX_WNDNUM;i2++){
|
---|
| 308 | if(MdiInfo[i2].hwnd&&MdiInfo[i2].DocType==WNDTYPE_RAD){
|
---|
| 309 | if(MdiInfo[i2].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW)
|
---|
| 310 | ChangePropertyWindow(i2,GetWndInfoNum(MdiInfo[i2].path));
|
---|
| 311 | }
|
---|
| 312 | }
|
---|
| 313 | }
|
---|
| 314 | void Project_Icon_RenameID(int IconInfoNum){
|
---|
| 315 | extern HANDLE hHeap;
|
---|
| 316 | extern char NewIdName[MAX_PATH];
|
---|
| 317 | extern HWND hMaterialTreeView;
|
---|
| 318 | int i2;
|
---|
| 319 | char temporary[MAX_PATH];
|
---|
| 320 | TVITEM tvItem;
|
---|
| 321 |
|
---|
[623] | 322 | if(!DialogBoxParam(hResInst,MAKEINTRESOURCE(IDD_INPUTID),hOwner,(DLGPROC)DlgProject_ResourceID_Input,(long)projectInfo.resourceManager.iconResources[IconInfoNum].idName.c_str())) return;
|
---|
[3] | 323 |
|
---|
| 324 | //重複チェック
|
---|
[624] | 325 | for(i2=0;i2<static_cast<int>(projectInfo.resourceManager.iconResources.size());i2++){
|
---|
[3] | 326 | if(i2==IconInfoNum) continue;
|
---|
[623] | 327 | if( projectInfo.resourceManager.iconResources[i2].idName == NewIdName )
|
---|
| 328 | {
|
---|
[3] | 329 | //"ID \"%s\" は既にプロジェクト内に存在します。"
|
---|
| 330 | sprintf(temporary,STRING_DUPLICATIONERROR_ID_IN_PROJECT,NewIdName);
|
---|
| 331 | MessageBox(hOwner,temporary,STRING_ERROR,MB_OK|MB_ICONEXCLAMATION);
|
---|
| 332 | return;
|
---|
| 333 | }
|
---|
| 334 | }
|
---|
| 335 |
|
---|
[623] | 336 | projectInfo.resourceManager.iconResources[IconInfoNum].idName = NewIdName;
|
---|
[3] | 337 |
|
---|
[623] | 338 | tvItem.hItem=projectInfo.resourceManager.iconResources[IconInfoNum].hTreeItem;
|
---|
[3] | 339 | tvItem.mask=TVIF_TEXT;
|
---|
| 340 | if(IconInfoNum==0){
|
---|
[623] | 341 | sprintf(temporary,"%s (Main)",projectInfo.resourceManager.iconResources[IconInfoNum].idName.c_str());
|
---|
[3] | 342 | }
|
---|
[623] | 343 | else
|
---|
| 344 | {
|
---|
| 345 | sprintf(temporary,"%s",projectInfo.resourceManager.iconResources[IconInfoNum].idName.c_str());
|
---|
| 346 | }
|
---|
| 347 | tvItem.pszText=temporary;
|
---|
| 348 | tvItem.cchTextMax=lstrlen(temporary)+1;
|
---|
[3] | 349 | TreeView_SetItem(hMaterialTreeView,&tvItem);
|
---|
| 350 |
|
---|
[618] | 351 | projectInfo.ModifuOfResource=1;
|
---|
[3] | 352 |
|
---|
| 353 | TreeView_SortChildren(hMaterialTreeView,
|
---|
[623] | 354 | TreeView_GetParent(hMaterialTreeView,projectInfo.resourceManager.iconResources[IconInfoNum].hTreeItem),
|
---|
[3] | 355 | 0);
|
---|
| 356 | }
|
---|
| 357 |
|
---|
| 358 | BOOL CALLBACK DlgProject_ResourceID_Input(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 359 | extern char NewIdName[MAX_PATH];
|
---|
| 360 | switch(message){
|
---|
| 361 | case WM_INITDIALOG:
|
---|
| 362 | //"IDの変更"
|
---|
| 363 | SetWindowText(hwnd,STRING_RENAME_ID);
|
---|
| 364 |
|
---|
| 365 | SetDlgItemText(hwnd,IDC_IDNAME,(char *)lParam);
|
---|
| 366 | SetPosCenter(hwnd);
|
---|
| 367 | break;
|
---|
| 368 | case WM_COMMAND:
|
---|
| 369 | switch(LOWORD(wParam)){
|
---|
| 370 | case IDOK:
|
---|
| 371 | GetDlgItemText(hwnd,IDC_IDNAME,NewIdName,MAX_PATH);
|
---|
| 372 | if(!NewIdName[0]){
|
---|
| 373 | //"ID名を入力して下さい。"
|
---|
| 374 | MessageBox(hwnd,STRING_ERROR_MUST_IDNAME,APPLICATION_NAME,MB_OK);
|
---|
| 375 | return 1;
|
---|
| 376 | }
|
---|
| 377 | EndDialog(hwnd,1);
|
---|
| 378 | return 1;
|
---|
| 379 | case IDCANCEL:
|
---|
| 380 | EndDialog(hwnd,0);
|
---|
| 381 | return 1;
|
---|
| 382 | }
|
---|
| 383 | break;
|
---|
| 384 | }
|
---|
| 385 | return 0;
|
---|
| 386 | }
|
---|