Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Mansion

windowed mode and dx7

This topic is 6416 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

my app runs in windowed mode, and i blit one bitmap ... everything works, but then i create one dialog and when i open it it works as it should, but when i move it, there is a black trail where it previously was, if i move dialog all around i completely override bitmap, when i close dialog, bitmap refreshes, what must i do that i refresh bitmap everytime i move dialog...WM_MOVE in dialog procedure doesnt work, thanks

Share this post


Link to post
Share on other sites
Advertisement
Why use d3d if i use just directdraw...there is something with WM_PAINT, can anyone be more precise and explain a little bit more, i know that WM_PAINT is activated everytime monitor refreshes, but will WM_PAINT run even if i use modal dialog..can anyone explain a little please

Share this post


Link to post
Share on other sites
From what I understand, WM_PAINT is sent whenever part of your application needs to redraw part of the screen. So if you move the dialog, Windows should send a message that you need to redraw the part of the screen that was uncovered. Or, you could just ignore the part of the message that tells you what area to redraw and just redraw the entire screen. This leads me to a question: Would it be better to divide the screen up into areas and only redraw those areas when there is a change in that area? For example, divide the screen into 4 sections. Then, when you get the WM_PAINT message, test to see what areas need to be repainted, and only redraw those areas? I just started Windows programming so I am not really sure if this is the best way. Hope this helps!

"I kinda think, therefore, I kinda... am?"

Share this post


Link to post
Share on other sites
The Black Void comes from the messagebox overlapping memory space of the bitmap. When you move it, it just zeros out whatever was behind it because windows doesn''t store this.

Whenever a WM_PAINT is recieved a PART of the client area (inside) of the windows needs to be updated. WIndows itself will clip parts of the image(somewhat slow) so if you want to change the image at this point, you will have to use invalidate rectangle to redraw the entire differently. If you just want to refresh it though, then you can recieve information on the invalid rectangle and just redraw that part of it(do your own clipping this way) and its quicker than falling back on windows.

Sorry, cant remember what the function is to find the invalid rectangle.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!