Changeset 69 for trunk/dll/mainwnd.c
- Timestamp:
- Nov 5, 2003, 2:18:06 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/dll/mainwnd.c (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/mainwnd.c
r36 r69 143 143 ULONG bd; 144 144 145 if(DosQuerySysInfo(QSV_BOOT_DRIVE,146 QSV_BOOT_DRIVE,147 (PVOID)&bd,148 (ULONG)sizeof(ULONG)))149 bd = 3L;150 *s = (CHAR)bd + '@';151 WinSendMsg(hwndMain,152 UM_SETDIR,153 MPFROMP(s),154 MPFROMLONG(1L));155 if(!mp1) {156 s[3] = 0;157 WinSendMsg(hwndMain,158 UM_SETDIR,159 MPFROMP(s),160 MPVOID);161 }162 PostMsg(MainObjectHwnd,163 UM_RESTORE,164 MPFROMLONG(1L),165 MPFROMLONG(1L));145 if(DosQuerySysInfo(QSV_BOOT_DRIVE, 146 QSV_BOOT_DRIVE, 147 (PVOID)&bd, 148 (ULONG)sizeof(ULONG))) 149 bd = 3L; 150 *s = (CHAR)bd + '@'; 151 WinSendMsg(hwndMain, 152 UM_SETDIR, 153 MPFROMP(s), 154 MPFROMLONG(1L)); 155 if(!mp1) { 156 s[3] = 0; 157 WinSendMsg(hwndMain, 158 UM_SETDIR, 159 MPFROMP(s), 160 MPVOID); 161 } 162 PostMsg(MainObjectHwnd, 163 UM_RESTORE, 164 MPFROMLONG(1L), 165 MPFROMLONG(1L)); 166 166 } 167 167 return 0; … … 220 220 if(hmq2) { 221 221 DosError(FERR_DISABLEHARDERR); 222 WinRegisterClass(hab2,223 GetPString(IDS_WCOBJECTWINDOW),224 MainObjectWndProc,225 0,226 sizeof(PVOID));222 WinRegisterClass(hab2, 223 GetPString(IDS_WCOBJECTWINDOW), 224 MainObjectWndProc, 225 0, 226 sizeof(PVOID)); 227 227 MainObjectHwnd = WinCreateWindow(HWND_OBJECT, 228 228 GetPString(IDS_WCOBJECTWINDOW), … … 234 234 0L, 235 235 0L, 236 HWND_TOP,237 OBJ_FRAME,236 HWND_TOP, 237 OBJ_FRAME, 238 238 NULL, 239 239 NULL); … … 336 336 hwndC = hwndTree; 337 337 pci = (PCNRITEM)WinSendMsg(WinWindowFromID(WinWindowFromID( 338 hwndTree,339 FID_CLIENT),340 TREE_CNR),341 CM_QUERYRECORDEMPHASIS,342 MPFROMLONG(CMA_FIRST),343 MPFROMSHORT(CRA_CURSORED));338 hwndTree, 339 FID_CLIENT), 340 TREE_CNR), 341 CM_QUERYRECORDEMPHASIS, 342 MPFROMLONG(CMA_FIRST), 343 MPFROMSHORT(CRA_CURSORED)); 344 344 } 345 345 if(pci && … … 378 378 HWND FindDirCnrByName (CHAR *directory,BOOL restore) { 379 379 380 HENUM henum; 381 HWND hwndF = (HWND)0,hwndC,hwndDir; 382 CHAR retstr[CCHMAXPATH]; 383 384 if(hwndMain) { 385 henum = WinBeginEnumWindows(hwndMain); 386 while((hwndF = WinGetNextWindow(henum)) != NULLHANDLE) { 387 hwndC = WinWindowFromID(hwndF,FID_CLIENT); 388 if(hwndC) { 389 hwndDir = WinWindowFromID(hwndC,DIR_CNR); 390 if(hwndDir) { 391 *retstr = 0; 380 HENUM henum; 381 HWND hwndF = (HWND)0,hwndC,hwndDir; 382 CHAR retstr[CCHMAXPATH]; 383 384 if(hwndMain) 385 { 386 henum = WinBeginEnumWindows(hwndMain); 387 while((hwndF = WinGetNextWindow(henum)) != NULLHANDLE) 388 { 389 hwndC = WinWindowFromID(hwndF,FID_CLIENT); 390 if(hwndC) 391 { 392 hwndDir = WinWindowFromID(hwndC,DIR_CNR); 393 if(hwndDir) 394 { 395 *retstr = 0; 392 396 WinSendMsg(hwndC, 393 UM_CONTAINERDIR,397 UM_CONTAINERDIR, 394 398 MPFROMP(retstr), 395 399 MPVOID); 396 400 if(*retstr && 397 !stricmp(retstr,directory)) { 398 if(restore) 401 !stricmp(retstr,directory)) 402 { 403 if(restore) 399 404 WinSetWindowPos(hwndF, 400 HWND_TOP,401 0,402 0,403 0,404 0,405 SWP_RESTORE | SWP_SHOW |406 SWP_ACTIVATE | SWP_ZORDER);407 break;408 }409 }410 }411 }412 WinEndEnumWindows(henum);413 }414 return hwndF;405 HWND_TOP, 406 0, 407 0, 408 0, 409 0, 410 SWP_RESTORE | SWP_SHOW | 411 SWP_ACTIVATE | SWP_ZORDER); 412 break; 413 } 414 } 415 } 416 } 417 WinEndEnumWindows(henum); 418 } 419 return hwndF; 415 420 } 416 421 … … 597 602 case MAIN_CMDLIST: 598 603 WinPostMsg(WinWindowFromID(WinQueryWindow(WinQueryWindow(hwnd, 599 QW_PARENT),600 QW_PARENT),601 FID_CLIENT),602 WM_COMMAND,603 MPFROM2SHORT(IDM_EDITCOMMANDS,0),604 MPVOID);604 QW_PARENT), 605 QW_PARENT), 606 FID_CLIENT), 607 WM_COMMAND, 608 MPFROM2SHORT(IDM_EDITCOMMANDS,0), 609 MPVOID); 605 610 break; 606 611 case MAIN_USERLIST: … … 609 614 if(hwndMenu) 610 615 PopupMenu(hwnd, 611 WinWindowFromID(WinQueryWindow(WinQueryWindow(hwnd,612 QW_PARENT),613 QW_PARENT),614 FID_CLIENT),615 hwndMenu);616 WinWindowFromID(WinQueryWindow(WinQueryWindow(hwnd, 617 QW_PARENT), 618 QW_PARENT), 619 FID_CLIENT), 620 hwndMenu); 616 621 break; 617 622 default: … … 1171 1176 strcpy(s,tool->help); 1172 1177 if(tool->flags & T_DROPABLE) 1173 strcat(s,GetPString(IDS_DROPONMETEXT));1178 strcat(s,GetPString(IDS_DROPONMETEXT)); 1174 1179 MakeBubble(hwnd,FALSE,s); 1175 1180 } … … 1184 1189 WinSendMsg(hwndHelp, 1185 1190 HM_DISPLAY_HELP, 1186 MPFROM2SHORT(HELP_TOOLBAR,0),1187 MPFROMSHORT(HM_RESOURCEID));1191 MPFROM2SHORT(HELP_TOOLBAR,0), 1192 MPFROMSHORT(HM_RESOURCEID)); 1188 1193 break; 1189 1194 … … 1435 1440 GetPString(IDS_WCTOOLBUTTONS), 1436 1441 s, 1437 BS_NOPOINTERFOCUS |1438 BS_BITMAP | BS_PUSHBUTTON,1442 BS_NOPOINTERFOCUS | 1443 BS_BITMAP | BS_PUSHBUTTON, 1439 1444 ctrlxpos, 1440 1445 14, … … 1461 1466 GetPString(IDS_WCTOOLBUTTONS), 1462 1467 NullStr, 1463 BS_NOPOINTERFOCUS |1464 BS_BITMAP | BS_PUSHBUTTON,1468 BS_NOPOINTERFOCUS | 1469 BS_BITMAP | BS_PUSHBUTTON, 1465 1470 ctrlxpos, 1466 1471 14, … … 1482 1487 WinCreateWindow(hwndT, 1483 1488 GetPString(IDS_WCTOOLBUTTONS), 1484 (!tool->text && tool->id >= IDM_COMMANDSTART &&1485 tool->id < IDM_QUICKTOOLSTART) ?1486 command_title(tool->id - IDM_COMMANDSTART) :1489 (!tool->text && tool->id >= IDM_COMMANDSTART && 1490 tool->id < IDM_QUICKTOOLSTART) ? 1491 command_title(tool->id - IDM_COMMANDSTART) : 1487 1492 tool->text, 1488 1493 BS_NOPOINTERFOCUS | BS_PUSHBUTTON,
Note:
See TracChangeset
for help on using the changeset viewer.
