• Advertisement
  • entries
  • comments
  • views

Win32 continued

Sign in to follow this  


As per below, I'm actually really fired up now about learning Win32 properly. I was quite encouraged by how fast things moved last night once I got going, and how very easy it seemed using Visual C++ to manage .rc files and load icons and so on.

C++ Builder rocks for RAD but even without distribution concerns, there are a lot of annoying limitations and I think it can only be a good thing to be learning something new. I got a real kick out of shifting from DirectDraw to Direct3D recently.

It does seem like a raving nightmare trying to do even the simplest things in some way though. I don't know if anyone can explain this, but I used GetWindowInfo to try to find out the size of the client area of my window, which all seemed simple enough, but the rcClient member seems to be actual screen co-ordinates, whereas drawing via the DC acquired through WM_PAINT appears to be relative to the top left of the client area.

Worked okay. I just FillRect-ted a rectangle like:


but if anyone knows an easier way of getting the client rect dimensions, do please let me know.

Tool bars and status bars next. I seem to remember an API call something to do with InitCommonControlSex, which always sounded tempting [smile].
Sign in to follow this  


Recommended Comments

Guest Anonymous Poster


GetClientRect gets the client area of the window (and the top-left coordinates will be [0,0]). But when repainting the client area, GetUpdateRect returns the rectangle representing the part of the client area that requires repainting (if any) - which saves repainting the entire window when only a small part of it has been dirtied.


Share this comment

Link to comment
Cheers, dude. I'll go try that now. Not going to worry about dirty rectangle updates for time being.

Share this comment

Link to comment
Just wanted to say "big kudos" for having the bojangles to tackle Win32 programming like that and stick with it. I still haven't dared delve into that domain, so you have my unwavering respect, good sir!

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement