Click here to Skip to main content
15,925,602 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to set a menu bar into a dialog with child style? Pin
DaveLand22-Jul-05 20:39
DaveLand22-Jul-05 20:39 
GeneralScreen Capture Pin
dSolariuM22-Jul-05 19:20
dSolariuM22-Jul-05 19:20 
GeneralRe: Screen Capture Pin
fakefur22-Jul-05 19:55
fakefur22-Jul-05 19:55 
GeneralRe: Screen Capture Pin
sunit522-Jul-05 20:54
sunit522-Jul-05 20:54 
GeneralRe-Associate WebPage with WebSite Pin
CodingBadger22-Jul-05 17:55
CodingBadger22-Jul-05 17:55 
GeneralPrinting bitmaps to printer Pin
Santanu Lahiri22-Jul-05 11:23
Santanu Lahiri22-Jul-05 11:23 
GeneralRe: Printing bitmaps to printer Pin
Christian Graus22-Jul-05 12:14
protectorChristian Graus22-Jul-05 12:14 
GeneralWriting Data to an Open File Pin
Freddie Code22-Jul-05 11:05
Freddie Code22-Jul-05 11:05 
In VC++6 MFC I'm using the CFileDialog Class to get a filename from the user as in the code below.

How do I write ASCII data to the file that is returned. How can I write "Hello World" to the file. Can I use fprintf? What would the file handle be?



	char strFilter[] = { "CANMon Files (*.canmon)|*.canmon|All Files (*.*)|*.*||" };<br />
<br />
	CString canLogFile;<br />
<br />
	CFileDialog FileDlg(FALSE, ".bcr", NULL, 0, strFilter);<br />
<br />
	if( FileDlg.DoModal() == IDOK )<br />
	{<br />
		f.Open(FileDlg.GetFileName(), CFile::modeCreate | CFile::modeWrite);<br />
		CArchive ar(&f, CArchive::store);<br />
<br />
		canLogFile = FileDlg.GetFileName();<br />
		sprintf(szPrintString, canLogFile);<br />
		m_logboxTestVariable.AppendString (canLogFile);<br />
<br />
}<br />

GeneralRe: Writing Data to an Open File Pin
David Crow22-Jul-05 17:52
David Crow22-Jul-05 17:52 
Generalregistry values Pin
Deian22-Jul-05 10:09
Deian22-Jul-05 10:09 
GeneralRe: registry values Pin
David Crow22-Jul-05 10:29
David Crow22-Jul-05 10:29 
GeneralRe: registry values Pin
Deian22-Jul-05 11:15
Deian22-Jul-05 11:15 
GeneralRe: registry values Pin
David Crow22-Jul-05 17:49
David Crow22-Jul-05 17:49 
GeneralRe: registry values Pin
Deian22-Jul-05 22:26
Deian22-Jul-05 22:26 
GeneralRe: registry values Pin
David Crow24-Jul-05 15:56
David Crow24-Jul-05 15:56 
GeneralDetect Mouse Click Pin
jedd99922-Jul-05 10:01
jedd99922-Jul-05 10:01 
GeneralRe: Detect Mouse Click Pin
David Crow22-Jul-05 10:28
David Crow22-Jul-05 10:28 
GeneralVisual C++ 5.0 and Chinese Font Pin
mshuster22-Jul-05 8:54
mshuster22-Jul-05 8:54 
GeneralRe: how to create window in mfc Pin
krmed22-Jul-05 8:20
krmed22-Jul-05 8:20 
GeneralOpenFileDialog in a custom control Pin
Fco. Javier Marin22-Jul-05 7:37
Fco. Javier Marin22-Jul-05 7:37 
Generalkill .exe from an mfc appl Pin
chenggong22-Jul-05 7:36
chenggong22-Jul-05 7:36 
GeneralRe: kill .exe from an mfc appl Pin
David Crow22-Jul-05 8:23
David Crow22-Jul-05 8:23 
GeneralRich edit... help me Pin
Aqueel22-Jul-05 7:26
Aqueel22-Jul-05 7:26 
GeneralRe: Rich edit... help me Pin
Neelesh K J Jain22-Jul-05 8:09
Neelesh K J Jain22-Jul-05 8:09 
GeneralDelete [] charPtr... Pls help Pin
c121hains22-Jul-05 7:01
c121hains22-Jul-05 7:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.