pub fn wm_command_accel_menu<F>(&self, ctrl_id: u16, func: F)
		where F: Fn() -> ErrResult<()> + 'static,
	{
		let shared_func = Rc::new(VeryUnsafeCell::new(func));

		self.wm_command(co::CMD::Menu, ctrl_id, {
			let shared_func = shared_func.clone();
			move || shared_func()
		});

		self.wm_command(co::CMD::Accelerator, ctrl_id, {
			let shared_func = shared_func.clone();
			move || shared_func()
		});
	}
/// [`WM_COMMAND`](https://docs.microsoft.com/en-us/windows/win32/menurc/wm-command)
/// message, handling both `CMD::Accelerator` and `CMD::Menu`, for a
/// specific command ID.
///
/// Ideal to be used with menu commands whose IDs are shared with
/// accelerators.



Ideal to be used with menu commands whose IDs are shared with
accelerators.
Ideal to be used with menu commands whose IDs are shared with accelerators .
pub fn wm_command_accel_menu<F>(&self, ctrl_id: u16, func: F)
		where F: Fn() -> ErrResult<()> + 'static,
	{
		let shared_func = Rc::new(VeryUnsafeCell::new(func));
		self.wm_command(co::CMD::Menu, ctrl_id, {
			let shared_func = shared_func.clone();
			move || shared_func()
		});
		self.wm_command(co::CMD::Accelerator, ctrl_id, {
			let shared_func = shared_func.clone();
			move || shared_func()
		});
	}
pub fn wm_command_accel_menu < F > ( & self , ctrl_id : u16 , func : F ) where F : Fn ( ) -> ErrResult < ( ) > + ' static , { let shared_func = Rc :: new ( VeryUnsafeCell :: new ( func ) ) ; self . wm_command ( co :: CMD :: Menu , ctrl_id , { let shared_func = shared_func . clone ( ) ; move | | shared_func ( ) } ) ; self . wm_command ( co :: CMD :: Accelerator , ctrl_id , { let shared_func = shared_func . clone ( ) ; move | | shared_func ( ) } ) ; }
[`WM_COMMAND`](https://docs.microsoft.com/en-us/windows/win32/menurc/wm-command)
message, handling both `CMD::Accelerator` and `CMD::Menu`, for a
specific command ID.
[ ` WM_COMMAND ` ] ( https : // docs . microsoft . com / en - us / windows / win32 / menurc / wm - command ) message handling both ` CMD :: Accelerator ` and ` CMD :: Menu ` for a specific command ID .
&self
ctrl_id
u16
func
F
&self
ctrl_id
u16
func
F