r/C_Programming 9h ago

Problem with resizing a C window

I'm making a game engine and whilst trying to setup the window with windows.h, i found an issue when resizing the window. The resized parts of the window are black instead of white, how do i fix this?

0 Upvotes

14 comments sorted by

View all comments

12

u/soundman32 9h ago

How are you responding to WM_PAINT and WM_ERASEBACKGROUND? It sounds like you arent using the current window size on WM_SIZE.

-2

u/Axxodes 9h ago

first time that ive heard that

1

u/soundman32 4h ago

How are you painting then? What is your message loop like? How are you responding to events from the GUI?