home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / PROG_C / COOLWORX.ZIP / SOURCE / COMDLGID.C
C/C++ Source or Header  |  1994-02-02  |  1KB  |  25 lines

  1. #include <windows.h>
  2.  
  3. LONG WINAPI _export cw_CommDlgID(HWND w)
  4.         {
  5.         LONG rv=0;
  6.         char buf[33];
  7. /* Look for key control in common dialog */
  8.         if (GetDlgItemText(w,0x441,buf,sizeof(buf))&&
  9.                          !strncmpi(buf,"Save",4)) return COMMON_SAVE;
  10.         if (GetDlgItemText(w,0x441,buf,sizeof(buf))&&
  11.                          !strncmpi(buf,"List",4)) return COMMON_OPEN;
  12.         if (GetDlgItemText(w,0x421,buf,sizeof(buf))&&
  13.                          !strncmpi(buf,"&Down",5)) return COMMON_FIND;
  14.         if (GetDlgItemText(w,0x400,buf,sizeof(buf))&&
  15.                          !strncmpi(buf,"&Replace",8)) return COMMON_REPL;
  16.         if (GetDlgItemText(w,0x445,buf,sizeof(buf))&&
  17.                          !strncmpi(buf,"Printer:",8)) return COMMON_PRINT;
  18.         if (GetDlgItemText(w,0x440,buf,sizeof(buf))&&
  19.              !strncmpi(buf,"&Font",5)) return COMMON_FONT;
  20.         if (GetDlgItemText(w,0x432,buf,sizeof(buf))&&
  21.              !strncmpi(buf,"Printer",7)) return COMMON_PSETUP;
  22. /* Need one for Color! */
  23.         return rv;
  24.         }
  25.