Changeset 396 for trunk/dll/newview.c
- Timestamp:
- Jul 28, 2006, 8:42:35 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/newview.c
r377 r396 512 512 if (ad) 513 513 DragOne(WinWindowFromID(WinQueryWindow(hwnd, QW_PARENT), 514 FID_CLIENT), (HWND) 514 FID_CLIENT), (HWND)0, ad -> filename, FALSE); 515 515 } 516 516 break; … … 895 895 static VOID Search(VOID * args) 896 896 { 897 HWND hwnd = (HWND) 897 HWND hwnd = (HWND)args; 898 898 HAB hab2; 899 899 HMQ hmq2; … … 1067 1067 static VOID Clipboard(VOID * args) 1068 1068 { 1069 HWND hwnd = (HWND) 1069 HWND hwnd = (HWND)args; 1070 1070 HAB hab2; 1071 1071 HMQ hmq2; … … 1175 1175 static VOID ReLine(VOID * args) 1176 1176 { 1177 HWND hwnd = (HWND) 1177 HWND hwnd = (HWND)args; 1178 1178 HAB hab2; 1179 1179 HMQ hmq2; … … 1371 1371 static VOID LoadFile(VOID * args) 1372 1372 { 1373 HWND hwnd = (HWND) 1373 HWND hwnd = (HWND)args; 1374 1374 HAB hab2; 1375 1375 HMQ hmq2; … … 1977 1977 WinQueryActiveWindow(WinQueryWindow(ad -> hwndFrame, 1978 1978 QW_PARENT)) && 1979 !ParentIsDesktop(ad -> hwndFrame, (HWND) 1979 !ParentIsDesktop(ad -> hwndFrame, (HWND)0)) 1980 1980 { 1981 1981 if (hwndStatus2) … … 2633 2633 2634 2634 case WM_MENUEND: 2635 if (ad && ad -> hwndPopup == (HWND) 2635 if (ad && ad -> hwndPopup == (HWND)mp2) 2636 2636 { 2637 2637 WinDestroyWindow(ad -> hwndPopup); 2638 ad -> hwndPopup = (HWND) 2638 ad -> hwndPopup = (HWND)0; 2639 2639 } 2640 2640 break; … … 3188 3188 3189 3189 rc = DosRequestMutexSem(ad -> ScanSem, SEM_IMMEDIATE_RETURN); 3190 WinEnableMenuItem((HWND) 3190 WinEnableMenuItem((HWND)mp2, IDM_SAVETOCLIP, (rc == 0 && 3191 3191 ad -> selected != 0)); 3192 WinEnableMenuItem((HWND) 3192 WinEnableMenuItem((HWND)mp2, IDM_APPENDTOCLIP, (rc == 0 && 3193 3193 ad -> selected != 0)); 3194 WinEnableMenuItem((HWND) 3194 WinEnableMenuItem((HWND)mp2, IDM_SAVETOLIST, (rc == 0 && 3195 3195 ad -> selected != 0)); 3196 3196 sSelect = (SHORT) WinSendDlgItemMsg(ad -> hwndFrame, NEWVIEW_LISTBOX, 3197 3197 LM_QUERYITEMCOUNT, MPVOID, MPVOID); 3198 WinEnableMenuItem((HWND) 3198 WinEnableMenuItem((HWND)mp2, IDM_SAVETOCLIP2, (rc == 0 && 3199 3199 sSelect > 0)); 3200 WinEnableMenuItem((HWND) 3200 WinEnableMenuItem((HWND)mp2, IDM_APPENDTOCLIP2, (rc == 0 && 3201 3201 sSelect > 0)); 3202 WinEnableMenuItem((HWND) 3202 WinEnableMenuItem((HWND)mp2, IDM_SAVETOLIST2, (rc == 0 && 3203 3203 sSelect > 0)); 3204 3204 if (!rc) … … 3212 3212 3213 3213 rc = DosRequestMutexSem(ad -> ScanSem, SEM_IMMEDIATE_RETURN); 3214 WinEnableMenuItem((HWND) 3215 WinEnableMenuItem((HWND) 3216 WinEnableMenuItem((HWND) 3217 WinEnableMenuItem((HWND) 3214 WinEnableMenuItem((HWND)mp2, IDM_FONTPALETTE, (rc == 0)); 3215 WinEnableMenuItem((HWND)mp2, IDM_HEXMODE, (rc == 0)); 3216 WinEnableMenuItem((HWND)mp2, IDM_WRAP, (rc == 0)); 3217 WinEnableMenuItem((HWND)mp2, IDM_CODEPAGE, (rc == 0)); 3218 3218 if (!rc) 3219 3219 DosReleaseMutexSem(ad -> ScanSem); 3220 3220 } 3221 WinCheckMenuItem((HWND) 3222 WinCheckMenuItem((HWND) 3223 WinCheckMenuItem((HWND) 3224 WinCheckMenuItem((HWND) 3221 WinCheckMenuItem((HWND)mp2, IDM_HEXMODE, ad -> hex); 3222 WinCheckMenuItem((HWND)mp2, IDM_WRAP, ad -> wrapon); 3223 WinCheckMenuItem((HWND)mp2, IDM_IGNOREFTP, ad -> ignoreftp); 3224 WinCheckMenuItem((HWND)mp2, IDM_IGNOREHTTP, ad -> ignorehttp); 3225 3225 break; 3226 3226 … … 3230 3230 3231 3231 rc = DosRequestMutexSem(ad -> ScanSem, SEM_IMMEDIATE_RETURN); 3232 WinEnableMenuItem((HWND) 3232 WinEnableMenuItem((HWND)mp2, IDM_FINDFIRST, (rc == 0 && 3233 3233 ad -> numlines != 0 && 3234 3234 ad -> markedlines)); 3235 WinEnableMenuItem((HWND) 3235 WinEnableMenuItem((HWND)mp2, IDM_FINDNEXT, (rc == 0 && 3236 3236 ad -> numlines != 0 && 3237 3237 ad -> markedlines && 3238 3238 ad -> found != 0)); 3239 WinEnableMenuItem((HWND) 3239 WinEnableMenuItem((HWND)mp2, IDM_FINDPREV, (rc == 0 && 3240 3240 ad -> numlines != 0 && 3241 3241 ad -> markedlines && 3242 3242 ad -> found != 0)); 3243 WinEnableMenuItem((HWND) 3243 WinEnableMenuItem((HWND)mp2, IDM_NEXTBLANKLINE, (rc == 0 && 3244 3244 ad -> numlines != 0 && 3245 3245 !ad -> hex)); 3246 WinEnableMenuItem((HWND) 3246 WinEnableMenuItem((HWND)mp2, IDM_PREVBLANKLINE, (rc == 0 && 3247 3247 ad -> numlines != 0 && 3248 3248 !ad -> hex)); 3249 WinEnableMenuItem((HWND) 3249 WinEnableMenuItem((HWND)mp2, IDM_GOTOLINE, (rc == 0 && 3250 3250 ad -> numlines != 0)); 3251 WinEnableMenuItem((HWND) 3251 WinEnableMenuItem((HWND)mp2, IDM_GOTOOFFSET, (rc == 0 && 3252 3252 ad -> textsize != 0)); 3253 3253 if (!rc) … … 3261 3261 3262 3262 rc = DosRequestMutexSem(ad -> ScanSem, SEM_IMMEDIATE_RETURN); 3263 WinEnableMenuItem((HWND) 3263 WinEnableMenuItem((HWND)mp2, IDM_SELECTALL, (rc == 0 && 3264 3264 ad -> numlines != 0 && 3265 3265 ad -> markedlines && … … 3267 3267 ad -> numlines || 3268 3268 !ad -> selected))); 3269 WinEnableMenuItem((HWND) 3269 WinEnableMenuItem((HWND)mp2, IDM_DESELECTALL, (rc == 0 && 3270 3270 ad -> numlines != 0 && 3271 3271 ad -> markedlines && 3272 3272 ad -> selected != 0)); 3273 WinEnableMenuItem((HWND) 3273 WinEnableMenuItem((HWND)mp2, IDM_DESELECTFOUND, (rc == 0 && 3274 3274 ad -> numlines != 0 && 3275 3275 ad -> markedlines && 3276 3276 ad -> selected != 0 && 3277 3277 ad -> found != 0)); 3278 WinEnableMenuItem((HWND) 3278 WinEnableMenuItem((HWND)mp2, IDM_SELECTFOUND, (rc == 0 && 3279 3279 ad -> numlines != 0 && 3280 3280 ad -> markedlines && … … 3283 3283 ad -> selected || 3284 3284 !ad -> selected))); 3285 WinEnableMenuItem((HWND) 3285 WinEnableMenuItem((HWND)mp2, IDM_NEXTSELECTED, (rc == 0 && 3286 3286 ad -> numlines != 0 && 3287 3287 ad -> markedlines && 3288 3288 ad -> selected != 0)); 3289 WinEnableMenuItem((HWND) 3289 WinEnableMenuItem((HWND)mp2, IDM_PREVSELECTED, (rc == 0 && 3290 3290 ad -> numlines != 0 && 3291 3291 ad -> markedlines && 3292 3292 ad -> selected != 0)); 3293 WinEnableMenuItem((HWND) 3293 WinEnableMenuItem((HWND)mp2, IDM_INVERT, (rc == 0 && 3294 3294 ad -> numlines != 0 && 3295 3295 ad -> markedlines)); … … 3431 3431 StartMLEEditor(ad -> hwndParent, 4, ad -> filename, 3432 3432 ad -> hwndFrame); 3433 ad -> hwndRestore = (HWND) 3433 ad -> hwndRestore = (HWND)0; 3434 3434 PostMsg(hwnd, WM_CLOSE, MPVOID, MPVOID); 3435 3435 break; … … 4191 4191 { 4192 4192 BOOL dontclose = FALSE; 4193 HWND hwndRestore = (HWND) 4193 HWND hwndRestore = (HWND)0; 4194 4194 4195 4195 WinStopTimer(WinQueryAnchorBlock(hwnd), hwnd, ID_TIMER5); … … 4233 4233 QW_PARENT), QW_PARENT))) 4234 4234 { 4235 if (!PostMsg((HWND) 4235 if (!PostMsg((HWND)0, WM_QUIT, MPVOID, MPVOID)) 4236 4236 DosExit(EXIT_PROCESS, 1); 4237 4237 } … … 4246 4246 HWND hwndRestore) 4247 4247 { 4248 HWND hwndFrame = (HWND) 4248 HWND hwndFrame = (HWND)0, hwndClient; 4249 4249 VIEWDATA *ad; 4250 4250 ULONG FrameFlags = FCF_TITLEBAR | FCF_SYSMENU | … … 4287 4287 if (!ad) { 4288 4288 WinDestroyWindow(hwndFrame); 4289 hwndFrame = (HWND) 4289 hwndFrame = (HWND)0; 4290 4290 } 4291 4291 else {
Note:
See TracChangeset
for help on using the changeset viewer.