anchor.diff:            return 0;
   
           case IDM_SEARCH_NEXT:
  +          SendMessage(hwndEdit, EM_GETSEL, 0, iOffset);
             return 0;
   
           case IDM_SEARCH_REPLACE:
  +          SendMessage(hwndEdit, EM_GETSEL, 0, iOffset);
  +          hDlgModeless = NotepadFind().ShowReplaceDialog(hwnd);
             return 0;
   
           case IDM_FORMAT_FONT:
  
positive.code:             font.NotepadSetFont(hwndEdit);
            }
  
            font.Delete();
            return 0;
  
          case IDM_HELP:
            OkMessage(hwnd, 'Help not yet implemented!');
            return 0;
        }
        return 0;
  
negative.code:           return 0;
  
          case IDM_FILE_SAVE:
            if (szFileName.elementAt(0).cast<Uint16>().value != 0) {
              if (file.PopFileWrite(hwndEdit, szFileName)) {
                isFileDirty = false;
                return 1;
              } else {
                OkMessage(hwnd,
                    'Could not write file ${szFileName.unpackString(MAX_PATH)}');
                return 0;
              }
            }
            continue SAVE_AS; // fallthru if file is empty
  
          SAVE_AS:
          case IDM_FILE_SAVE_AS:
            if (file.PopFileSaveDlg(hwnd, szFileName, szTitleName) != 0) {
              DoCaption(hwnd, szTitleName.unpackString(MAX_PATH));
  
              if (file.PopFileWrite(hwndEdit, szFileName)) {
                isFileDirty = false;
                return 1;
              } else {
                OkMessage(hwnd,
                    'Could not write file ${szFileName.unpackString(MAX_PATH)}');
              }
            }
            return 0;
  
          case IDM_FILE_PRINT:
            OkMessage(hwnd, 'Print not yet implemented!');
            return 0;
  
          case IDM_APP_EXIT:
  