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:
01070712
Views:
23
Carlos,

Most likely it caused by the requirement to lpszText, lpszCaption and lpszIcon members of the MSGBOXPARAMS structure to be pointers to strings.

In your code you insert strings in the structure directly. The other members become virtually displaced, which makes the system unable to recognize them properly.

Use GlobalAlloc or LocalAlloc or any other memory allocation routine and pass the resulting pointer to the structure. Don't forget to release the memory in the end.

* * *
I just made a quick test of this function. It has confirmed lpszText, lpszCaption to be pointers to strings rather than the strings themselves. The first member, cbSize, should be set to 40 bytes, the size of the structure.

Also lpszIcon should be a resource identifier. I don't think it can be an icon filename.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform