BMessage msg(B_OK); BPoint point(10,20); msg.AddPoint("myPoint", point);
BMessage msg(B_OK); msg.AddPoint("myPoint", BPoint(30,40));This example creates a new BMessage object and adds a point to it with the key "myPoint" and the x and y-coordinates of 30 and 40, respectively. Both examples use the BMessage object and its AddPoint function to create a new point structure to be added to the message. The user provides the key and the point data, and the BMessage object inserts it into itself. The package library for this function is the BeOS/Haiku API.