Next, you need to clean up WindowProc a bit. Check the variables used in the rest of WindowProc to be sure their declarations are visible to the function. Likewise, check functions called from WindowProc to make sure they're visible.
For SHOWDIB, you need to make several variables visible from within WindowProc, as discussed in Scope Problems. These variables are defined in SHOWDIB.CPP, so you need extern declarations for them in SHOWDIB.H. Then you can add an include statement for SHOWDIB.H to the SHOWDVW.CPP file.
The code you've just moved into the view class calls two macros, StartWait and EndWait (defined in SHOWDIB.H). To make those macros work, you need to add the following declaration in SHOWDVW.CPP:
static HCURSOR hcurSave;
This ensures the macros, which use the name hcurSave, will find it already defined within the current file, as it already is in SHOWDIB.CPP and DIB.CPP, where the macros are also used.