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§fn convert_ret(&self, v: isize) -> Self::RetType
fn convert_ret(&self, v: isize) -> Self::RetType
Converts the generic
isize
return value to the specific type returned
by the message.source§fn as_generic_wm(&mut self) -> WndMsg
fn as_generic_wm(&mut self) -> WndMsg
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>
source§fn from_generic_wm(p: WndMsg) -> Self
fn from_generic_wm(p: WndMsg) -> Self
Converts the generic
WndMsg
parameters struct
into the specific message struct.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