diff --git a/book_src/opening_a_window/win32.md b/book_src/opening_a_window/win32.md index 5390e23..786b755 100644 --- a/book_src/opening_a_window/win32.md +++ b/book_src/opening_a_window/win32.md @@ -1406,6 +1406,15 @@ pub unsafe extern "system" fn window_procedure( } ``` +And update our window class to use `window_procedure`: +```rust +fn main() { + // ... + wc.lpfnWndProc = Some(window_procedure); + // ... +} +``` + Window looks the same as before, but if we fiddle with the brush value we can see it'll draw using other colors. Doesn't seem to fix the mouse though. @@ -1458,7 +1467,6 @@ And we check for them in our window procedure: match Msg { WM_NCCREATE => { println!("NC Create"); - return 1; } WM_CREATE => println!("Create"), ```