pub fn selection_string(&self) -> Option<String> {
        use winapi::um::winuser::{LB_GETCURSEL, LB_GETTEXTLEN, LB_GETTEXT, LB_ERR};
        use winapi::shared::ntdef::WCHAR;

        let handle = check_hwnd(&self.handle, NOT_BOUND, BAD_HANDLE);
        let index = wh::send_message(handle, LB_GETCURSEL, 0, 0);

        if index == LB_ERR { None }
        else {
            let index = index as usize;
            let length = (wh::send_message(handle, LB_GETTEXTLEN, index, 0) as usize) + 1;  // +1 for the terminating null character
            let mut buffer: Vec<WCHAR> = Vec::with_capacity(length);
            unsafe { 
                buffer.set_len(length); 
                wh::send_message(handle, LB_GETTEXT, index, mem::transmute(buffer.as_ptr()));
            }

            Some(from_utf16(&buffer))
        }
    }
/// Return the display value of the currenctly selected item for single value
/// Return `None` if no item is selected. This reads the visual value.
Return the display value of the currenctly selected item for single value
Return `None` if no item is selected. This reads the visual value.
Return the display value of the currenctly selected item for single value Return ` None ` if no item is selected . This reads the visual value .
pub fn selection_string(&self) -> Option<String> {
        use winapi::um::winuser::{LB_GETCURSEL, LB_GETTEXTLEN, LB_GETTEXT, LB_ERR};
        use winapi::shared::ntdef::WCHAR;
        let handle = check_hwnd(&self.handle, NOT_BOUND, BAD_HANDLE);
        let index = wh::send_message(handle, LB_GETCURSEL, 0, 0);
        if index == LB_ERR { None }
        else {
            let index = index as usize;
            let length = (wh::send_message(handle, LB_GETTEXTLEN, index, 0) as usize) + 1;  // +1 for the terminating null character
            let mut buffer: Vec<WCHAR> = Vec::with_capacity(length);
            unsafe { 
                buffer.set_len(length); 
                wh::send_message(handle, LB_GETTEXT, index, mem::transmute(buffer.as_ptr()));
            }
            Some(from_utf16(&buffer))
        }
    }
pub fn selection_string ( & self ) -> Option < String > { use winapi :: um :: winuser :: { LB_GETCURSEL , LB_GETTEXTLEN , LB_GETTEXT , LB_ERR } ; use winapi :: shared :: ntdef :: WCHAR ; let handle = check_hwnd ( & self . handle , NOT_BOUND , BAD_HANDLE ) ; let index = wh :: send_message ( handle , LB_GETCURSEL , 0 , 0 ) ; if index == LB_ERR { None } else { let index = index as usize ; let length = ( wh :: send_message ( handle , LB_GETTEXTLEN , index , 0 ) as usize ) + 1 ; // +1 for the terminating null character let mut buffer : Vec < WCHAR > = Vec :: with_capacity ( length ) ; unsafe { buffer . set_len ( length ) ; wh :: send_message ( handle , LB_GETTEXT , index , mem :: transmute ( buffer . as_ptr ( ) ) ) ; } Some ( from_utf16 ( & buffer ) ) } }
Return the display value of the currenctly selected item for single value
Return `None` if no item is selected.
Return the display value of the currenctly selected item for single value Return ` None ` if no item is selected .
&self