Hello,
I am trying to port TShellTreeView from Delphi 6 demos to Lazarus.
I've created a new lazarus package and started copy / paste code from
delphi but I had the following error :
-----------------------
ShellCtrls.pas
.....
  TShellFolder = class
  private
    FPIDL,
    FFullPIDL: PItemIDList;
    FParent: TShellFolder;
    FIShellFolder: IShellFolder;
..........................
Error : Identifier not found "IShellFolder"

I had defined this in file 'C:\lazarus\fpcsrc\packages\extra\winunits\shlobj.pp'
and my ShellCtrls.pas file has
------------------------------
unit ShellCtrls;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils,
  ShlObj in 'C:\lazarus\fpcsrc\packages\extra\winunits\shlobj.pp';
------------------------------
the identifier PItemIDList which is also declared in ShlObj.pas works fine.
I suppose the problem comes from using interfaces but don't know what
is causing it. I've tried adding / removing {$ifdef HASINTF}  around
the declaration but it does not help. It seems that this doesn't work
at all.
If I write 
----------
  IShellFolder = interface(IUnknown) 12345
    [SID_IShellFolder]
----------
no error occurs. 
SID_IShellFolder is a constant and is defined in the same file.

Can you point me to where the problem may be? It will be nice to have
windows' native folders browser. Does any other treeview based folder
browser exist??? This will save me a lot of work?
Thanks

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to