child window creation improvement
This commit is contained in:
parent
5a09e8ba21
commit
2b25bf1480
4 changed files with 31 additions and 3 deletions
|
|
@ -4,6 +4,8 @@ use libc;
|
|||
use Window;
|
||||
use WindowBuilder;
|
||||
use window;
|
||||
use winapi;
|
||||
use platform;
|
||||
|
||||
/// Additional methods on `Window` that are specific to Windows.
|
||||
pub trait WindowExt {
|
||||
|
|
@ -35,3 +37,11 @@ impl WindowBuilderExt for WindowBuilder {
|
|||
self
|
||||
}
|
||||
}
|
||||
|
||||
impl WindowBuilderExt {
|
||||
/// Creates a new WindowProxy from a winapi::HWND
|
||||
#[inline]
|
||||
pub fn create_window_proxy_from_handle(handle: winapi::HWND) -> window::WindowProxy {
|
||||
window::WindowProxy::create_proxy(platform::WindowProxy{hwnd: handle})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue