Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with MessageBoxIndirect API
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01070654
Message ID:
01071557
Views:
33
>Carlos,
>
>> BTW I wonder what they use GlobalAlloc, GlobalFree, GlobalSize for?
>
>As I said, the MSGBOXPARAMS structure must contain not strings but pointers to strings. So for each LPCTSTR member you allocate memory (GlobalAlloc or LocalAlloc whatever), copy some text to this memory (CopyMemory) and pass the address to the structure. @ can not be used, as it is used in API declarations. In the end, this allocated memory must be freed (GlobalFree) to prevent memory leak.
>
>The rAPIdStructure class you mentioned, probably does the same on the background, uses Alloc and Free API calls.
>

Thank you for your comments. I am learning a lot from you and Christian. I just realized you are the man behind News2News !!!! Now I understand how come I did not find that MessageBoxIndirect sample before. It just wasnt there! You made it after my first post!

Great site by the way. Lots of useful info there.

>When you attach icons to your VFP project as "Other Files" and compile the project, the resulting executable includes them as icon resources. So I think, the VFP executable can be used instead of a resource-only DLL.
>
>Small inconvenience is that the resource ids are initially unknown. In other words, a draft executable has to be build first.

Are you shure about this? I checked my VFP9 projects with icons, and if I open the exe with PE Explorer or Microangelo Librarian, the only icon resource I see is the icon assigned to the project, the one that shows in shortcuts and explorer.

I even built a new project, added a form with image objects, added icons to image objects, also added icons to project, compiled as a COM dll, and I can only see the FOX icon as a resource in the resulting dll.

By the way I managed to create an icon resource dll using Visual Basic 6, which I have.

I just created a new project as an activex dll, added a resource file, put some icons in it, compiled, and I was able to use it in VFP.

The only problem is that I have to remove all XP images from the icons, or VB6 will not recognize them. I also removed all images smaller than 32x32 or the smaller image will show in the messagebox, but resized to 32x32. Ugly!

Now Iam researching how to create an icon resource only dll from scratch using VFP, so I can just write some kind of "Builder" am I crazy or am I crazy??? LOL

Carlos
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform