/*
* Example of BubbleGEM support
* with WinDom
*/
#include <windom.h>
void RightButton( void) {
if( evnt.mbut & 0x2)
BubbleEvnt();
}
int main(void) {
OBJECT *tree;
ApplInit();
RsrcLoad( "TEST.RSC");
rsrc_gaddr( 0, FORM1, &tree);
/* Link the bubble help to objects ... */
BubbleAttach( tree, 0, "Formular background"); /* FORM1 */
BubbleAttach( tree, OK, "An exit button"); /* FORM1 */
/* Create form */
FormCreate( tree, MOVER|NAME, NULL, "test", NULL, 1, 0);
/* Handle globally the MU_BUTTON event */
EvntAttach( NULL, WM_XBUTTON, RightButton);
/* On gère les clicks souris GAUCHE et DROIT */
evnt.bclick = 258;
evnt.bmask = 0x1|0x2;
evnt.bstate = 0;
do
EvntWindom( MU_MESAG|MU_BUTTON);
while( wglb.first);
BubbleFree(); /* release the bubbles */
RsrcFree();
ApplExit();
return 0;
}