/// Fills `WNDCLASSEX` with the given values, and generates a class name as
/// a hash of all fields.

Fills `WNDCLASSEX` with the given values, and generates a class name as
a hash of all fields.
Fills ` WNDCLASSEX ` with the given values and generates a class name as a hash of all fields .
pub(in crate::gui) fn fill_wndclassex<'a>(
		hinst: HINSTANCE,
		class_style: co::CS,
		class_icon: &Icon, class_icon_sm: &Icon,
		class_bg_brush: &Brush,
		class_cursor: &Cursor,
		wcx: &mut WNDCLASSEX<'a>,
		class_name_buf: &'a mut WString)
	{
		wcx.lpfnWndProc = Some(Self::window_proc);
		wcx.hInstance = hinst;
		wcx.style = class_style;
		wcx.hIcon = class_icon.as_hicon(hinst);
		wcx.hIconSm = class_icon_sm.as_hicon(hinst);
		wcx.hbrBackground = class_bg_brush.as_hbrush();
		wcx.hCursor = class_cursor.as_hcursor(hinst);
		if wcx.lpszClassName().is_none() { // an actual class name was not provided?
			*class_name_buf = WString::from_str(
				&format!(
					"WNDCLASS.{:#x}.{:#x}.{:#x}.{:#x}.{:#x}.{:#x}.{:#x}.{:#x}.{:#x}.{:#x}",
					wcx.style,
					wcx.lpfnWndProc.map_or(0, |p| p as usize),
					wcx.cbClsExtra, wcx.cbWndExtra,
					wcx.hInstance, wcx.hIcon, wcx.hCursor, wcx.hbrBackground,
					wcx.lpszMenuName(),
					wcx.hIconSm,
				),
			);
			wcx.set_lpszClassName(Some(class_name_buf));
		}
	}
pub ( in crate :: gui ) fn fill_wndclassex < ' a > ( hinst : HINSTANCE , class_style : co :: CS , class_icon : & Icon , class_icon_sm : & Icon , class_bg_brush : & Brush , class_cursor : & Cursor , wcx : & mut WNDCLASSEX < ' a > , class_name_buf : & ' a mut WString ) { wcx . lpfnWndProc = Some ( Self :: window_proc ) ; wcx . hInstance = hinst ; wcx . style = class_style ; wcx . hIcon = class_icon . as_hicon ( hinst ) ; wcx . hIconSm = class_icon_sm . as_hicon ( hinst ) ; wcx . hbrBackground = class_bg_brush . as_hbrush ( ) ; wcx . hCursor = class_cursor . as_hcursor ( hinst ) ; if wcx . lpszClassName ( ) . is_none ( ) { // an actual class name was not provided?
 * class_name_buf = WString :: from_str ( & format ! ( " " wcx style wcx lpfnWndProc map_or ( 0 p p as usize ) wcx cbClsExtra wcx cbWndExtra wcx hInstance wcx hIcon wcx hCursor wcx hbrBackground wcx lpszMenuName ( ) wcx hIconSm ) , ) ; wcx . set_lpszClassName ( Some ( class_name_buf ) ) ; } }
Fills `WNDCLASSEX` with the given values, and generates a class name as
a hash of all fields.
Fills ` WNDCLASSEX ` with the given values and generates a class name as a hash of all fields .
hinst
HINSTANCE
class_style
co::CS
class_icon
&Icon
class_icon_sm
&Icon
class_bg_brush
&Brush
class_cursor
&Cursor
wcx
&mut WNDCLASSEX<'a>
class_name_buf
&'a mut WString