fn hook_background_color(&mut self, c: [u8; 3]) {
        use crate::bind_raw_event_handler_inner;
        use winapi::um::winuser::{WM_CTLCOLORSTATIC};
        use winapi::shared::{basetsd::UINT_PTR, windef::HWND, minwindef::LRESULT};
        use winapi::um::wingdi::{CreateSolidBrush, RGB};

        if self.handle.blank() { panic!("{}", NOT_BOUND); }
        let handle = self.handle.hwnd().expect(BAD_HANDLE);

        let parent_handle = ControlHandle::Hwnd(wh::get_window_parent(handle));
        
        let brush = unsafe { CreateSolidBrush(RGB(c[0], c[1], c[2])) };
        self.background_brush = Some(brush);
        
        let handler = bind_raw_event_handler_inner(&parent_handle, handle as UINT_PTR, move |_hwnd, msg, _w, l| {
            match msg {
                WM_CTLCOLORSTATIC => {
                    let child = l as HWND;
                    if child == handle {
                        return Some(brush as LRESULT);
                    }
                },
                _ => {}
            }

            None
        });

        *self.handler0.borrow_mut() = Some(handler.unwrap());
    }
/// Change the checkbox background color.
Change the checkbox background color.
Change the checkbox background color .
fn hook_background_color(&mut self, c: [u8; 3]) {
        use crate::bind_raw_event_handler_inner;
        use winapi::um::winuser::{WM_CTLCOLORSTATIC};
        use winapi::shared::{basetsd::UINT_PTR, windef::HWND, minwindef::LRESULT};
        use winapi::um::wingdi::{CreateSolidBrush, RGB};
        if self.handle.blank() { panic!("{}", NOT_BOUND); }
        let handle = self.handle.hwnd().expect(BAD_HANDLE);
        let parent_handle = ControlHandle::Hwnd(wh::get_window_parent(handle));
        let brush = unsafe { CreateSolidBrush(RGB(c[0], c[1], c[2])) };
        self.background_brush = Some(brush);
        let handler = bind_raw_event_handler_inner(&parent_handle, handle as UINT_PTR, move |_hwnd, msg, _w, l| {
            match msg {
                WM_CTLCOLORSTATIC => {
                    let child = l as HWND;
                    if child == handle {
                        return Some(brush as LRESULT);
                    }
                },
                _ => {}
            }
            None
        });
        *self.handler0.borrow_mut() = Some(handler.unwrap());
    }
fn hook_background_color ( & mut self , c : [ u8 ; 3 ] ) { use crate :: bind_raw_event_handler_inner ; use winapi :: um :: winuser :: { WM_CTLCOLORSTATIC } ; use winapi :: shared :: { basetsd :: UINT_PTR , windef :: HWND , minwindef :: LRESULT } ; use winapi :: um :: wingdi :: { CreateSolidBrush , RGB } ; if self . handle . blank ( ) { panic ! ( " " NOT_BOUND ) ; } let handle = self . handle . hwnd ( ) . expect ( BAD_HANDLE ) ; let parent_handle = ControlHandle :: Hwnd ( wh :: get_window_parent ( handle ) ) ; let brush = unsafe { CreateSolidBrush ( RGB ( c [ 0 ] , c [ 1 ] , c [ 2 ] ) ) } ; self . background_brush = Some ( brush ) ; let handler = bind_raw_event_handler_inner ( & parent_handle , handle as UINT_PTR , move | _hwnd , msg , _w , l | { match msg { WM_CTLCOLORSTATIC => { let child = l as HWND ; if child == handle { return Some ( brush as LRESULT ) ; } } , _ => { } } None } ) ; * self . handler0 . borrow_mut ( ) = Some ( handler . unwrap ( ) ) ; }
Change the checkbox background color.
Change the checkbox background color .
&mut self
c
[u8; 3]