2.2 Hints for the Developer

2.2.1 Modeless Dialog Boxes

Modeless dialog boxes are best implemented in an out-of-process server. Because GroupWise traps keyboard events (to turn them into accelerators and eventually into tokens), a .DLL server will experience problems receiving keyboard events when creating a modeless dialog box or window.

2.2.2 Identification of Menu Items, Submenus, and Separators

These items can often be identified in C++ by using the IUnknown pointers to ID the running instances. For example, when an item is added to the menu, the IUnknown pointer is saved and used later to identify the instance when calling GWMenuItems::Item( ).

2.2.3 Refreshing the Client User Interface

A C3PO that replaces custom commands often needs to refresh the client user interface. To do this, given the GWClientState interface, invoke the BuildPersistentID method using the syntax GW#C#xxx where xxx is a function, such as Open. Then call the BuildCommand method, passing the new ID to create a GWCommand. Finally, execute the GWCommand to refresh the Client UI. (See Pre-Built Command ID Encoding.)

Note that if you refresh a query folder, the query will re-execute. The constants in Pre-Built Command ID Encoding provide a text parameter that is associated with each numerical value.