Bonjour,
Je cherche actuellement a afficher un popup menu, d' unefacon simple, sur événement de clik droit sur la fenetre;
code :
// fonction clik droit
void Projet1Frm::Projet1FrmRightUP(wxMouseEvent& event)
{
WxPopupMenu1 = new wxMenu(wxT("") );
wxMenu *ID_MNU_MENUPOPUP_Obj = new wxMenu(0);
ID_MNU_MENUPOPUP_Obj->Append(ID_MNU_TELECHARGERSURLESERVEUR, wxT ("Telecharger sur le serveur"), wxT(""), wxITEM_NORMAL);
this->PopupMenu(WxPopupMenu1, 10, 10);//bon, je recupere pas encore la pos souris mais bon,ca change rien je pense;
}
voila bah, je creer un menu, puis je balance la fonction qui est censée afficher un menu de facon"popup":
wxWindow::PopupMenu
bool PopupMenu(wxMenu* menu, const wxPoint& pos)
bool PopupMenu(wxMenu* menu, int x, int y)
Pops up the given menu at the specified coordinates, relative to this window, and returns control when the user has dismissed the menu. If a menu item is selected, the corresponding menu event is generated and will be processed as usually.
bizarr, rien ne s'affiche; ma fonction marche car j' ai fait des tests avec des messages bx;
Merci pour votre aide;