Article View: borland.public.cppbuilder.nativeapi
Article #11158Re: CopyFileEx doesnt want to cancle
From: ScOe
Date: Tue, 24 Feb 2004 11:12
Date: Tue, 24 Feb 2004 11:12
33 lines
2120 bytes
2120 bytes
"Remy Lebeau (TeamB)" <gambit47.no.spam@no.spam.yahoo.com> wrote in message
news:403a9722$1@newsgroups.borland.com...
>
> "ScOe" <cbinders@hotmail.com> wrote in message
> news:403a917f@newsgroups.borland.com...
>
> > But it seems that progress form doesnt process button click.
>
> You need to call Application->ProcessMessages() inside the process routine
> itself while the copying is actually being performed. Calling it before
you
> call CopyFileEx() is meaningless for what you are asking for.
>
I tried that ... but that dont even refresh window display ...
DWORD WINAPI cbFunc(LARGE_INTEGER fsz, LARGE_INTEGER bytx, LARGE_INTEGER
strmsz,
LARGE_INTEGER strmtx,DWORD strmno, DWORD cbReason,HANDLE hsrc,HANDLE
hdest, LPVOID data)
{
char vbuf[40];
Application->ProcessMessages ();
if (frmProgress->IsCancelHit ()) {
frmProgress->SetCancelHit (false);
return PROGRESS_CANCEL;
}
frmProgress->ProgressBar1->Position += bytx.LowPart /100;
return PROGRESS_CONTINUE;
I have also put ShowMessage in ButtonClick event which doesnt execute.
>
> Gambit
>
>
Technical Details
Message-ID:
<403b31f0@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!nx02.iad01.newshosting.com!newshosting.com!yellow.newsread.com!netaxs.com!newsread.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<403a917f@newsgroups.borland.com> <403a9722$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,16b36170c4bd300c X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2004-02-24 03:22:27 PST From: "ScOe" <cbinders@hotmail.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <403a917f@newsgroups.borland.com> <403a9722$1@newsgroups.borland.com> Subject: Re: CopyFileEx doesnt want to cancle Date: Tue, 24 Feb 2004 12:12:21 +0100 Lines: 35 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 193.198.130.137 Message-ID: <403b31f0@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1077621232 193.198.130.137 (24 Feb 2004 03:13:52 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!nx02.iad01.newshosting.com!newshosting.com!yellow.newsread.com!netaxs.com!newsread.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail