Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2005 Oct : Windowsexplorer incorrect thumbnails after drag drop in my app

www.cryer.info
Managed Newsgroup Archive

Windowsexplorer incorrect thumbnails after drag drop in my app

Subject:Windowsexplorer incorrect thumbnails after drag drop in my app
Posted by:"Peter Ruf" (adm..@formica.ch)
Date:Thu, 20 Oct 2005 14:38:53 +0200

Hi everybody

I wrote an application where I can select images in windowsexplorer and get
the names of the selected images with drga and drop. After this oberation I
rename the images. All is ok but the thumbnails (I'm not shure if this is
the correct word, it's the "miniature" in german) are no longer correct. The
explorer shows a wrong thumbnail (from another jpg). After I refresh the
thumbnails (menu with the right mousebutton) it changes the thumbnail-images
between the correct and the incorrect image each time I refresh the screen
with F5! I can delete the thumbs.db but it doesn't takes any effect until I
close the explorer and restart it. Any ideas what to do?

Thanks in advance

Peter

Here's my code:

    procedure WMDropFiles(var Msg: TMessage); message WM_DROPFILES;
.....
procedure TForm1.WMDropFiles(var Msg: TMessage);
begin
       anzahl := DragQueryFile(Msg.WParam, $FFFFFFFF, Dateiname, 255);
        for i1 := 0 to (anzahl - 1) do
        begin
          size := DragQueryFile(Msg.WParam, i1 , nil, 0) + 1;
          Dateiname:= StrAlloc(size);
          DragQueryFile(Msg.WParam,i1 , Dateiname, size);
          cD.Add(Dateiname);
          if Thumb = '' then
            Thumb := AddBackSlash(ExtractFilePath(Dateiname))+'Thumbs.db';
          StrDispose(Dateiname);
        end;
        DragFinish(Msg.WParam);
       //here I rename the files
end;

Glossary

File Types

Replies:

www.cryer.info
Managed Newsgroup Archive