Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Widgets - General questions or Mixed problems » Context menu in a embedded class?
Re: Context menu in a embedded class? [message #19535 is a reply to message #19528] Fri, 12 December 2008 11:26 Go to previous messageGo to previous message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
It depends on what type of Ctrl dbgrid1 is.

If it's ArrayCtrl then use the WhenBar callback
If it's GridCtrl then I'm not very familiar with it, but WhenMenuBar seems to be what you need.

Searching for 'Bar&' in a Ctrl's header file usually points you at the correct callback if it has one.

For a generic 'simple' Ctrl that doesn't have a callback you can use something like this template:
template <class T>
struct WithBar : public T 
{
	Callback1<Bar&> WhenBar;
	
	virtual void RightDown(Point p, dword keyflags) { MenuBar::Execute(WhenBar); }
};

[Updated on: Fri, 12 December 2008 11:26]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: win32 multiscreen / multimonitor problem fix
Next Topic: Printing with times new roman font?
Goto Forum:
  


Current Time: Thu Aug 07 21:22:54 CEST 2025

Total time taken to generate the page: 0.02931 seconds