Click here to Skip to main content
15,902,447 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Set Color of other application Pin
Hamid_RT22-May-08 19:16
Hamid_RT22-May-08 19:16 
QuestionUndeclared Identifier Pin
faceninja22-May-08 13:25
faceninja22-May-08 13:25 
AnswerRe: Undeclared Identifier Pin
Dan22-May-08 14:53
Dan22-May-08 14:53 
AnswerRe: Undeclared Identifier Pin
tataxin22-May-08 15:13
tataxin22-May-08 15:13 
AnswerRe: Undeclared Identifier Pin
Nemanja Trifunovic22-May-08 16:52
Nemanja Trifunovic22-May-08 16:52 
AnswerRe: Undeclared Identifier Pin
Stephen Hewitt22-May-08 18:41
Stephen Hewitt22-May-08 18:41 
AnswerRe: Undeclared Identifier Pin
faceninja23-May-08 7:11
faceninja23-May-08 7:11 
Questionwhats wrong with this code Pin
lahom22-May-08 13:02
lahom22-May-08 13:02 
hi
i have this function:
int CBmpDlgDlg::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (CBitmapDialog::OnCreate(lpCreateStruct) == -1)
		return -1;
        CString  path;
		if (vbGetCommandLine()!=" ") 
		{
			if (vbGetCommandLine().Left(1)==CString(char(34)) && vbGetCommandLine().Right(1)==CString(char(34))) 
			{
				path = vbGetCommandLine().Mid(2-1, (vbGetCommandLine().GetLength()-2));
			} 
			else 
			{
				path = vbGetCommandLine();
			}
		}
    CFile f;
	f.Open(path, CFile::modeRead);
	CArchive ar(&f, CArchive::load);
	ar >> m_EDIT1 >> m_EDIT2 ;
	ar.Close();
	f.Close();

	// TODO: Add your specialized creation code here

	return 0;
}

where the vbGetCommandLine() func is as follows:
CString vbGetCommandLine()
	{
	CString CommandLine;
	for (int i=1; i<__argc; i++) {
		if (i!=1) CommandLine += " ";
		bool flSpace = strchr(__argv[i],' ') ? true : false;
		if (flSpace) CommandLine += '"';
		CommandLine += __argv[i];
		if (flSpace) CommandLine += '"';
	}
	return CommandLine;
}

the main idea here is: after saving the file with any data it contains....
when i double click it ...it should open ..first by checking the path of the file then open that file.

ok..my question is ...in "OnCreate()" . exactly in f.open()...if i specified the path like "abc.ccc" it works
but when i put open(path)it wont.
although i checked the path value by amessage box and it showed me that i had the correct path ...this is driving me crazy....
so pleease i would be thankful for any kind of help
AnswerRe: whats wrong with this code Pin
Rajkumar R22-May-08 20:26
Rajkumar R22-May-08 20:26 
GeneralRe: whats wrong with this code Pin
lahom22-May-08 20:50
lahom22-May-08 20:50 
GeneralRe: whats wrong with this code Pin
Rajkumar R22-May-08 20:58
Rajkumar R22-May-08 20:58 
GeneralRe: whats wrong with this code Pin
lahom22-May-08 21:10
lahom22-May-08 21:10 
GeneralRe: whats wrong with this code Pin
Rajkumar R22-May-08 21:35
Rajkumar R22-May-08 21:35 
GeneralRe: whats wrong with this code Pin
lahom22-May-08 21:47
lahom22-May-08 21:47 
GeneralRe: whats wrong with this code Pin
Rajkumar R23-May-08 0:42
Rajkumar R23-May-08 0:42 
GeneralRe: whats wrong with this code Pin
lahom23-May-08 6:59
lahom23-May-08 6:59 
GeneralRe: whats wrong with this code Pin
Rajkumar R24-May-08 3:23
Rajkumar R24-May-08 3:23 
QuestionFile Serialization versus old style data saving on files Pin
Kwanalouie22-May-08 5:56
Kwanalouie22-May-08 5:56 
AnswerRe: File Serialization versus old style data saving on files Pin
CPallini22-May-08 6:02
mveCPallini22-May-08 6:02 
GeneralRe: File Serialization versus old style data saving on files Pin
toxcct22-May-08 6:30
toxcct22-May-08 6:30 
GeneralRe: File Serialization versus old style data saving on files Pin
CPallini22-May-08 7:28
mveCPallini22-May-08 7:28 
AnswerRe: File Serialization versus old style data saving on files Pin
Hamid_RT22-May-08 6:46
Hamid_RT22-May-08 6:46 
AnswerRe: File Serialization versus old style data saving on files Pin
David Crow22-May-08 6:48
David Crow22-May-08 6:48 
QuestionProblem with CHttpFile and HTML Pin
Sylv3322-May-08 4:06
Sylv3322-May-08 4:06 
QuestionHow long int can the threads ID be... Pin
pl_kode22-May-08 4:03
pl_kode22-May-08 4:03 

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.