home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.ms-windows.programmer.misc
- Path: sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!malgudi.oar.net!news.uakron.edu!VM1.CC.UAKRON.EDU!R2NVK
- From: R2NVK@VM1.CC.UAKRON.EDU
- Subject: whats wrong with this code ?
- Message-ID: <16863CC5F.R2NVK@VM1.CC.UAKRON.EDU>
- Sender: news@news.uakron.edu
- Organization: The University of Akron
- Date: Tue, 15 Sep 1992 18:31:59 GMT
- Lines: 20
-
- Hi,
- I am relatively new to window programming. I was trying to write text from an
- edit control to a file but it doesnt create the file but it creates the file wi
- th the name of "chg.$$$". This is the code I had written:
- hFile = OpenFile("data.txt", &OfStruct,OF_CREATE);
- if(hFile < 0)
- {
- sprintf(str, "unable to create file");
- MessageBox(hwnd, str, NULL, MB_OK | MB_ICONEXCLAMATION);
- return(0);
- }
- Any pointers where I am going wrong would be greatly appreciated. Thanks a
- lot in advance.
-
- nagesh
-
-
-
-
-
-