185
Event event
PROCEDURE OnEvent(oExContextMenu,EventID)
	DevOut( Transform(oExContextMenu:EventParam(-2),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:Event := {|EventID| OnEvent(oExContextMenu,EventID)} /*Notifies the application once the control fires an event.*/

		oExContextMenu:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oExContextMenu:Items():ToString := "Popup 1(Check 1[typ=1],Check 2[typ=1],Check 3[typ=1],Item 1),Expand[img=2][typ=1][chk=1][spchk=-1][group=0x0103](Check 4[typ=1],Check 5[typ=1],Check 6[typ=1][chk=1],Item 2)"
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
184
UncheckItem event
PROCEDURE OnUncheckItem(oExContextMenu,Itm)
	DevOut( Transform(Itm,"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:UncheckItem := {|Itm| OnUncheckItem(oExContextMenu,Itm)} /*Occurs when the user unchecks the item.*/

		oExContextMenu:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oExContextMenu:Items():ToString := "Popup 1(Check 1[typ=1],Check 2[typ=1],Check 3[typ=1],Item 1),Expand[img=2][typ=1][chk=1][spchk=-1][group=0x0103](Check 4[typ=1],Check 5[typ=1],Check 6[typ=1][chk=1],Item 2)"
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
183
CheckItem event
PROCEDURE OnCheckItem(oExContextMenu,Itm)
	DevOut( Transform(Itm,"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:CheckItem := {|Itm| OnCheckItem(oExContextMenu,Itm)} /*Occurs when the user checks the item.*/

		oExContextMenu:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oExContextMenu:Items():ToString := "Popup 1(Check 1[typ=1],Check 2[typ=1],Check 3[typ=1],Item 1),Expand[img=2][typ=1][chk=1][spchk=-1][group=0x0103](Check 4[typ=1],Check 5[typ=1],Check 6[typ=1][chk=1],Item 2)"
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
182
SelectItem event
PROCEDURE OnSelectItem(oExContextMenu,Itm)
	DevOut( Transform(Itm,"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:SelectItem := {|Itm| OnSelectItem(oExContextMenu,Itm)} /*Occurs when the user selects the item.*/

		oExContextMenu:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oExContextMenu:Items():ToString := "Popup 1(Check 1[typ=1],Check 2[typ=1],Check 3[typ=1],Item 1),Expand[img=2][typ=1][chk=1][spchk=-1][group=0x0103](Check 4[typ=1],Check 5[typ=1],Check 6[typ=1][chk=1],Item 2)"
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
181
ImageSize property on 32 (specifies the size of control' icons/images/check-boxes/radio-buttons)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oAppearance
	LOCAL oitem,oitem1
	LOCAL oItems,oItems1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:ImageSize := 32
		oExContextMenu:Font():Size := 16
		oExContextMenu:Images("gBJJgBAIDAAEg4AEEKAD/hz/EMNh8TIRNGwAjEZAEXjAojKAjMLjABhkaABAk0plUrlktl0vmExmUzmk1m03nE5nU7nk9miAoE+oVDolFo1HpFJpU5h8Sf9OqFNqUOqNUqdPq9VrFWrlbr1QpdhAFAkFis1ntF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aAEUwHHiTKInaCQShsFYJUJAdRURQ9EwvCIZBpEWwLChENQwWLCNj2TScBwjCyqbale45ViqdoDU5EUiXJJ8ZxnECfYyrGjaMpCeKBUrGYTVRBIMxLLSia5oeJqMrnBpNVrIUgXCAGFwHK6BcauXIIDp6XoWWRbAAWDpVVzNNC3YzkCIceADHKiXxmVz4JLdGZ1QTGID2XaYaxWK4oZjsVSc4KDHbETbHFi9Fo3NaaxGisew+GYc4HlCR5NAAAIIEkQJSGMOgdE4RhYDwJJsAaAYQgmPpolCWgSCiBJzjcEIAkQXIBm8d5UhOQgCDUIBDDJDhgggJgKgKYJIDSVoDk8KBFF4OohEMZgWDs" +;
		"YYDj4GoGmGSB2B6B5iAiBgYDsYRjGSbIJo4RgqDuIpIAoLoLmMCJGDKDJjJiLA7xqUAAgGTwYnYPoPmQCQGEKEJkEkFg9gGY44BoRoSmSSQ2EKEggHgRhShSZRJFYVoVmWCRmFKFAgGOTheheZgJgYYoYmYSYWGaF4lkMMJ0hqZpJjYbobmcCZGHKHJmjmJh0h2Z4JmYcIaE8WZ2H6H5oAoBoCiCaBKBYfdjGoJoKiKaJKDaDojmkChGgmIgpCoVoWiWaJZiSd4mmmSh2h6J5qAqBoiiiaY5iSeIpmqComiqKpqkqNouiuah6hqMIsmsSpWiuGhP1kOoumuSp2j6L5sAsBo54gKwWkaMZsgsJpKjKbJLDaRYxYWRpSjSbIZiSe41m2CxmlqNptksdpejebR5iSfI4m4S4W16boLiaao6m5fJ9jubwLkaco8m8S5WnaPZunuOp4j6b5Lnac4SA0PAGlgP4wEwFwGkGcIMCcCpCnCCxiA8NYAAmMJfkSbh" +;
		"FCcFpFnGDBnBqRpUhuEwTDeZ5lHCfw6HIQxLCaAxygyJwqgGcATE4FA6hWY4tjEAAQBAgIA==")
		oExContextMenu:SetProperty("SelBackColor",0x4000000)
		oExContextMenu:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,1 } )  , .F. ))
		oExContextMenu:SetProperty("Background",70/*exCheckBoxState0*/,0x1000000)
		oExContextMenu:SetProperty("Background",71/*exCheckBoxState1*/,0x2000000)
		oExContextMenu:SetProperty("Background",72/*exCheckBoxState2*/,0x3000000)
		oItems := oExContextMenu:Items()
			oitem := oItems:Add("Expand",2)
				oitem:Image := 0
				oitem:GroupPopup := 259/*exGroupPopupVertical+exNoGroupPopupFrame+exGroupPopup*/
				oitem:Check := .T.
				oitem:ShowPopupOnChecked := .T.
				oItems1 := oitem:Items()
					oItems1:Padding := "22,0,0,0"
					oItems1:Add("Check 1"):Check := .T.
					oItems1:Add("Check 2"):Check := .T.
					oitem1 := oItems1:Add("Check 3")
						oitem1:Check := .T.
						oitem1:Checked := .T.
				oitem:Checked := .T.
			oItems:Add(""):ToString := "Expand[typ=1][img=2][chk=1][spchk=-1][group=0x0103][itemspad=22,0,0,0](Check 1[id=20][typ=1],Check 2[id=30][typ=1],Check 3[id=40][typ=1][chk=1])"
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
180
ImageSize property on 16 (default) (specifies the size of control' icons/images/check-boxes/radio-buttons)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oAppearance
	LOCAL oitem,oitem1
	LOCAL oItems,oItems1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:ImageS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UrGYTVRBIMxLLSia5oeJqMrnBpNVrIUgXCAGFwHK6BcauXIIDp6XoWWRbAAWDpVVzNNC3YzkCIceADHKiXxmVz4JLdGZ1QTGID2XaYaxWK4oZjsVSc4KDHbETbHFi9Fo3NaaxGisew+GYc4HlCR5NAAAIIEkQJSGMOgdE4RhYDwJJsAaAYQgmPpolCWgSCiBJzjcEIAkQXIBm8d5UhOQgCDUIBDDJDhgggJgKgKYJIDSVoDk8KBFF4OohEMZgWDs" +;
		"YYDj4GoGmGSB2B6B5iAiBgYDsYRjGSbIJo4RgqDuIpIAoLoLmMCJGDKDJjJiLA7xqUAAgGTwYnYPoPmQCQGEKEJkEkFg9gGY44BoRoSmSSQ2EKEggHgRhShSZRJFYVoVmWCRmFKFAgGOTheheZgJgYYoYmYSYWGaF4lkMMJ0hqZpJjYbobmcCZGHKHJmjmJh0h2Z4JmYcIaE8WZ2H6H5oAoBoCiCaBKBYfdjGoJoKiKaJKDaDojmkChGgmIgpCoVoWiWaJZiSd4mmmSh2h6J5qAqBoiiiaY5iSeIpmqComiqKpqkqNouiuah6hqMIsmsSpWiuGhP1kOoumuSp2j6L5sAsBo54gKwWkaMZsgsJpKjKbJLDaRYxYWRpSjSbIZiSe41m2CxmlqNptksdpejebR5iSfI4m4S4W16boLiaao6m5fJ9jubwLkaco8m8S5WnaPZunuOp4j6b5Lnac4SA0PAGlgP4wEwFwGkGcIMCcCpCnCCxiA8NYAAmMJfkSbh" +;
		"FCcFpFnGDBnBqRpUhuEwTDeZ5lHCfw6HIQxLCaAxygyJwqgGcATE4FA6hWY4tjEAAQBAgIA==")
		oExContextMenu:SetProperty("SelBackColor",0x4000000)
		oExContextMenu:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,1 } )  , .F. ))
		oItems := oExContextMenu:Items()
			oitem := oItems:Add("Expand",2)
				oitem:Image := 0
				oitem:GroupPopup := 259/*exGroupPopupVertical+exNoGroupPopupFrame+exGroupPopup*/
				oitem:Check := .T.
				oitem:ShowPopupOnChecked := .T.
				oItems1 := oitem:Items()
					oItems1:Padding := "22,0,0,0"
					oItems1:Add("Check 1"):Check := .T.
					oItems1:Add("Check 2"):Check := .T.
					oitem1 := oItems1:Add("Check 3")
						oitem1:Check := .T.
						oitem1:Checked := .T.
				oitem:Checked := .T.
			oItems:Add(""):ToString := "Expand[typ=1][img=2][chk=1][spchk=-1][group=0x0103][itemspad=22,0,0,0](Check 1[id=20][typ=1],Check 2[id=30][typ=1],Check 3[id=40][typ=1][chk=1])"
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
179
How do I get the item's value without the place holders (exclude mask-characters)

PROCEDURE OnEditChange(oExContextMenu,Itm)
	DevOut( Transform(Itm,"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:EditChange := {|Itm| OnEditChange(oExContextMenu,Itm)} /*Occurs when the user alters the item's text box field.*/

		oExContextMenu:ToString := "Mask[edit=98][editwidth=-128][edittype=2][mask=00000],Mask[edit=98][editwidth=-128][edittype=2][mask=00000;1]"
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
178
Is it possible to insert items at a specified position during runtime, without rebuilding the entire item which hosts the items
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oItems := oExContextMenu:Items()
			oItems:Add("Item A",0,1000)
			oItems:Add("Item B",0,1001)
			oItems:Add("Item C",0,1002):Position := 0
		DevOut( Transform(oExContextMenu:Select(),"") )

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
177
Is it possible to have a popup on a radio button when it is checked

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oitem

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:ToString := "[group=0x03][id=0](Link[id=10][typ=2][grp=100][chk=1],Move To[id=20][typ=2][grp=100][spchk][arrow=0]())"
		oitem := oExContextMenu:Items:item(20)
			oitem:Items():Add("Item A",0,1000)
			oitem:Items():Add("Item B",0,1001)
			oitem:Items():Add("Item C",0,1002)
		DevOut( Transform(oExContextMenu:Select(),"") )

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
176
How can I control the height of the control, so no scroll is required to view all items

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:Font():Size := 6
		oExContextMenu:MenuAppearance := 0/*exMenuNormal*/
		oItems := oExContextMenu:Items()
			DevOut( Transform(oItems:VisibleItemsCount(),"") )
			oItems:VisibleItemsCount := 255
			oItems:ToString := "1,2,3,4,5,6,7,8,9,10,11,12,13"
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
175
How do I specify the control's height (method 3)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oItems := oExContextMenu:Items()
			oItems:Add("Item 1"):ItemHeight := 24
			oItems:Add("Item 2"):ItemHeight := 24
			oItems:Add("Item 3"):ItemHeight := 24
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
174
How do I specify the control's height (method 2)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oItems := oExContextMenu:Items()
			oItems:Add("Item 1"):Padding := "0,4,0,4"
			oItems:Add("Item 2"):Padding := "0,4,0,4"
			oItems:Add("Item 3"):Padding := "0,4,0,4"
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
173
How do I specify the control's height (method 1)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:Font():Size := 12
		oItems := oExContextMenu:Items()
			oItems:Add("Item 1")
			oItems:Add("Item 2")
			oItems:Add("Item 3")
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
172
How can I change the visual appearance of the progress bar

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oitem
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oExContextMenu:SetProperty("Background",260/*0x104+*/,0x1000000)
		oItems := oExContextMenu:Items()
			oitem := oItems:Add("Progress")
				oitem:AllowEdit := 4/*exItemEditProgress*/
				oitem:EditWidth := -128
				oitem:EditValue := 25
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
171
How can I change the progress's color

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oitem
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:SetProperty("Background",260/*0x104+*/,AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oItems := oExContextMenu:Items()
			oitem := oItems:Add("Progress")
				oitem:AllowEdit := 4/*exItemEditProgress*/
				oitem:EditWidth := -128
				oitem:EditValue := 25
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
170
I am using the Item.Visible property on False to hide the item, but the editor is still visible

PROCEDURE OnCheckItem(oExContextMenu,Itm)
	LOCAL oitem
	oitem := oExContextMenu:Items:item(1000)
		oitem:Visible := .T.
		oitem:AllowEdit := 260/*exItemEditReadOnly+exItemEditProgress*/
	oExContextMenu:Select()
RETURN

PROCEDURE OnUncheckItem(oExContextMenu,Itm)
	LOCAL oitem
	oitem := oExContextMenu:Items:item(1000)
		oitem:Visible := .F.
		oitem:AllowEdit := 0/*exItemDisableEdit*/
	oExContextMenu:Select()
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oitem,oitem1,oitem2
	LOCAL oItems,oItems1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:CheckItem := {|Itm| OnCheckItem(oExContextMenu,Itm)} /*Occurs when the user checks the item.*/
		oExContextMenu:UncheckItem := {|Itm| OnUncheckItem(oExContextMenu,Itm)} /*Occurs when the user unchecks the item.*/

		oItems := oExContextMenu:Items()
			oitem := oItems:Add("",2)
				oItems1 := oitem:Items()
					oItems1:Add("Visible")
					oitem1 := oItems1:Add("")
						oitem1:Check := .T.
						oitem1:Checked := .T.
					oitem2 := oItems1:Add("Item 2",,1000)
						oitem2:ItemHeight := 18
						oitem2:Caption := "Percent"
						oitem2:AllowEdit := 260/*exItemEditReadOnly+exItemEditProgress*/
						oitem2:EditValue := 50
						oitem2:Visible := .T.
					oItems1:Add("Visible")
				oitem:GroupPopup := 3/*exNoGroupPopupFrame+exGroupPopup*/
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
169
How can I change the color of a disabled item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oitem
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oItems := oExContextMenu:Items()
			oitem := oItems:Add("Disabled",2,0)
				oitem:SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
				oitem:Items():Add("")
				oitem:GroupPopup := 3/*exNoGroupPopupFrame+exGroupPopup*/
			oItems:Add("Disabled"):Enabled := .F.
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
168
Microsoft Windows 8.1 - Ribbon Like

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oAppearance
	LOCAL oitem,oitem1,oitem10,oitem11,oitem12,oitem13,oitem14,oitem15,oitem16,oitem2,oitem3,oitem4,oitem5,oitem6,oitem7,oitem8,oitem9,var_item,var_item1,var_item2,var_item3,var_item4
	LOCAL oItems,oItems1,oItems10,oItems11,oItems12,oItems13,oItems2,oItems3,oItems4,oItems5,oItems6,oItems7,oItems8,oItems9

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:MenuAppearance := 0/*exMenuNormal*/
		oItems := oExContextMenu:Items()
			oItems:ToString := "[id=0][group=0x03](),[id=-20][bg=0x01000000][group=0x03][itemspad=4,4,4,4]([id=9000])"
			oItems1 := oItems:item(0):Items()
				oItems1:Add("",0,0):Padding := "8,0,0,0"
				var_item3 := oItems1:Add("New Page")
					var_item3:ToString := "[id=0][typ=2][chk=1][spchk=-1][show=1][grp=10][bghot=0x12000000][bgsel=0x11000000][bgselhot=0x14000000][group=0x03][tab=9000][pad=4,0,4,0][popupoffset=-4,-1]([id=0][group=0x03])"
					var_item3:ID := 200
					var_item3:Caption := "Page1"
					var_item := var_item3:Items:Add("New Group")
						var_item:ToString := "[id=0][group=0x03][itemspad=4,4,4,18][itemsbg=0x02000000][itemsbghot=0x04000000]()"
						var_item:Caption := "<b><font ;14>A"
						oItems2 := var_item:Items()
							oItems2:BackgroundExt := "bottom[16,text=`<fgcolor A0A0A0><font ;8>Horizontal`,align=0x11]"
							oitem := oItems2:Add("",2)
								oitem:GroupPopup := 17/*exGroupPopupEqualWidth+exGroupPopup*/
								oitem:Caption := ""
								oItems3 := oitem:Items()
									oitem1 := oItems3:Add("R1")
										oitem1:RadioGroup := 100
										oitem1:Radio := .T.
										oitem1:ShowCheckedAsSelected := 1/*exDisplayItemHighlight*/
										oitem1:Checked := .F.
									oitem2 := oItems3:Add("R2")
										oitem2:RadioGroup := 100
										oitem2:Radio := .T.
										oitem2:ShowCheckedAsSelected := 1/*exDisplayItemHighlight*/
										oitem2:Checked := .T.
									oitem3 := oItems3:Add("R3")
										oitem3:RadioGroup := 100
										oitem3:Radio := .T.
										oitem3:ShowCheckedAsSelected := 1/*exDisplayItemHighlight*/
										oitem3:Checked := .F.
					var_item1 := var_item3:Items:Add("New Group")
						var_item1:ToString := "[id=0][group=0x03][itemspad=4,4,4,18][itemsbg=0x02000000][itemsbghot=0x04000000]()"
						var_item1:Caption := "<b><font ;14>B"
						oItems4 := var_item1:Items()
							oItems4:BackgroundExt := "bottom[16,text=`<fgcolor A0A0A0><font ;8>Vertical`,align=0x11]"
							oitem4 := oItems4:Add("",2)
								oitem4:GroupPopup := 289/*exGroupPopupVertical+exGroupPopupEqualHeight+exGroupPopup*/
								oitem4:Caption := ""
								oItems5 := oitem4:Items()
									oitem5 := oItems5:Add("C1")
										oitem5:Check := .T.
										oitem5:Checked := .T.
									oitem6 := oItems5:Add("C2")
										oitem6:Check := .T.
										oitem6:Checked := .F.
									oitem7 := oItems5:Add("C3")
										oitem7:Check := .T.
										oitem7:Checked := .T.
					var_item3:Items():Add("",0,0):Padding := "4,0,0,0"
					var_item2 := var_item3:Items:Add("New Group")
						var_item2:ToString := "[id=0][group=0x03][itemspad=4,4,4,18][itemsbg=0x02000000][itemsbghot=0x04000000]()"
						var_item2:Caption := ""
						oItems6 := var_item2:Items()
							oItems6:BackgroundExt := "bottom[16,text=`<fgcolor A0A0A0><font ;8>Mixt`,align=0x11]"
							oitem8 := oItems6:Add("",0)
								oitem8:AllowEdit := 1027/*exItemEditVertical+exItemEditSlider*/
								oitem8:ItemHeight := 76
								oitem8:EditBorder := 0/*exEditBorderNone*/
								oitem8:EditValue := 25
							oitem9 := oItems6:Add("",2)
								oitem9:GroupPopup := 259/*exGroupPopupVertical+exNoGroupPopupFrame+exGroupPopup*/
								oitem9:Caption := ""
								oItems7 := oitem9:Items()
									oitem10 := oItems7:Add("",2)
										oitem10:GroupPopup := 3/*exNoGroupPopupFrame+exGroupPopup*/
										oItems8 := oitem10:Items()
											oitem11 := oItems8:Add("Button1",2)
												oitem11:ShowAsButton := 275/*exShowAsSelectButtonBottom+exShowAsButtonAutoSize*/
												oItems9 := oitem11:Items()
													oItems9:Add("Item 1")
													oItems9:Add("Item 2")
													oItems9:Add("Item 3")
											oItems8:Add("",0,0):Padding := "4,0,0,0"
											oitem12 := oItems8:Add("Button2",2)
												oitem12:ShowAsButton := 275/*exShowAsSelectButtonBottom+exShowAsButtonAutoSize*/
												oItems10 := oitem12:Items()
													oItems10:Add("Item 4")
													oItems10:Add("Item 5")
													oItems10:Add("Item 6")
									oitem13 := oItems7:Add("Popup",2)
										oitem13:Alignment := 1/*exCenter*/
										oItems11 := oitem13:Items()
											oItems11:Add("Item 7"):Check := .T.
											oItems11:Add("Item 8")
											oItems12 := oItems11:Add("Item 9",2):Items()
												oItems12:Add("Item 10")
												oItems12:Add("Item 11")
												oItems12:Add("Item 12")
				var_item4 := oItems1:Add("New Page")
					var_item4:ToString := "[id=0][typ=2][chk=0][spchk=-1][show=1][grp=10][bghot=0x12000000][bgsel=0x11000000][bgselhot=0x14000000][group=0x03][tab=9000][pad=4,0,4,0][popupoffset=-4,-1]([id=0][group=0x03])"
					var_item4:ID := 300
					var_item4:Caption := "Page2"
					oItems13 := var_item4:Items()
						oitem14 := oItems13:Add("S1")
							oitem14:ItemHeight := 88
							oitem14:AllowEdit := 1540/*exItemEditVertical+exItemEditSpin+exItemEditProgress*/
							oitem14:EditValue := 25
						oitem15 := oItems13:Add("S2")
							oitem15:ItemHeight := 88
							oitem15:AllowEdit := 1540/*exItemEditVertical+exItemEditSpin+exItemEditProgress*/
							oitem15:EditValue := 50
						oitem16 := oItems13:Add("S3")
							oitem16:ItemHeight := 88
							oitem16:AllowEdit := 1540/*exItemEditVertical+exItemEditSpin+exItemEditProgress*/
							oitem16:EditValue := 75
				oItems1:Add("",0,0):Padding := "8,0,0,0"
		oAppearance := oExContextMenu:VisualAppearance()
			oAppearance:Add(1,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSFlat-Ribbon/msfr_background.ebn")
			oAppearance:Add(2,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSFlat-Ribbon/msfr_groupt.ebn")
			oAppearance:Add(12,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSFlat-Ribbon/msfr_hot.ebn")
			oAppearance:Add(14,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSFlat-Ribbon/msfr_select.ebn")
			oAppearance:Add(17,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSFlat-Ribbon/msfr_tab.ebn")
			oAppearance:Add(18,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSFlat-Ribbon/msfr_tabhot.ebn")
			oAppearance:Add(32,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSFlat-Ribbon/msfr_check0.ebn")
			oAppearance:Add(33,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSFlat-Ribbon/msfr_check1.ebn")
			oAppearance:Add(34,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSFlat-Ribbon/msfr_buttonu.ebn")
			oAppearance:Add(35,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSFlat-Ribbon/msfr_buttond.ebn")
		oExContextMenu:Appearance := 16777216/*0x1000000+*/
		oExContextMenu:SetProperty("Background",64/*exToolTipAppearance*/,oExContextMenu:Appearance())
		oExContextMenu:SetProperty("SelBackColor",0xe000000)
		oExContextMenu:SetProperty("Background",110/*exMenuHotBackColor*/,0xc000000)
		oExContextMenu:SetProperty("Background",112/*exMenuSelHotBackColor*/,0x23000000)
		oExContextMenu:SetProperty("Background",2/*0x2+*/,0x22000000)
		oExContextMenu:SetProperty("Background",3/*0x3+*/,0x23000000)
		oExContextMenu:SetProperty("Background",70/*exCheckBoxState0*/,0x20000000)
		oExContextMenu:SetProperty("Background",71/*exCheckBoxState1*/,0x21000000)
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
167
Microsoft Paint - Ribbon Like

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oAppearance
	LOCAL oitem,oitem1,oitem10,oitem11,oitem12,oitem13,oitem14,oitem15,oitem16,oitem2,oitem3,oitem4,oitem5,oitem6,oitem7,oitem8,oitem9,var_item,var_item1,var_item2,var_item3,var_item4
	LOCAL oItems,oItems1,oItems10,oItems11,oItems12,oItems13,oItems2,oItems3,oItems4,oItems5,oItems6,oItems7,oItems8,oItems9

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:MenuAppearance := 0/*exMenuNormal*/
		oItems := oExContextMenu:Items()
			oItems:ToString := "[id=0][group=0x03](),[id=-20][bg=0x01000000][group=0x03][itemspad=4,4,4,4]([id=9000])"
			oItems1 := oItems:item(0):Items()
				oItems1:Add("",0,0):Padding := "8,0,0,0"
				var_item3 := oItems1:Add("New Page")
					var_item3:ToString := "[id=0][typ=2][chk=1][spchk=-1][show=1][grp=10][bghot=0x12000000][bgsel=0x11000000][bgselhot=0x14000000][group=0x03][tab=9000][pad=4,0,4,0][popupoffset=-4,-1]([id=0][group=0x03])"
					var_item3:ID := 200
					var_item3:Caption := "Page1"
					var_item := var_item3:Items:Add("New Group")
						var_item:ToString := "[id=0][group=0x03][itemspad=4,4,4,18][itemsbg=0x02000000][itemsbghot=0x04000000]()"
						var_item:Caption := "<b><font ;14>A"
						oItems2 := var_item:Items()
							oItems2:BackgroundExt := "bottom[16,text=`<fgcolor A0A0A0><font ;8>Horizontal`,align=0x11]"
							oitem := oItems2:Add("",2)
								oitem:GroupPopup := 17/*exGroupPopupEqualWidth+exGroupPopup*/
								oitem:Caption := ""
								oItems3 := oitem:Items()
									oitem1 := oItems3:Add("R1")
										oitem1:RadioGroup := 100
										oitem1:Radio := .T.
										oitem1:ShowCheckedAsSelected := 1/*exDisplayItemHighlight*/
										oitem1:Checked := .F.
									oitem2 := oItems3:Add("R2")
										oitem2:RadioGroup := 100
										oitem2:Radio := .T.
										oitem2:ShowCheckedAsSelected := 1/*exDisplayItemHighlight*/
										oitem2:Checked := .T.
									oitem3 := oItems3:Add("R3")
										oitem3:RadioGroup := 100
										oitem3:Radio := .T.
										oitem3:ShowCheckedAsSelected := 1/*exDisplayItemHighlight*/
										oitem3:Checked := .F.
					var_item1 := var_item3:Items:Add("New Group")
						var_item1:ToString := "[id=0][group=0x03][itemspad=4,4,4,18][itemsbg=0x02000000][itemsbghot=0x04000000]()"
						var_item1:Caption := "<b><font ;14>B"
						oItems4 := var_item1:Items()
							oItems4:BackgroundExt := "bottom[16,text=`<fgcolor A0A0A0><font ;8>Vertical`,align=0x11]"
							oitem4 := oItems4:Add("",2)
								oitem4:GroupPopup := 289/*exGroupPopupVertical+exGroupPopupEqualHeight+exGroupPopup*/
								oitem4:Caption := ""
								oItems5 := oitem4:Items()
									oitem5 := oItems5:Add("C1")
										oitem5:Check := .T.
										oitem5:Checked := .T.
									oitem6 := oItems5:Add("C2")
										oitem6:Check := .T.
										oitem6:Checked := .F.
									oitem7 := oItems5:Add("C3")
										oitem7:Check := .T.
										oitem7:Checked := .T.
					var_item3:Items():Add("",0,0):Padding := "4,0,0,0"
					var_item2 := var_item3:Items:Add("New Group")
						var_item2:ToString := "[id=0][group=0x03][itemspad=4,4,4,18][itemsbg=0x02000000][itemsbghot=0x04000000]()"
						var_item2:Caption := ""
						oItems6 := var_item2:Items()
							oItems6:BackgroundExt := "bottom[16,text=`<fgcolor A0A0A0><font ;8>Mixt`,align=0x11]"
							oitem8 := oItems6:Add("",0)
								oitem8:AllowEdit := 1027/*exItemEditVertical+exItemEditSlider*/
								oitem8:ItemHeight := 76
								oitem8:EditBorder := 0/*exEditBorderNone*/
								oitem8:EditValue := 25
							oitem9 := oItems6:Add("",2)
								oitem9:GroupPopup := 259/*exGroupPopupVertical+exNoGroupPopupFrame+exGroupPopup*/
								oitem9:Caption := ""
								oItems7 := oitem9:Items()
									oitem10 := oItems7:Add("",2)
										oitem10:GroupPopup := 3/*exNoGroupPopupFrame+exGroupPopup*/
										oItems8 := oitem10:Items()
											oitem11 := oItems8:Add("Button1",2)
												oitem11:ShowAsButton := 275/*exShowAsSelectButtonBottom+exShowAsButtonAutoSize*/
												oItems9 := oitem11:Items()
													oItems9:Add("Item 1")
													oItems9:Add("Item 2")
													oItems9:Add("Item 3")
											oItems8:Add("",0,0):Padding := "4,0,0,0"
											oitem12 := oItems8:Add("Button2",2)
												oitem12:ShowAsButton := 275/*exShowAsSelectButtonBottom+exShowAsButtonAutoSize*/
												oItems10 := oitem12:Items()
													oItems10:Add("Item 4")
													oItems10:Add("Item 5")
													oItems10:Add("Item 6")
									oitem13 := oItems7:Add("Popup",2)
										oitem13:Alignment := 1/*exCenter*/
										oItems11 := oitem13:Items()
											oItems11:Add("Item 7"):Check := .T.
											oItems11:Add("Item 8")
											oItems12 := oItems11:Add("Item 9",2):Items()
												oItems12:Add("Item 10")
												oItems12:Add("Item 11")
												oItems12:Add("Item 12")
				var_item4 := oItems1:Add("New Page")
					var_item4:ToString := "[id=0][typ=2][chk=0][spchk=-1][show=1][grp=10][bghot=0x12000000][bgsel=0x11000000][bgselhot=0x14000000][group=0x03][tab=9000][pad=4,0,4,0][popupoffset=-4,-1]([id=0][group=0x03])"
					var_item4:ID := 300
					var_item4:Caption := "Page2"
					oItems13 := var_item4:Items()
						oitem14 := oItems13:Add("S1")
							oitem14:ItemHeight := 88
							oitem14:AllowEdit := 1540/*exItemEditVertical+exItemEditSpin+exItemEditProgress*/
							oitem14:EditValue := 25
						oitem15 := oItems13:Add("S2")
							oitem15:ItemHeight := 88
							oitem15:AllowEdit := 1540/*exItemEditVertical+exItemEditSpin+exItemEditProgress*/
							oitem15:EditValue := 50
						oitem16 := oItems13:Add("S3")
							oitem16:ItemHeight := 88
							oitem16:AllowEdit := 1540/*exItemEditVertical+exItemEditSpin+exItemEditProgress*/
							oitem16:EditValue := 75
				oItems1:Add("",0,0):Padding := "8,0,0,0"
		oAppearance := oExContextMenu:VisualAppearance()
			oAppearance:Add(1,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSPaint-Ribbon/mspr_background.ebn")
			oAppearance:Add(2,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSPaint-Ribbon/mspr_groupt.ebn")
			oAppearance:Add(3,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSPaint-Ribbon/mspr_groupo.ebn")
			oAppearance:Add(4,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSPaint-Ribbon/mspr_grouphot.ebn")
			oAppearance:Add(5,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSPaint-Ribbon/mspr_frameh.ebn")
			oAppearance:Add(6,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSPaint-Ribbon/mspr_framehs.ebn")
			oAppearance:Add(7,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSPaint-Ribbon/mspr_framehi.ebn")
			oAppearance:Add(8,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSPaint-Ribbon/mspr_framehe.ebn")
			oAppearance:Add(9,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSPaint-Ribbon/mspr_framevs.ebn")
			oAppearance:Add(10,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSPaint-Ribbon/mspr_framevi.ebn")
			oAppearance:Add(11,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSPaint-Ribbon/mspr_frameve.ebn")
			oAppearance:Add(12,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSPaint-Ribbon/mspr_select.ebn")
			oAppearance:Add(13,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSPaint-Ribbon/mspr_bordert.ebn")
			oAppearance:Add(14,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSPaint-Ribbon/mspr_buttond.ebn")
			oAppearance:Add(15,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSPaint-Ribbon/mspr_buttonu.ebn")
			oAppearance:Add(16,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSPaint-Ribbon/mspr_tab.ebn")
			oAppearance:Add(17,"CP:16 0 0 0 1")
			oAppearance:Add(18,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSPaint-Ribbon/mspr_tabhot.ebn")
			oAppearance:Add(19,"C:/Program Files/Exontrol/ExContextMenu/Sample/EBN/MSPaint-Ribbon/mspr_tabselhot.ebn")
			oAppearance:Add(20,"CP:19 0 0 0 1")
		oExContextMenu:LocalAppearance := 6/*ShadowBorder*/
		oExContextMenu:Appearance := 16777216/*0x1000000+*/
		oExContextMenu:SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 21,66,139 } )  , .F. ))
		oExContextMenu:SetProperty("SelBackColor",0xe000000)
		oExContextMenu:SetProperty("Background",64/*exToolTipAppearance*/,oExContextMenu:Appearance())
		oExContextMenu:SetProperty("Background",2/*0x2+*/,0xd000000)
		oExContextMenu:SetProperty("Background",105/*exGroupPopupFrameSingle*/,0x5000000)
		oExContextMenu:SetProperty("Background",106/*exGroupPopupFrameHStart*/,0x6000000)
		oExContextMenu:SetProperty("Background",107/*exGroupPopupFrameHIntermediate*/,0x7000000)
		oExContextMenu:SetProperty("Background",108/*exGroupPopupFrameHEnd*/,0x8000000)
		oExContextMenu:SetProperty("Background",116/*exGroupPopupFrameVStart*/,0x9000000)
		oExContextMenu:SetProperty("Background",117/*exGroupPopupFrameVIntermediate*/,0xa000000)
		oExContextMenu:SetProperty("Background",118/*exGroupPopupFrameVEnd*/,0xb000000)
		oExContextMenu:SetProperty("Background",110/*exMenuHotBackColor*/,0xc000000)
		oExContextMenu:SetProperty("Background",112/*exMenuSelHotBackColor*/,0xf000000)
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
166
Microsoft Office - Ribbon Like

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oAppearance
	LOCAL oitem,oitem1,oitem10,oitem11,oitem12,oitem13,oitem14,oitem15,oitem16,oitem2,oitem3,oitem4,oitem5,oitem6,oitem7,oitem8,oitem9,var_item,var_item1,var_item2,var_item3,var_item4
	LOCAL oItems,oItems1,oItems10,oItems11,oItems12,oItems13,oItems2,oItems3,oItems4,oItems5,oItems6,oItems7,oItems8,oItems9

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:MenuAppearance := 0/*exMenuNormal*/
		oItems := oExContextMenu:Items()
			oItems:ToString := "[id=0][group=0x03](),[id=-20][bg=0x01000000][group=0x03][itemspad=4,4,4,4]([id=9000])"
			oItems1 := oItems:item(0):Items()
				oItems1:Add("",0,0):Padding := "8,0,0,0"
				var_item3 := oItems1:Add("New Page")
					var_item3:ToString := "[id=0][typ=2][chk=1][spchk=-1][show=1][grp=10][bghot=0x12000000][bgsel=0x11000000][bgselhot=0x14000000][group=0x03][tab=9000][pad=4,0,4,0][popupoffset=-4,-1]([id=0][group=0x03])"
					var_item3:ID := 200
					var_item3:Caption := "Page1"
					var_item := var_item3:Items:Add("New Group")
						var_item:ToString := "[id=0][group=0x03][itemspad=4,4,4,18][itemsbg=0x02000000][itemsbghot=0x04000000]()"
						var_item:Caption := "<b><font ;14>A"
						oItems2 := var_item:Items()
							oItems2:BackgroundExt := "bottom[16,text=`<fgcolor A0A0A0><font ;8>Horizontal`,align=0x11]"
							oitem := oItems2:Add("",2)
								oitem:GroupPopup := 17/*exGroupPopupEqualWidth+exGroupPopup*/
								oitem:Caption := ""
								oItems3 := oitem:Items()
									oitem1 := oItems3:Add("R1")
										oitem1:RadioGroup := 100
										oitem1:Radio := .T.
										oitem1:ShowCheckedAsSelected := 1/*exDisplayItemHighlight*/
										oitem1:Checked := .F.
									oitem2 := oItems3:Add("R2")
										oitem2:RadioGroup := 100
										oitem2:Radio := .T.
										oitem2:ShowCheckedAsSelected := 1/*exDisplayItemHighlight*/
										oitem2:Checked := .T.
									oitem3 := oItems3:Add("R3")
										oitem3:RadioGroup := 100
										oitem3:Radio := .T.
										oitem3:ShowCheckedAsSelected := 1/*exDisplayItemHighlight*/
										oitem3:Checked := .F.
					var_item1 := var_item3:Items:Add("New Group")
						var_item1:ToString := "[id=0][group=0x03][itemspad=4,4,4,18][itemsbg=0x02000000][itemsbghot=0x04000000]()"
						var_item1:Caption := "<b><font ;14>B"
						oItems4 := var_item1:Items()
							oItems4:BackgroundExt := "bottom[16,text=`<fgcolor A0A0A0><font ;8>Vertical`,align=0x11]"
							oitem4 := oItems4:Add("",2)
								oitem4:GroupPopup := 289/*exGroupPopupVertical+exGroupPopupEqualHeight+exGroupPopup*/
								oitem4:Caption := ""
								oItems5 := oitem4:Items()
									oitem5 := oItems5:Add("C1")
										oitem5:Check := .T.
										oitem5:Checked := .T.
									oitem6 := oItems5:Add("C2")
										oitem6:Check := .T.
										oitem6:Checked := .F.
									oitem7 := oItems5:Add("C3")
										oitem7:Check := .T.
										oitem7:Checked := .T.
					var_item3:Items():Add("",0,0):Padding := "4,0,0,0"
					var_item2 := var_item3:Items:Add("New Group")
						var_item2:ToString := "[id=0][group=0x03][itemspad=4,4,4,18][itemsbg=0x02000000][itemsbghot=0x04000000]()"
						var_item2:Caption := ""
						oItems6 := var_item2:Items()
							oItems6:BackgroundExt := "bottom[16,text=`<fgcolor A0A0A0><font ;8>Mixt`,align=0x11]"
							oitem8 := oItems6:Add("",0)
								oitem8:AllowEdit := 1027/*exItemEditVertical+exItemEditSlider*/
								oitem8:ItemHeight := 76
								oitem8:EditBorder := 0/*exEditBorderNone*/
								oitem8:EditValue := 25
							oitem9 := oItems6:Add("",2)
								oitem9:GroupPopup := 259/*exGroupPopupVertical+exNoGroupPopupFrame+exGroupPopup*/
								oitem9:Caption := ""
								oItems7 := oitem9:Items()
									oitem10 := oItems7:Add("",2)
										oitem10:GroupPopup := 3/*exNoGroupPopupFrame+exGroupPopup*/
										oItems8 := oitem10:Items()
											oitem11 := oItems8:Add("Button1",2)
												oitem11:ShowAsButton := 275/*exShowAsSelectButtonBottom+exShowAsButtonAutoSize*/
												oItems9 := oitem11:Items()
													oItems9:Add("Item 1")
													oItems9:Add("Item 2")
													oItems9:Add("Item 3")
											oItems8:Add("",0,0):Padding := "4,0,0,0"
											oitem12 := oItems8:Add("Button2",2)
												oitem12:ShowAsButton := 275/*exShowAsSelectButtonBottom+exShowAsButtonAutoSize*/
												oItems10 := oitem12:Items()
													oItems10:Add("Item 4")
													oItems10:Add("Item 5")
													oItems10:Add("Item 6")
									oitem13 := oItems7:Add("Popup",2)
										oitem13:Alignment := 1/*exCenter*/
										oItems11 := oitem13:Items()
											oItems11:Add("Item 7"):Check := .T.
											oItems11:Add("Item 8")
											oItems12 := oItems11:Add("Item 9",2):Items()
												oItems12:Add("Item 10")
												oItems12:Add("Item 11")
												oItems12:Add("Item 12")
				var_item4 := oItems1:Add("New Page")
					var_item4:ToString := "[id=0][typ=2][chk=0][spchk=-1][show=1][grp=10][bghot=0x12000000][bgsel=0x11000000][bgselhot=0x14000000][group=0x03][tab=9000][pad=4,0,4,0][popupoffset=-4,-1]([id=0][group=0x03])"
					var_item4:ID := 300
					var_item4:Caption := "Page2"
					oItems13 := var_item4:Items()
						oitem14 := oItems13:Add("S1")
							oitem14:ItemHeight := 88
							oitem14:AllowEdit := 1540/*exItemEditVertical+exItemEditSpin+exItemEditProgress*/
							oitem14:EditValue := 25
						oitem15 := oItems13:Add("S2")
							oitem15:ItemHeight := 88
							oitem15:AllowEdit := 1540/*exItemEditVertical+exItemEditSpin+exItemEditProgress*/
							oitem15:EditValue := 50
						oitem16 := oItems13:Add("S3")
							oitem16:ItemHeight := 88
							oitem16:AllowEdit := 1540/*exItemEditVertical+exItemEditSpin+exItemEditProgress*/
							oitem16:EditValue := 75
				oItems1:Add("",0,0):Padding := "8,0,0,0"
		oAppearance := oExContextMenu:VisualAppearance()
			oAppearance:Add(1,"C:\Program Files\Exontrol\ExContextMenu\Sample\EBN\MSOffice-Ribbon\msor_background.ebn")
			oAppearance:Add(2,"C:\Program Files\Exontrol\ExContextMenu\Sample\EBN\MSOffice-Ribbon\msor_groupt.ebn")
			oAppearance:Add(3,"C:\Program Files\Exontrol\ExContextMenu\Sample\EBN\MSOffice-Ribbon\msor_groupo.ebn")
			oAppearance:Add(4,"C:\Program Files\Exontrol\ExContextMenu\Sample\EBN\MSOffice-Ribbon\msor_grouphot.ebn")
			oAppearance:Add(5,"C:\Program Files\Exontrol\ExContextMenu\Sample\EBN\MSOffice-Ribbon\msor_frameh.ebn")
			oAppearance:Add(6,"C:\Program Files\Exontrol\ExContextMenu\Sample\EBN\MSOffice-Ribbon\msor_framehs.ebn")
			oAppearance:Add(7,"C:\Program Files\Exontrol\ExContextMenu\Sample\EBN\MSOffice-Ribbon\msor_framehi.ebn")
			oAppearance:Add(8,"C:\Program Files\Exontrol\ExContextMenu\Sample\EBN\MSOffice-Ribbon\msor_framehe.ebn")
			oAppearance:Add(9,"C:\Program Files\Exontrol\ExContextMenu\Sample\EBN\MSOffice-Ribbon\msor_framevs.ebn")
			oAppearance:Add(10,"C:\Program Files\Exontrol\ExContextMenu\Sample\EBN\MSOffice-Ribbon\msor_framevi.ebn")
			oAppearance:Add(11,"C:\Program Files\Exontrol\ExContextMenu\Sample\EBN\MSOffice-Ribbon\msor_frameve.ebn")
			oAppearance:Add(12,"C:\Program Files\Exontrol\ExContextMenu\Sample\EBN\MSOffice-Ribbon\msor_select.ebn")
			oAppearance:Add(13,"C:\Program Files\Exontrol\ExContextMenu\Sample\EBN\MSOffice-Ribbon\msor_bordert.ebn")
			oAppearance:Add(14,"C:\Program Files\Exontrol\ExContextMenu\Sample\EBN\MSOffice-Ribbon\msor_buttond.ebn")
			oAppearance:Add(15,"C:\Program Files\Exontrol\ExContextMenu\Sample\EBN\MSOffice-Ribbon\msor_buttonu.ebn")
			oAppearance:Add(16,"C:\Program Files\Exontrol\ExContextMenu\Sample\EBN\MSOffice-Ribbon\msor_tab.ebn")
			oAppearance:Add(17,"CP:16 0 0 0 1")
			oAppearance:Add(18,"C:\Program Files\Exontrol\ExContextMenu\Sample\EBN\MSOffice-Ribbon\msor_tabhot.ebn")
			oAppearance:Add(19,"C:\Program Files\Exontrol\ExContextMenu\Sample\EBN\MSOffice-Ribbon\msor_tabselhot.ebn")
			oAppearance:Add(20,"CP:19 0 0 0 1")
		oExContextMenu:SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 21,66,139 } )  , .F. ))
		oExContextMenu:SetProperty("SelBackColor",0xe000000)
		oExContextMenu:LocalAppearance := 6/*ShadowBorder*/
		oExContextMenu:Appearance := 16777216/*0x1000000+*/
		oExContextMenu:SetProperty("Background",64/*exToolTipAppearance*/,oExContextMenu:Appearance())
		oExContextMenu:SetProperty("Background",2/*0x2+*/,0xd000000)
		oExContextMenu:SetProperty("Background",105/*exGroupPopupFrameSingle*/,0x5000000)
		oExContextMenu:SetProperty("Background",106/*exGroupPopupFrameHStart*/,0x6000000)
		oExContextMenu:SetProperty("Background",107/*exGroupPopupFrameHIntermediate*/,0x7000000)
		oExContextMenu:SetProperty("Background",108/*exGroupPopupFrameHEnd*/,0x8000000)
		oExContextMenu:SetProperty("Background",116/*exGroupPopupFrameVStart*/,0x9000000)
		oExContextMenu:SetProperty("Background",117/*exGroupPopupFrameVIntermediate*/,0xa000000)
		oExContextMenu:SetProperty("Background",118/*exGroupPopupFrameVEnd*/,0xb000000)
		oExContextMenu:SetProperty("Background",110/*exMenuHotBackColor*/,0xc000000)
		oExContextMenu:SetProperty("Background",112/*exMenuSelHotBackColor*/,0xf000000)
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
165
How I can assign buttons to a tab

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oitem,oitem1
	LOCAL oItems,oItems1,oItems2,oItems3

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:SetProperty("Background",102/*exMenuSelBorderColor*/,AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oItems := oExContextMenu:Items()
			oItems:ToString := "[id=0][group=0x0103][itemspad=4,4,4,4]([id=-10][group=0x03](),[id=0][bg=RGB(240,240,240)][group=0x03][itemspad=4,4,4,4]([id=-100]))"
			oItems1 := oItems:item(-10):Items()
				oItems1:Add("",0,0):Padding := "8,0,0,0"
				oitem := oItems1:Add("New Page")
					oitem:ToString := "[typ=2][chk=1][spchk=-1][show=1][grp=10][bghot=RGB(255,255,255)][bgsel=RGB(240,240,240)][bgselhot=RGB(240,240,240)][height=16][group=0x03][tab=-100][pad=2,0,2,0]([id=50][group=0x03]([]))"
					oitem:Caption := "Page<off -5><font ;5><b>1</b></font></off>"
					oItems2 := oitem:Items()
						oItems2:Add("Button 1"):ShowAsButton := 3/*exShowAsButtonAutoSize+exShowAsButton*/
						oItems2:Add("Button 2"):ShowAsButton := 3/*exShowAsButtonAutoSize+exShowAsButton*/
						oItems2:Add("Button 3"):ShowAsButton := 3/*exShowAsButtonAutoSize+exShowAsButton*/
				oitem1 := oItems1:Add("New Page")
					oitem1:ToString := "[typ=2][chk=0][spchk=-1][show=1][grp=10][bghot=RGB(255,255,255)][bgsel=RGB(240,240,240)][bgselhot=RGB(240,240,240)][height=16][group=0x03][tab=-100][pad=2,0,2,0]([id=50][group=0x03]([]))"
					oitem1:Caption := "Page<off -5><font ;5><b>2</b></font></off>"
					oItems3 := oitem1:Items()
						oItems3:Add("Button 3"):ShowAsButton := 3/*exShowAsButtonAutoSize+exShowAsButton*/
						oItems3:Add("Button 4"):ShowAsButton := 3/*exShowAsButtonAutoSize+exShowAsButton*/
				oItems1:Add("",0,0):Padding := "8,0,0,0"
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
164
How can I hide an item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oItems := oExContextMenu:Items()
			oItems:Add("Item 1"):Visible := .F.
			oItems:Add("Item 2")
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
163
How do I get the item giving its caption

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oItems := oExContextMenu:Items()
			oItems:Add("Item 1"):ID := 1000
			oItems:Add("Item 2"):ID := 1001
		oExContextMenu:item("Item 1"):Bold := .T.
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
162
How do I get the item giving its identifier

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oItems := oExContextMenu:Items()
			oItems:Add("Item 1"):ID := 1000
			oItems:Add("Item 2"):ID := 1001
		oExContextMenu:item(1000):Bold := .T.
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
161
Can I change the cursor where it hovers the item
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:Cursor := "exCross"
		oItems := oExContextMenu:Items()
			oItems:Add("Item 1")
			oItems:Add("Item 2"):Cursor := "exNoDrop"
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
160
I am using radio-buttons, the question is it possible to uncheck the radio-buttons, so no button is pressed in the group

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oitem,oitem1,oitem2
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:AllowToggleRadio := .T.
		oItems := oExContextMenu:Items()
			oitem := oItems:Add("Radio 1",,1000)
				oitem:Radio := .T.
				oitem:RadioGroup := 100
			oitem1 := oItems:Add("Radio 2",,1001)
				oitem1:Radio := .T.
				oitem1:RadioGroup := 100
			oitem2 := oItems:Add("Radio 2",,1003)
				oitem2:Radio := .T.
				oitem2:RadioGroup := 100
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
159
Is it possible to display the item's identifiers

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:Debug := .T.
		oItems := oExContextMenu:Items()
			oItems:Add("Item 1"):ID := 10001
			oItems:Add("Item 2"):ID := 10002
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
158
How do I disable showing the tooltip for all control (method 2)
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:AllowToolTip := .F.
		oItems := oExContextMenu:Items()
			oItems:Add("Item"):Tooltip := "this is a bit of text to be shown when cursor hovers it"
			oItems:Add("Item"):Tooltip := "this is a bit of text to be shown when cursor hovers it"
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
157
How can I disable the control

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oItems := oExContextMenu:Items()
			oItems:Add("Item 1"):Enabled := .F.
			oItems:Add("Item 2"):Enabled := .F.
			oItems:Add("Item 3"):Enabled := .F.
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
156
How can I specify a different border/visual appearance for drop down portion of the select buttons/combobox (ebn)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oitem,oitem1,oitem2
	LOCAL oItems,oItems1,oItems2,oItems3

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oExContextMenu:LocalAppearance := 16777216/*0x1000000+*/
		oItems := oExContextMenu:Items()
			oitem := oItems:Add("",2)
				oitem:GroupPopup := 3/*exNoGroupPopupFrame+exGroupPopup*/
				oItems1 := oitem:Items()
					oitem1 := oItems1:Add("Button",2)
						oitem1:ShowAsButton := 275/*exShowAsSelectButtonBottom+exShowAsButtonAutoSize*/
						oItems2 := oitem1:Items()
							oItems2:Add("Item 1")
							oItems2:Add("Item 2")
							oItems2:Add("Item 3")
					oitem2 := oItems1:Add("Button",2)
						oitem2:ShowAsButton := 275/*exShowAsSelectButtonBottom+exShowAsButtonAutoSize*/
						oItems3 := oitem2:Items()
							oItems3:Add("Item 4")
							oItems3:Add("Item 5")
							oItems3:Add("Item 6")
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
155
How can I specify a different border for drop down portion of the select buttons/combobox

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oitem,oitem1,oitem2
	LOCAL oItems,oItems1,oItems2,oItems3

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:LocalAppearance := 6/*ShadowBorder*/
		oItems := oExContextMenu:Items()
			oitem := oItems:Add("",2)
				oitem:GroupPopup := 3/*exNoGroupPopupFrame+exGroupPopup*/
				oItems1 := oitem:Items()
					oitem1 := oItems1:Add("Button",2)
						oitem1:ShowAsButton := 275/*exShowAsSelectButtonBottom+exShowAsButtonAutoSize*/
						oItems2 := oitem1:Items()
							oItems2:Add("Item 1")
							oItems2:Add("Item 2")
							oItems2:Add("Item 3")
					oitem2 := oItems1:Add("Button",2)
						oitem2:ShowAsButton := 275/*exShowAsSelectButtonBottom+exShowAsButtonAutoSize*/
						oItems3 := oitem2:Items()
							oItems3:Add("Item 4")
							oItems3:Add("Item 5")
							oItems3:Add("Item 6")
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
154
How can I change the visual appearance for the entire control

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oitem
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oExContextMenu:Appearance := 16777216/*0x1000000+*/
		oExContextMenu:ShowCheckedAsSelected := -1/*exDisplayItemCheckHighlight*/
		oItems := oExContextMenu:Items()
			oItems:Padding := "4,4,4,4"
			oitem := oItems:Add("Radio 1")
				oitem:Radio := .T.
				oitem:Checked := .T.
			oItems:Add("Radio 2"):Radio := .T.
			oItems:Add("Radio 3"):Radio := .T.
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
153
How can I show a border arround the control

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oitem,oitem1
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:Appearance := 1/*FlatBorder*/
		oExContextMenu:ShowCheckedAsSelected := -1/*exDisplayItemCheckHighlight*/
		oItems := oExContextMenu:Items()
			oItems:Padding := "4,4,4,4"
			oitem := oItems:Add("Check 1")
				oitem:Checked := .T.
				oitem:Check := .T.
			oitem1 := oItems:Add("Check 2")
				oitem1:Check := .T.
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
152
Is it possible to change the item's background color when check/uncheck the item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oitem,oitem1
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:ShowCheckedAsSelected := -1/*exDisplayItemCheckHighlight*/
		oItems := oExContextMenu:Items()
			oItems:Padding := "4,4,4,4"
			oitem := oItems:Add("Check 1")
				oitem:Checked := .T.
				oitem:Check := .T.
			oitem1 := oItems:Add("Check 2")
				oitem1:Check := .T.
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
151
How can I change the colors for hot/hover items

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oitem,oitem1
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:SetProperty("Background",110/*exMenuHotBackColor*/,AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,1 } )  , .F. ))
		oExContextMenu:SetProperty("Background",111/*exMenuHotForeColor*/,AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
		oExContextMenu:SetProperty("Background",112/*exMenuSelHotBackColor*/,AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
		oExContextMenu:SetProperty("Background",113/*exMenuSelHotForeColor*/,AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
		oExContextMenu:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
		oExContextMenu:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
		oExContextMenu:SetProperty("Background",102/*exMenuSelBorderColor*/,AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
		oExContextMenu:ShowCheckedAsSelected := -1/*exDisplayItemCheckHighlight*/
		oItems := oExContextMenu:Items()
			oItems:Padding := "4,4,4,4"
			oItems:Add(""):ToString := "[group=3](Item 1,Item 2)"
			oitem := oItems:Add("Check 1")
				oitem:Checked := .T.
				oitem:Check := .T.
			oitem1 := oItems:Add("Check 2")
				oitem1:Check := .T.
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
150
How do I change the visual appearance of the groups (vertical)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oAppearance
	LOCAL oitem,oitem1,oitem2
	LOCAL oItems,oItems1,oItems2,oItems3

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oAppearance := oExContextMenu:VisualAppearance()
			oAppearance:Add(1,"c:\exontrol\images\normal.ebn")
			oAppearance:Add(2,"c:\exontrol\images\pushed.ebn")
			oAppearance:Add(3,"c:\exontrol\images\hot.ebn")
		oExContextMenu:SetProperty("Background",105/*exGroupPopupFrameSingle*/,0x1000000)
		oExContextMenu:SetProperty("Background",116/*exGroupPopupFrameVStart*/,0x1000000)
		oExContextMenu:SetProperty("Background",117/*exGroupPopupFrameVIntermediate*/,0x2000000)
		oExContextMenu:SetProperty("Background",118/*exGroupPopupFrameVEnd*/,0x3000000)
		oExContextMenu:SetProperty("Background",109/*exGroupPopupFrameSolid*/,AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oItems := oExContextMenu:Items()
			oitem := oItems:Add("",2)
				oitem:GroupPopup := 3/*exNoGroupPopupFrame+exGroupPopup*/
				oItems1 := oitem:Items()
					oitem1 := oItems1:Add("Vertical",2)
						oitem1:Alignment := 1/*exCenter*/
						oitem1:GroupPopup := 257/*exGroupPopupVertical+exGroupPopup*/
						oItems2 := oitem1:Items()
							oItems2:Add("Item 1")
							oItems2:Add("Item 2")
							oItems2:Add("Item 3")
							oItems2:Add("Item 4")
							oItems2:Add("Item 5")
					oItems1:Add(""):CaptionWidth := 12
					oitem2 := oItems1:Add("Vertical",2)
						oitem2:Alignment := 1/*exCenter*/
						oitem2:GroupPopup := 449/*exGroupPopupVertical+exGroupPopupFrameThickBox+exGroupPopupFrameSolidBox+exGroupPopup*/
						oItems3 := oitem2:Items()
							oItems3:Add("Item 1")
							oItems3:Add("Item 2")
							oItems3:Add("Item 3")
							oItems3:Add("Item 4")
							oItems3:Add("Item 5")
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
149
How do I change the visual appearance of the groups (horizontal)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oAppearance
	LOCAL oitem
	LOCAL oItems,oItems1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oAppearance := oExContextMenu:VisualAppearance()
			oAppearance:Add(1,"c:\exontrol\images\normal.ebn")
			oAppearance:Add(2,"c:\exontrol\images\pushed.ebn")
			oAppearance:Add(3,"c:\exontrol\images\hot.ebn")
		oExContextMenu:SetProperty("Background",105/*exGroupPopupFrameSingle*/,0x1000000)
		oExContextMenu:SetProperty("Background",106/*exGroupPopupFrameHStart*/,0x1000000)
		oExContextMenu:SetProperty("Background",107/*exGroupPopupFrameHIntermediate*/,0x2000000)
		oExContextMenu:SetProperty("Background",108/*exGroupPopupFrameHEnd*/,0x3000000)
		oExContextMenu:SetProperty("Background",109/*exGroupPopupFrameSolid*/,AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oItems := oExContextMenu:Items()
			oitem := oItems:Add("Horizontal Group",2)
				oitem:GroupPopup := 1/*exGroupPopup*/
				oItems1 := oitem:Items()
					oItems1:Add("Item 1")
					oItems1:Add("Item 2")
					oItems1:Add("Item 3")
					oItems1:Add("Item 4")
					oItems1:Add("Item 5")
			oItems:Add(""):ToString := "Horizontal Group[group=193](Item 1,Item 2,Item 3,Item 4,Item 5)"
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
148
How can I change the visual appearance of the separator item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oExContextMenu:SetProperty("Background",103/*exMenuSeparatorItem*/,0x1000000)
		oItems := oExContextMenu:Items()
			oItems:Add("Item"):CaptionWidth := 128
			oItems:Add("",1)
			oItems:Add("Item"):CaptionWidth := 128
			oItems:Add(""):ToString := "<font ;5>separator[sep]"
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
147
How can I change the visual appearance of the flat portion of the drop down of the control

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oItems,oItems1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oExContextMenu:SetProperty("FlatBackColor",0x1000000)
		oExContextMenu:SetProperty("Background",100/*exMenuFlatLineColor*/,oExContextMenu:FlatBackColor())
		oItems := oExContextMenu:Items()
			oItems1 := oItems:Add("Popup",2):Items()
				oItems1:Add("Item 1"):Check := .T.
				oItems1:Add("Item 2"):Check := .T.
				oItems1:Add("Item 3"):Check := .T.
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
146
How can I change the visual appearance of the radio-buttons to be displayed in the context menu (ebn)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oAppearance
	LOCAL oitem,oitem1,oitem2,oitem3
	LOCAL oItems,oItems1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oAppearance := oExContextMenu:VisualAppearance()
			oAppearance:Add(1,"c:\exontrol\images\normal.ebn")
			oAppearance:Add(2,"c:\exontrol\images\pushed.ebn")
		oExContextMenu:SetProperty("Background",73/*exRadioButtonState0*/,0x1000000)
		oExContextMenu:SetProperty("Background",74/*exRadioButtonState1*/,0x2000000)
		oItems := oExContextMenu:Items()
			oitem := oItems:Add("",2)
				oitem:GroupPopup := 1/*exGroupPopup*/
				oItems1 := oitem:Items()
					oitem1 := oItems1:Add("Radio 1",,1000)
						oitem1:Radio := .T.
						oitem1:RadioGroup := 100
					oitem2 := oItems1:Add("Radio 2",,1001)
						oitem2:Radio := .T.
						oitem2:RadioGroup := 100
					oitem3 := oItems1:Add("Radio 2",,1003)
						oitem3:Radio := .T.
						oitem3:RadioGroup := 100
					oItems1:item(1000):Checked := .T.
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
145
How can I change the visual appearance of the check-boxes to be displayed in the context menu (ebn)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oAppearance
	LOCAL oitem,oitem1
	LOCAL oItems,oItems1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oAppearance := oExContextMenu:VisualAppearance()
			oAppearance:Add(1,"c:\exontrol\images\normal.ebn")
			oAppearance:Add(2,"c:\exontrol\images\pushed.ebn")
		oExContextMenu:SetProperty("Background",70/*exCheckBoxState0*/,0x1000000)
		oExContextMenu:SetProperty("Background",71/*exCheckBoxState1*/,0x2000000)
		oItems := oExContextMenu:Items()
			oitem := oItems:Add("",2)
				oitem:GroupPopup := 3/*exNoGroupPopupFrame+exGroupPopup*/
				oItems1 := oitem:Items()
					oitem1 := oItems1:Add("Check 1")
						oitem1:Check := .T.
						oitem1:Checked := .T.
					oItems1:Add("Check 2"):Check := .T.
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
144
How can I change the visual appearance of the tooltips to be displayed in the context menu (ebn)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oAppearance
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oAppearance := oExContextMenu:VisualAppearance()
			oAppearance:Add(1,"c:\exontrol\images\normal.ebn")
			oAppearance:Add(2,"c:\exontrol\images\pushed.ebn")
		oExContextMenu:ToolTipDelay := 1
		oExContextMenu:SetProperty("Background",64/*exToolTipAppearance*/,0x1000000)
		oExContextMenu:SetProperty("Background",66/*exToolTipForeColor*/,AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oItems := oExContextMenu:Items()
			oItems:Add("Item"):Tooltip := "this is a bit of text to be shown when cursor hovers it"
			oItems:Add("Item"):Tooltip := "this is a bit of text to be shown when cursor hovers it"
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
143
Is it possible to change the visual appearance of the buttons to be displayed in the context menu (ebn)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oAppearance
	LOCAL oitem,oitem1,oitem2,oitem3
	LOCAL oItems,oItems1,oItems2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oAppearance := oExContextMenu:VisualAppearance()
			oAppearance:Add(1,"c:\exontrol\images\normal.ebn")
			oAppearance:Add(2,"c:\exontrol\images\pushed.ebn")
		oExContextMenu:SetProperty("Background",2/*0x2+*/,0x1000000)
		oExContextMenu:SetProperty("Background",3/*0x3+*/,0x2000000)
		oExContextMenu:SetProperty("Background",114/*exMenuSeparatorSelectButton*/,AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oExContextMenu:SetProperty("Background",115/*exMenuSeparatorSelectButtonBottom*/,AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
		oItems := oExContextMenu:Items()
			oItems:Padding := "4,4,4,4"
			oItems:Add("Button"):ShowAsButton := 3/*exShowAsButtonAutoSize+exShowAsButton*/
			oitem := oItems:Add("")
				oitem:Enabled := .F.
				oitem:ItemHeight := 4
			oitem1 := oItems:Add("Button",2)
				oitem1:ShowAsButton := 275/*exShowAsSelectButtonBottom+exShowAsButtonAutoSize*/
				oItems1 := oitem1:Items()
					oItems1:Add("Item 1")
					oItems1:Add("Item 2")
					oItems1:Add("Item 3")
			oitem2 := oItems:Add("")
				oitem2:Enabled := .F.
				oitem2:ItemHeight := 4
			oitem3 := oItems:Add("Button",2)
				oitem3:ShowAsButton := 19/*exShowAsSelectButton+exShowAsButtonAutoSize*/
				oItems2 := oitem3:Items()
					oItems2:Add("Item 1")
					oItems2:Add("Item 2")
					oItems2:Add("Item 3")
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
142
I've seen that the width of the tooltip is variable. Can I make it larger

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:ToolTipWidth := 328
		oItems := oExContextMenu:Items()
			oItems:Add("Item"):Tooltip := "this is a bit of text to be shown when cursor hovers it"
			oItems:Add("Item"):Tooltip := "this is a bit of text to be shown when cursor hovers it"
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
141
How do I disable showing the tooltip for all control (method 1)
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:ToolTipDelay := 0
		oItems := oExContextMenu:Items()
			oItems:Add("Item"):Tooltip := "this is a bit of text to be shown when cursor hovers it"
			oItems:Add("Item"):Tooltip := "this is a bit of text to be shown when cursor hovers it"
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
140
How do I let the tooltip being displayed longer

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:ToolTipPopDelay := 10000
		oItems := oExContextMenu:Items()
			oItems:Add("Item"):Tooltip := "this is a bit of text to be shown when cursor hovers it"
			oItems:Add("Item"):Tooltip := "this is a bit of text to be shown when cursor hovers it"
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
139
How do I show the tooltip quicker

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:ToolTipDelay := 1
		oItems := oExContextMenu:Items()
			oItems:Add("Item"):Tooltip := "this is a bit of text to be shown when cursor hovers it"
			oItems:Add("Item"):Tooltip := "this is a bit of text to be shown when cursor hovers it"
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
138
How can I get the version of the control I am running
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		DevOut( oExContextMenu:Version() )

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
137
How can I align the picture on the control's background
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:Picture := oExContextMenu:ExecuteTemplate("loadpicture(`c:\exontrol\images\card.png`)")
		oExContextMenu:PictureDisplay := 2/*UpperRight*/
		oItems := oExContextMenu:Items()
			oItems:Add("Item")
			oItems:Add("Item")
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
136
Is it possible to place a picture on the control's background
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:Picture := oExContextMenu:ExecuteTemplate("loadpicture(`c:\exontrol\images\card.png`)")
		oItems := oExContextMenu:Items()
			oItems:Add("Item")
			oItems:Add("Item")
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
135
How can I display the item using a different font/size

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oItems := oExContextMenu:Items()
			oItems:Add(""):Caption := "<font ;14>This is a bit of text"
			oItems:Add("<font ;6>This is a bit of text")
			oItems:Add(""):Caption := "<font Times New Roman;22>This is a bit of text</font>. Default"
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
134
How can I use the Event event, available for /COM version

PROCEDURE OnEvent(oExContextMenu,EventID)
	DevOut( "Event" )
	DevOut( Transform(oExContextMenu:EventParam(-2),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oitem
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:Event := {|EventID| OnEvent(oExContextMenu,EventID)} /*Notifies the application once the control fires an event.*/

		oItems := oExContextMenu:Items()
			oItems:Add("Check"):Check := .T.
			oitem := oItems:Add("Slider")
				oitem:AllowEdit := 3/*exItemEditSlider*/
				oitem:EditWidth := 128
				oitem:EditBorder := 0/*exEditBorderNone*/
				oitem:EditValue := 25
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
133
Is it possible to get notified once the user edits the field, or change the slider value

PROCEDURE OnEditChange(oExContextMenu,Itm)
	DevOut( "EditChange event on Itm object" )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oitem
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:EditChange := {|Itm| OnEditChange(oExContextMenu,Itm)} /*Occurs when the user alters the item's text box field.*/

		oItems := oExContextMenu:Items()
			oitem := oItems:Add("Item")
				oitem:AllowEdit := 3/*exItemEditSlider*/
				oitem:EditWidth := 128
				oitem:EditBorder := 0/*exEditBorderNone*/
				oitem:EditValue := 25
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
132
How do I get notified once I uncheck an item
PROCEDURE OnUncheckItem(oExContextMenu,Itm)
	DevOut( "UncheckItem event on Itm object" )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:UncheckItem := {|Itm| OnUncheckItem(oExContextMenu,Itm)} /*Occurs when the user unchecks the item.*/

		oItems := oExContextMenu:Items()
			oItems:Add("Item"):Check := .T.
			oItems:Add("Item"):Check := .T.
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
131
How do I get notified once I check an item
PROCEDURE OnCheckItem(oExContextMenu,Itm)
	DevOut( "CheckItem event on Itm object" )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:CheckItem := {|Itm| OnCheckItem(oExContextMenu,Itm)} /*Occurs when the user checks the item.*/

		oItems := oExContextMenu:Items()
			oItems:Add("Item"):Check := .T.
			oItems:Add("Item"):Check := .T.
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
130
How do I get notified once I click/select an item
PROCEDURE OnSelectItem(oExContextMenu,Itm)
	DevOut( "SelectItem event on Itm object" )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:SelectItem := {|Itm| OnSelectItem(oExContextMenu,Itm)} /*Occurs when the user selects the item.*/

		oItems := oExContextMenu:Items()
			oItems:Add("Item")
			oItems:Add("Item")
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
129
Does your control support padding for items

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oitem
	LOCAL oItems,oItems1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:MenuAppearance := 0/*exMenuNormal*/
		oItems := oExContextMenu:Items()
			oItems:Padding := "2,12,2,2"
			oitem := oItems:Add("",2)
				oitem:GroupPopup := 3/*exNoGroupPopupFrame+exGroupPopup*/
				oItems1 := oitem:Items()
					oItems1:Add("Item 1")
					oItems1:Add("Item 2")
					oItems1:Add("Item 3")
			oItems:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
			oItems:BackgroundExt := "root[pattern=0x000,frame=RGB(128,128,128)](top[2],top[10,text=`<font ;6><fgcolor 808080> group </font></fgcolor>`,align=0x11])"
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
128
How can I change the visual appearance for items, when cursor hovers it (hot,EBN)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oitem
	LOCAL oItems,oItems1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oItems := oExContextMenu:Items()
			oitem := oItems:Add("",2)
				oitem:GroupPopup := 3/*exNoGroupPopupFrame+exGroupPopup*/
				oItems1 := oitem:Items()
					oItems1:SetProperty("HotBackColor",0x1000000)
					oItems1:Padding := "4,8,4,8"
					oItems1:Add("Item 1")
					oItems1:Add("Item 2")
					oItems1:Add("Item 3")
			oItems:Add(""):ToString := "[group=0x03][itemspad=4,8,4,8][itemsbghot=0x1000000](Item 1,Item 2,Item 3)"
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
127
How can I change the background color for items, when cursor hovers it (hot)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oitem
	LOCAL oItems,oItems1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oItems := oExContextMenu:Items()
			oitem := oItems:Add("",2)
				oitem:GroupPopup := 3/*exNoGroupPopupFrame+exGroupPopup*/
				oItems1 := oitem:Items()
					oItems1:SetProperty("HotBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
					oItems1:Padding := "0,8,0,8"
					oItems1:Add("Item 1")
					oItems1:Add("Item 2")
					oItems1:Add("Item 3")
			oItems:Add(""):ToString := "[group=0x03][itemspad=0,8,0,8][itemsbghot=RGB(255,0,0)](Item 1,Item 2,Item 3)"
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
126
How can I change the visual appearance for items (EBN)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oitem
	LOCAL oItems,oItems1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oItems := oExContextMenu:Items()
			oitem := oItems:Add("",2)
				oitem:GroupPopup := 3/*exNoGroupPopupFrame+exGroupPopup*/
				oItems1 := oitem:Items()
					oItems1:SetProperty("BackColor",0x1000000)
					oItems1:Padding := "4,8,4,8"
					oItems1:Add("Item 1")
					oItems1:Add("Item 2")
					oItems1:Add("Item 3")
			oItems:Add(""):ToString := "[group=0x03][itemspad=4,8,4,8][itemsbg=0x1000000](Item 1,Item 2,Item 3)"
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
125
How can I change the background color for items

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oitem
	LOCAL oItems,oItems1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oItems := oExContextMenu:Items()
			oitem := oItems:Add("",2)
				oitem:GroupPopup := 3/*exNoGroupPopupFrame+exGroupPopup*/
				oItems1 := oitem:Items()
					oItems1:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
					oItems1:Padding := "0,8,0,8"
					oItems1:Add("Item 1")
					oItems1:Add("Item 2")
					oItems1:Add("Item 3")
			oItems:Add(""):ToString := "[group=0x03][itemspad=0,8,0,8][itemsbg=RGB(255,0,0)](Item 1,Item 2,Item 3)"
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
124
How do I hide the left gray portion to be shown on the drop down menu/popup (method 2)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oItems,oItems1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:FlatImageWidth := 0
		oItems := oExContextMenu:Items()
			oItems1 := oItems:Add("Popup",2):Items()
				oItems1:Add("Item 1")
				oItems1:Add("Item 2")
				oItems1:Add("Item 3")
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
123
How do I hide the left gray portion to be shown on the drop down menu/popup (method 1)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oItems,oItems1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:MenuAppearance := 0/*exMenuNormal*/
		oItems := oExContextMenu:Items()
			oItems1 := oItems:Add("Popup",2):Items()
				oItems1:Add("Item 1")
				oItems1:Add("Item 2")
				oItems1:Add("Item 3")
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
122
How can I arrange the drop down item from left to right, rather than top to bottom

PROCEDURE OnSelectItem(oExContextMenu,Itm)
	DevOut( "Clicked" )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oitem,oitem1
	LOCAL oItems,oItems1,oItems2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:SelectItem := {|Itm| OnSelectItem(oExContextMenu,Itm)} /*Occurs when the user selects the item.*/

		oExContextMenu:MenuAppearance := 0/*exMenuNormal*/
		oItems := oExContextMenu:Items()
			oitem := oItems:Add("Button",2)
				oitem:ShowAsButton := 275/*exShowAsSelectButtonBottom+exShowAsButtonAutoSize*/
				oItems1 := oitem:Items()
					oitem1 := oItems1:Add("",2)
						oitem1:GroupPopup := 3/*exNoGroupPopupFrame+exGroupPopup*/
						oItems2 := oitem1:Items()
							oItems2:Add("Item 1")
							oItems2:Add("Item 2")
							oItems2:Add("Item 3")
			oItems:Add(""):ToString := "Button[button=0x0113][popupapp=6]([group=0x03](Item 1,Item 2,Item 3))"
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
121
How can I add a drop down button / combobox (method 2)

PROCEDURE OnSelectItem(oExContextMenu,Itm)
	DevOut( "Clicked" )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oitem
	LOCAL oItems,oItems1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:SelectItem := {|Itm| OnSelectItem(oExContextMenu,Itm)} /*Occurs when the user selects the item.*/

		oItems := oExContextMenu:Items()
			oitem := oItems:Add("Button",2)
				oitem:ShowAsButton := 275/*exShowAsSelectButtonBottom+exShowAsButtonAutoSize*/
				oItems1 := oitem:Items()
					oItems1:Add("Item 1")
					oItems1:Add("Item 2")
					oItems1:Add("Item 3")
			oItems:Add(""):ToString := "Button[button=275][popupapp=6](Item 1[id=20],Item 2[id=30],Item 3[id=40])"
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
120
How can I add a drop down button / combobox (method 1)

PROCEDURE OnSelectItem(oExContextMenu,Itm)
	DevOut( "Clicked" )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oitem
	LOCAL oItems,oItems1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:SelectItem := {|Itm| OnSelectItem(oExContextMenu,Itm)} /*Occurs when the user selects the item.*/

		oItems := oExContextMenu:Items()
			oitem := oItems:Add("Button",2)
				oitem:ShowAsButton := 19/*exShowAsSelectButton+exShowAsButtonAutoSize*/
				oItems1 := oitem:Items()
					oItems1:Add("Item 1")
					oItems1:Add("Item 2")
					oItems1:Add("Item 3")
			oItems:Add(""):ToString := "Button[button=0x13][popupapp=6](Item 1[id=20],Item 2[id=30],Item 3[id=40])"
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
119
I am using exShowAsSelectButton/exShowAsSelectButtonBottom but none of them works. What could be wrong

PROCEDURE OnSelectItem(oExContextMenu,Itm)
	DevOut( "Clicked" )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oitem
	LOCAL oItems,oItems1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:SelectItem := {|Itm| OnSelectItem(oExContextMenu,Itm)} /*Occurs when the user selects the item.*/

		oItems := oExContextMenu:Items()
			oitem := oItems:Add("Button",2)
				oitem:ShowAsButton := 19/*exShowAsSelectButton+exShowAsButtonAutoSize*/
				oItems1 := oitem:Items()
					oItems1:Add("Item 1")
					oItems1:Add("Item 2")
					oItems1:Add("Item 3")
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
118
How can I add a button (push button)

PROCEDURE OnSelectItem(oExContextMenu,Itm)
	DevOut( "Clicked" )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oExContextMenu:SelectItem := {|Itm| OnSelectItem(oExContextMenu,Itm)} /*Occurs when the user selects the item.*/

		oItems := oExContextMenu:Items()
			oItems:Add("Button"):ShowAsButton := 3/*exShowAsButtonAutoSize+exShowAsButton*/
			oItems:Add(""):ToString := "Button[button=0x03]"
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
117
How can I display grouping items with no frame arround

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oitem
	LOCAL oItems,oItems1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oItems := oExContextMenu:Items()
			oitem := oItems:Add("Horizontal Group",2)
				oitem:GroupPopup := 243/*exGroupPopupFrameThickBox+exGroupPopupFrameSolidBox+exGroupPopupEqualHeight+exGroupPopupEqualWidth+exNoGroupPopupFrame+exGroupPopup*/
				oItems1 := oitem:Items()
					oItems1:Add("A"):Alignment := 1/*exCenter*/
					oItems1:Add("BC"):Alignment := 1/*exCenter*/
					oItems1:Add("D"):Alignment := 1/*exCenter*/
			oItems:Add(""):ToString := "Horizontal Group[group=243](A[id=20][align=1],BC[id=30][align=1],D[id=40][align=1])"
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
116
How can I display grouping items of the same size/width/height

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oitem
	LOCAL oItems,oItems1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oItems := oExContextMenu:Items()
			oitem := oItems:Add("Horizontal Group",2)
				oitem:GroupPopup := 241/*exGroupPopupFrameThickBox+exGroupPopupFrameSolidBox+exGroupPopupEqualHeight+exGroupPopupEqualWidth+exGroupPopup*/
				oItems1 := oitem:Items()
					oItems1:Add("A"):Alignment := 1/*exCenter*/
					oItems1:Add("BC"):Alignment := 1/*exCenter*/
					oItems1:Add("D"):Alignment := 1/*exCenter*/
			oItems:Add(""):ToString := "Horizontal Group[group=0xF1](A[id=20][align=1],BC[id=30][align=1],D[id=40][align=1])"
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
115
Is it possible to display a ticker frame arround grouping items

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oitem
	LOCAL oItems,oItems1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oItems := oExContextMenu:Items()
			oitem := oItems:Add("Horizontal Group",2)
				oitem:GroupPopup := 193/*exGroupPopupFrameThickBox+exGroupPopupFrameSolidBox+exGroupPopup*/
				oItems1 := oitem:Items()
					oItems1:Add("Item 1")
					oItems1:Add("Item 2")
					oItems1:Add("Item 3")
			oItems:Add(""):ToString := "Horizontal Group[group=193](Item 1[id=20],Item 2[id=30],Item 3[id=40])"
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
114
How do I display items horizontally arranged

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oitem
	LOCAL oItems,oItems1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oItems := oExContextMenu:Items()
			oitem := oItems:Add("Horizontal Group",2)
				oitem:GroupPopup := 1/*exGroupPopup*/
				oItems1 := oitem:Items()
					oItems1:Add("Item 1")
					oItems1:Add("Item 2")
					oItems1:Add("Item 3")
			oItems:Add(""):ToString := "Horizontal Group[group=0x01](Item 1[id=20],Item 2[id=30],Item 3[id=40])"
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
113
Is it possible to expand an item when it is clicked (tree,group,vertical)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oitem,oitem1
	LOCAL oItems,oItems1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oItems := oExContextMenu:Items()
			oitem := oItems:Add("Expand",2)
				oitem:GroupPopup := 259/*exGroupPopupVertical+exNoGroupPopupFrame+exGroupPopup*/
				oitem:Check := .T.
				oitem:ShowPopupOnChecked := .T.
				oItems1 := oitem:Items()
					oItems1:Padding := "22,0,0,0"
					oItems1:Add("Radio 1"):Radio := .T.
					oItems1:Add("Radio 2"):Radio := .T.
					oitem1 := oItems1:Add("Radio 3")
						oitem1:Radio := .T.
						oitem1:Checked := .T.
				oitem:Checked := .T.
			oItems:Add(""):ToString := "Expand[typ=1][chk=1][spchk=-1][group=0x0103][itemspad=22,0,0,0](Radio 1[id=20][typ=2],Radio 2[id=30][typ=2],Radio 3[id=40][typ=2][chk=1])"
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
112
Is it possible to expand an item when it is clicked (tree,group,vertical)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oitem,oitem1
	LOCAL oItems,oItems1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oItems := oExContextMenu:Items()
			oitem := oItems:Add("Expand",2)
				oitem:GroupPopup := 259/*exGroupPopupVertical+exNoGroupPopupFrame+exGroupPopup*/
				oitem:Check := .T.
				oitem:ShowPopupOnChecked := .T.
				oItems1 := oitem:Items()
					oItems1:Padding := "22,0,0,0"
					oItems1:Add("Radio 1"):Radio := .T.
					oItems1:Add("Radio 2"):Radio := .T.
					oitem1 := oItems1:Add("Radio 3")
						oitem1:Radio := .T.
						oitem1:Checked := .T.
				oitem:Checked := .T.
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
111
Is it possible to expand an item when it is clicked (group)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oitem
	LOCAL oItems,oItems1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oItems := oExContextMenu:Items()
			oitem := oItems:Add("Expand",2)
				oitem:GroupPopup := 1/*exGroupPopup*/
				oitem:ItemHeight := 24
				oitem:Check := .T.
				oitem:ShowPopupOnChecked := .T.
				oItems1 := oitem:Items()
					oItems1:Add("Item 1")
					oItems1:Add("Item 2")
					oItems1:Add("Item 3")
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
110
Is it possible to extend an item when it is clicked

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oitem
	LOCAL oItems,oItems1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oItems := oExContextMenu:Items()
			oitem := oItems:Add("Expand",2)
				oitem:Check := .T.
				oitem:ShowPopupOnChecked := .T.
				oItems1 := oitem:Items()
					oItems1:Add("Item 1")
					oItems1:Add("Item 2")
					oItems1:Add("Item 3")
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
109
Does your control implement padding for item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oItems := oExContextMenu:Items()
			oItems:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 250,250,250 } )  , .F. ))
			oItems:Add("Item"):Padding := "4,4,4,4"
			oItems:Add(""):ToString := "Item[pad=4,4,4,4]"
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
108
How can I add an empty item for a horizontal group

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oitem,oitem1,oitem2
	LOCAL oItems,oItems1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oItems := oExContextMenu:Items()
			oitem := oItems:Add("",2)
				oitem:GroupPopup := 3/*exNoGroupPopupFrame+exGroupPopup*/
				oItems1 := oitem:Items()
					oItems1:Add("Item 1")
					oitem1 := oItems1:Add("",2)
						oitem1:GroupPopup := 5/*exGroupPopupCenter+exGroupPopup*/
						oitem1:ItemHeight := 12
						oitem2 := oitem1:Items():Add("")
							oitem2:Enabled := .F.
							oitem2:ItemHeight := 8
							oitem2:CaptionWidth := 8
					oItems1:Add("Item 2")
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
107
How can I add an empty/separator item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oitem
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oItems := oExContextMenu:Items()
			oItems:Add("Item")
			oitem := oItems:Add("")
				oitem:Enabled := .F.
				oitem:ItemHeight := 2
				oitem:CaptionWidth := 8
				oitem:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
			oItems:Add("Item")
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
106
How can I add an empty/frame item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oitem,oitem1
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oItems := oExContextMenu:Items()
			oItems:Add("Item 1")
			oitem := oItems:Add("",2)
				oitem:GroupPopup := 5/*exGroupPopupCenter+exGroupPopup*/
				oitem:ItemHeight := 12
				oitem1 := oitem:Items():Add("")
					oitem1:Enabled := .F.
					oitem1:ItemHeight := 8
					oitem1:CaptionWidth := 8
			oItems:Add("Item 2")
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
105
How can I specify the height of the item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oItems := oExContextMenu:Items()
			oItems:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 250,250,250 } )  , .F. ))
			oItems:Add("Item"):ItemHeight := 64
			oItems:Add(""):ToString := "Item[height=64]"
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
104
How can I specify the width of the item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oItems := oExContextMenu:Items()
			oItems:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 250,250,250 } )  , .F. ))
			oItems:Add("Item"):CaptionWidth := 128
			oItems:Add(""):ToString := "Item[captionwidth=128]"
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
103
How do I align the item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oitem,oitem1
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oItems := oExContextMenu:Items()
			oItems:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 250,250,250 } )  , .F. ))
			oItems:Add("Item")
			oitem := oItems:Add("Item")
				oitem:Alignment := 1/*exCenter*/
				oitem:CaptionWidth := 128
			oitem1 := oItems:Add("Item")
				oitem1:Alignment := 2/*exRight*/
				oitem1:CaptionWidth := 128
			oItems:Add(""):ToString := "Item[align=1]"
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
102
How can I underline the item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oItems := oExContextMenu:Items()
			oItems:Add("Item"):Underline := .T.
			oItems:Add("<u>Item</u>")
			oItems:Add(""):ToString := "Item[und]"
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
101
How can I show the item as strikeout

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oExContextMenu
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oExContextMenu := XbpActiveXControl():new( oForm:drawingArea )
	oExContextMenu:CLSID  := "Exontrol.ContextMenu.1" /*{2DFBF6CB-9198-4576-AB91-EE6445C1F3E0}*/
	oExContextMenu:create(,, {10,60},{610,370} )

		oItems := oExContextMenu:Items()
			oItems:Add("Item"):Strikeout := .T.
			oItems:Add("<s>Item</s>")
			oItems:Add(""):ToString := "Item[stk]"
		oExContextMenu:Select()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN