pub struct GetText<'a> {
pub buffer: &'a mut [u16],
}
Available on crate feature
user
only.Expand description
WM_GETTEXT
message parameters.
Return type: u32
.
§Examples
use winsafe::{self as w, prelude::*, msg};
let hwnd: w::HWND; // initialized somewhere
let needed_len = unsafe { hwnd.SendMessage(msg::wm::GetTextLength {}) };
let mut buf = w::WString::new_alloc_buf(needed_len as _);
unsafe {
hwnd.SendMessage(
msg::wm::GetText {
buffer: buf.as_mut_slice(),
},
);
}
println!("Text: {}", buf.to_string());
Fields§
§buffer: &'a mut [u16]
Trait Implementations§
Source§impl<'a> MsgSend for GetText<'a>
impl<'a> MsgSend for GetText<'a>
Source§unsafe fn isize_to_ret(&self, v: isize) -> Self::RetType
unsafe fn isize_to_ret(&self, v: isize) -> Self::RetType
Unmarshaling method which converts the generic
isize
return value to
the specific type returned by the message. Read moreSource§fn as_generic_wm(&mut self) -> WndMsg
fn as_generic_wm(&mut self) -> WndMsg
Marshaling method which converts the specific message parameters struct
into the generic
WndMsg
message struct.Source§impl<'a> MsgSendRecv for GetText<'a>
impl<'a> MsgSendRecv for GetText<'a>
Auto Trait Implementations§
impl<'a> Freeze for GetText<'a>
impl<'a> RefUnwindSafe for GetText<'a>
impl<'a> Send for GetText<'a>
impl<'a> Sync for GetText<'a>
impl<'a> Unpin for GetText<'a>
impl<'a> !UnwindSafe for GetText<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more