home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / os / mswindo / programm / misc / 1854 < prev    next >
Encoding:
Text File  |  1992-09-15  |  926 b   |  31 lines

  1. Newsgroups: comp.os.ms-windows.programmer.misc
  2. Path: sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!malgudi.oar.net!news.uakron.edu!VM1.CC.UAKRON.EDU!R2NVK
  3. From: R2NVK@VM1.CC.UAKRON.EDU
  4. Subject: whats wrong with this code ?
  5. Message-ID: <16863CC5F.R2NVK@VM1.CC.UAKRON.EDU>
  6. Sender: news@news.uakron.edu
  7. Organization: The University of Akron
  8. Date: Tue, 15 Sep 1992 18:31:59 GMT
  9. Lines: 20
  10.  
  11. Hi,
  12.  I am relatively new to window programming. I was trying to write text from an
  13. edit control to a file but it doesnt create the file but it creates the file wi
  14. th the name of "chg.$$$". This is the code I had written:
  15.  hFile = OpenFile("data.txt", &OfStruct,OF_CREATE);
  16.   if(hFile < 0)
  17.   {
  18.     sprintf(str, "unable to create file");
  19.     MessageBox(hwnd, str, NULL, MB_OK | MB_ICONEXCLAMATION);
  20.     return(0);
  21.    }
  22.   Any pointers where I am going wrong would be greatly appreciated. Thanks a
  23. lot in advance.
  24.  
  25. nagesh
  26.  
  27.  
  28.  
  29.  
  30.  
  31.