Right. I've even added these macros to explicity invoke the VC menu via button bar (you could add this as button+command):
_command void usr_vc_menu_button () name_info (','VSARG2_MARK|VSARG2_READ_ONLY|VSARG2_REQUIRES_EDITORCTL|VSARG2_ICON|VSARG2_NOEXIT_SCROLL)
{
if ( p_window_id==HIDDEN_WINDOW_ID ) p_window_id=_mdi;
_macro_delete_line ();
// Find the submenu with caption matching submenu_pos
int menu_handle=find_index ("_ext_menu_default",oi2type (OI_MENU));
int vc_index=_menu_find_caption (menu_handle,"Version Control");
if ( vc_index )
{
menu_handle=p_active_form._menu_load (vc_index,'P');
// Put the menu right on the current mouse pointer location:
int x = 0, y = 0;
mou_get_xy (x, y);
int flags=VPM_CENTERALIGN|VPM_LEFTBUTTON;
_menu_show (menu_handle,flags,x,y);
_menu_destroy (menu_handle);
}
}
or via shortcut NEXT TO the text cursor:
_command void usr_vc_menu () name_info (','VSARG2_MARK|VSARG2_READ_ONLY|VSARG2_REQUIRES_EDITORCTL|VSARG2_ICON|VSARG2_NOEXIT_SCROLL)
{
if ( p_window_id==HIDDEN_WINDOW_ID ) p_window_id=_mdi;
_macro_delete_line ();
// Find the submenu with caption matching submenu_pos
int menu_handle=find_index ("_ext_menu_default",oi2type (OI_MENU));
int vc_index=_menu_find_caption (menu_handle,"Version Control");
if ( vc_index )
{
menu_handle=p_active_form._menu_load (vc_index,'P');
// Put the menu right on the current mouse pointer location:
int x=0, y=0;
_map_xy (p_window_id,0,x,y);
x+=p_cursor_x + p_font_width;
y+=p_cursor_y + p_font_height;
int flags=VPM_LEFTALIGN|VPM_LEFTBUTTON;
_menu_show (menu_handle,flags,x,y);
_menu_destroy (menu_handle);
}
}
Good luck,
HS2