Add ability to assign a menu when creating a window on Windows (#1842)
This commit is contained in:
parent
bd99eb1347
commit
b1d353180b
5 changed files with 27 additions and 3 deletions
|
|
@ -1,6 +1,6 @@
|
|||
#![cfg(target_os = "windows")]
|
||||
|
||||
use winapi::{self, shared::windef::HWND};
|
||||
use winapi::{self, shared::windef::HMENU, shared::windef::HWND};
|
||||
|
||||
pub use self::{
|
||||
event_loop::{EventLoop, EventLoopProxy, EventLoopWindowTarget},
|
||||
|
|
@ -18,6 +18,7 @@ use crate::window::Theme;
|
|||
#[derive(Clone)]
|
||||
pub struct PlatformSpecificWindowBuilderAttributes {
|
||||
pub parent: Option<HWND>,
|
||||
pub menu: Option<HMENU>,
|
||||
pub taskbar_icon: Option<Icon>,
|
||||
pub no_redirection_bitmap: bool,
|
||||
pub drag_and_drop: bool,
|
||||
|
|
@ -28,6 +29,7 @@ impl Default for PlatformSpecificWindowBuilderAttributes {
|
|||
fn default() -> Self {
|
||||
Self {
|
||||
parent: None,
|
||||
menu: None,
|
||||
taskbar_icon: None,
|
||||
no_redirection_bitmap: false,
|
||||
drag_and_drop: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue