Click here to Skip to main content
15,916,600 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Convert Integer to CString Pin
phanindra varma18-Oct-08 4:04
phanindra varma18-Oct-08 4:04 
GeneralRe: Convert Integer to CString Pin
vijay_aroli7-Oct-08 6:26
vijay_aroli7-Oct-08 6:26 
AnswerRe: Convert Integer to CString Pin
David Crow7-Oct-08 3:36
David Crow7-Oct-08 3:36 
GeneralRe: Convert Integer to CString Pin
Michael Schubert7-Oct-08 3:49
Michael Schubert7-Oct-08 3:49 
GeneralRe: Convert Integer to CString Pin
Rajesh R Subramanian7-Oct-08 5:10
professionalRajesh R Subramanian7-Oct-08 5:10 
GeneralRe: Convert Integer to CString Pin
ThatsAlok7-Oct-08 19:27
ThatsAlok7-Oct-08 19:27 
GeneralRe: Convert Integer to CString Pin
Hamid_RT7-Oct-08 5:13
Hamid_RT7-Oct-08 5:13 
QuestionTimer Problem Pin
MsmVc7-Oct-08 0:11
MsmVc7-Oct-08 0:11 
Hi All

I am useing timer.And that timer i am calling function FolderCopy().Which is working but after 2min code is hange.I havn't figure out what's a exactaly problem.Code is here.OnStartTimer i am calling in
OnInitDialog()


void CAbc::OnStartTimer() 
{

    SetTimer(1,10000, 0);
	
	
}

void CAbc::OnTimer(UINT_PTR nIDEvent)
{	
	FolderCopy();
	
	CDialog::OnTimer(nIDEvent);
}

void CAbc::FolderCopy()
{ 
CString finalString;
		 
		for(int aq=0;aq<20;aq++)
		{
		
	
		finalString=a1[aq];
				
		char * szMyString = (char *)(LPCTSTR)finalString;	
		
		PathRemoveFileSpec(szMyString);
		
		CString string = _T(szMyString);
				
		CString string1=string;
		string1 +='\0';
		int nLen = string1.GetLength();

		LPCSTR lpszBuf = string1.GetBuffer(nLen);

		string1.ReleaseBuffer();
	
		LPCSTR pF=lpszBuf;
		
		LPCSTR pT="c:\\Testing";
	
			
		SHFILEOPSTRUCT sf;
		memset(&sf,0,sizeof(sf));
		sf.hwnd = 0;
		sf.wFunc = FO_COPY;
		sf.pFrom = pF;
		sf.pTo = pT;
		sf.fFlags = FOF_NOCONFIRMATION | FOF_NOCONFIRMMKDIR | FOF_NOERRORUI;
 
		 int n = SHFileOperation(&sf);
		if( n == 0)
		{
			  AfxMessageBox("Success\n");
		 }
		else
		 {
			AfxMessageBox("Failed\n");
		 }

		}
		
		
}


Plz help meRose | [Rose]
AnswerRe: Timer Problem Pin
Cedric Moonen7-Oct-08 0:15
Cedric Moonen7-Oct-08 0:15 
GeneralRe: Timer Problem Pin
MsmVc7-Oct-08 0:40
MsmVc7-Oct-08 0:40 
GeneralRe: Timer Problem Pin
Cedric Moonen7-Oct-08 1:00
Cedric Moonen7-Oct-08 1:00 
GeneralRe: Timer Problem Pin
MsmVc7-Oct-08 1:10
MsmVc7-Oct-08 1:10 
GeneralRe: Timer Problem Pin
Michael Schubert7-Oct-08 1:14
Michael Schubert7-Oct-08 1:14 
GeneralRe: Timer Problem Pin
MsmVc7-Oct-08 1:29
MsmVc7-Oct-08 1:29 
GeneralRe: Timer Problem Pin
Michael Schubert7-Oct-08 1:35
Michael Schubert7-Oct-08 1:35 
AnswerRe: Timer Problem Pin
Michael Schubert7-Oct-08 0:50
Michael Schubert7-Oct-08 0:50 
AnswerRe: Timer Problem Pin
Victor Nijegorodov7-Oct-08 2:08
Victor Nijegorodov7-Oct-08 2:08 
AnswerRe: Timer Problem Pin
David Crow7-Oct-08 3:38
David Crow7-Oct-08 3:38 
GeneralRe: Timer Problem Pin
MsmVc8-Oct-08 2:39
MsmVc8-Oct-08 2:39 
GeneralRe: Timer Problem Pin
David Crow8-Oct-08 3:22
David Crow8-Oct-08 3:22 
GeneralRe: Timer Problem Pin
MsmVc9-Oct-08 19:54
MsmVc9-Oct-08 19:54 
QuestionTotal days in a year ! Pin
Le@rner6-Oct-08 23:26
Le@rner6-Oct-08 23:26 
AnswerRe: Total days in a year ! Pin
Roger Stoltz6-Oct-08 23:31
Roger Stoltz6-Oct-08 23:31 
GeneralRe: Total days in a year ! Pin
Le@rner6-Oct-08 23:32
Le@rner6-Oct-08 23:32 
GeneralRe: Total days in a year ! Pin
PravinSingh7-Oct-08 0:41
PravinSingh7-Oct-08 0:41 

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.