Click here to Skip to main content
16,005,222 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CFileDialog implementation... Pin
macmac385-May-03 3:37
macmac385-May-03 3:37 
GeneralRe: CFileDialog implementation... Pin
jmkhael5-May-03 4:16
jmkhael5-May-03 4:16 
GeneralRe: CFileDialog implementation... Pin
David Crow5-May-03 4:02
David Crow5-May-03 4:02 
GeneralRe: CFileDialog implementation... Pin
macmac385-May-03 4:05
macmac385-May-03 4:05 
GeneralRe: CFileDialog implementation... Pin
David Crow5-May-03 4:12
David Crow5-May-03 4:12 
GeneralRe: CFileDialog implementation... Pin
macmac385-May-03 5:02
macmac385-May-03 5:02 
GeneralRe: CFileDialog implementation... Pin
David Crow5-May-03 5:12
David Crow5-May-03 5:12 
GeneralRe: CFileDialog implementation... Pin
Anonymous5-May-03 8:12
Anonymous5-May-03 8:12 
I am sorry but thanks for your time.

----------------------------------------------------------------------------
//MainFrm.cpp

void CMainFrame::OnDataSaveAs()
{


CFileDialog dlg(FALSE);

CControlDlg cd;

dlg.m_ofn.lpstrInitialDir = "F:";

dlg.DoModal();

if ( dlg.DoModal() == IDOK)
{

CString filename = dlg.GetPathName();
cd.SaveStream(filename); //doesn't work because no data at start
}
}
-----------------------------------------------------------------------
//ControlDlg.cpp includes the main code for scanner

void CControlDlg::OndataReady(LPUNKNOWN pDobj)
{

STGMEDIUM s;
long hint = 0L;
BOOL r = FALSE;

COleDataObject foo;
foo.Attach((LPDATAOBJECT)pDobj);

r = ReadStream(pDobj, s, foo);

if(r){

SaveStream(filename); //saving

}

}

I like the user to choose a filename when my app starts, because this is a control programm for a 3d scanner over USB. When my app starts the scanner takes some scans every few seconds. So if the user select a filename at the start there is no data for the file at the begining.

When the scanner sends the datafiles i like to save them incremently.
For example:

filename choosen is "File", then saved as:

File_1
File_2
File_3
....

..for this the prog has to know the last filename. This all i have to handle.
GeneralRe: CFileDialog implementation... Pin
David Crow5-May-03 8:29
David Crow5-May-03 8:29 
GeneralRe: CFileDialog implementation... Pin
Anonymous5-May-03 9:08
Anonymous5-May-03 9:08 
GeneralFile Extension SDI Application Pin
Daniel Strigl5-May-03 1:45
Daniel Strigl5-May-03 1:45 
GeneralRe: File Extension SDI Application Pin
macmac385-May-03 2:35
macmac385-May-03 2:35 
GeneralRe: File Extension SDI Application Pin
Daniel Strigl5-May-03 2:41
Daniel Strigl5-May-03 2:41 
GeneralRe: File Extension SDI Application Pin
basementman5-May-03 5:26
basementman5-May-03 5:26 
GeneralRe: File Extension SDI Application Pin
Daniel Strigl5-May-03 9:22
Daniel Strigl5-May-03 9:22 
GeneralWindows version problem Pin
Jump_Around5-May-03 0:16
Jump_Around5-May-03 0:16 
GeneralRe: Windows version problem Pin
User 66585-May-03 0:55
User 66585-May-03 0:55 
GeneralConvertion of ordinary dll to COM Dll Pin
YSRao5-May-03 0:04
YSRao5-May-03 0:04 
GeneralRe: Convertion of ordinary dll to COM Dll Pin
Anders Molin5-May-03 1:08
professionalAnders Molin5-May-03 1:08 
GeneralX-MOTIF like User Interface Pin
ilgale4-May-03 22:35
ilgale4-May-03 22:35 
GeneralRe: X-MOTIF like User Interface Pin
imsniper5-May-03 5:22
imsniper5-May-03 5:22 
QuestionHandling messages on an automation server? Pin
frankwer4-May-03 22:34
frankwer4-May-03 22:34 
QuestionHow to make setup in visual c++ 6.0 !!!plz reply soon Pin
summo4-May-03 21:47
summo4-May-03 21:47 
AnswerRe: How to make setup in visual c++ 6.0 !!!plz reply soon Pin
Larry Antram4-May-03 22:00
Larry Antram4-May-03 22:00 
AnswerRe: How to make setup in visual c++ 6.0 !!!plz reply soon Pin
Vikram A Punathambekar5-May-03 0:23
Vikram A Punathambekar5-May-03 0:23 

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.