Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What the f... is this now
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01048571
Message ID:
01049620
Vues:
18
This message has been marked as the solution to the initial question of the thread.
>>
>> I can't follow the whole thread (more than 50 messages). have you found the caused yet?
>>
>
>Njet!
>
>And I don't think there is anything that could be found. I can tell You in short what happens:
>
>I query two Icons (large and Small). Then I try do do something with their handle, but a command like
>
>
>? loLarge.Handle
>
>
>causes the error "Unknown name". However in the debugger, pointing the mouse over it, properly shows the handle.
>
>OK. Could be anything wrong, handle destroyed or something like that (I checked it does not get destroyed).
>
>But now I did one thing
>
>in a new PRG I created a class
>
>
>define class ABC as custom
>
>    PROCEDURE GetHandle(toPicture as Object) as integer
>        return toPicture.Handle
>    ENDPROC
>
>enddefine
>
>
>Not really much logic in there. More a waste of time and resources BUT
>
>if I do
>
>
>oX = newObject("ABC", "DEF.PRG")
>? oX.GetHandle( loLarge )
>
>? loLarge.Handle
>
>
>The first one works, the second causes an error
>
>You might like to have a look at message #1048975 There You'll find a link to the latest IconBuddy.vcx with two testprograms and a short description
>

Frank,

Actually, I had collected several hints. But Sergey's hints is the one that inspired me.
I just found your culprit. Take a look at your "IconBuddy.h" file.
** change this one
#define HANDLE   long

** to this one (whatever you like as long as it's unique)
#define API_HANDLE  long
Also, change all your API declaration that uses HANDLE to API_HANDLE.


You will like this ;-)

Hehehe.... <lol>

BTW, there is another error on the CreateBmpInfoStruct().
At line "ls_BitmapInfo = ...." the last one is a "qw0" not "dw0". You can replace it with "dw0 + dw0". But you only replace with one dw0

Another thing is, for creating bmp file you can skip the call to IconHandle2Object() in GetAssocIconPairObjects(). Because you already have the HICON once it calls ShellGetFileInfo(). But it's your choice

HTH
Herman
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform