Re: [Win32Lib] stretchBlt a virtual window to Printer?

new topic     » goto parent     » topic index » view thread      » older message » newer message
DanM said...

I'll take a look at your GrPrint.ew (it's possible I already have it somewhere, too), but as far as I can see right now, stretchBlt has worked FINE, without apparently needing to know pixels per inch etc. One thing I had to do to make it work was to be careful exactly where I put my call to the print routine, as it apparently needed the VirtScrn to be fully drawn, which makes sense, but what didn't make too much sense (but worked), was to put my call AFTER and NOT before some SCROLL bar adjustment statements. Somehow that's what made sure VirtScrn was finished, I guess/think. Weird.

MSDN is your friend (no kidding!):

"The title bar, menu bar, window menu, minimize and maximize buttons, sizing border, and scroll bars are referred to collectively as the window's nonclient area. The system manages most aspects of the nonclient area; the application manages the appearance and behavior of its client area."

getClientRect() returns what Windows thinks is the client area of the window, minus statusbar and top horizontal toolbar. Since scrollbars that originate from the window style belong to the nonclient area, and since the client area is the non nonclient area, it makes sense that scrollbar positions be known for the returned client area to be accurate.

Note that, if you ceated your window with explicit scrollbar child controls, they probably will be considered as child controls and not as part of the nonclient area. I'd strongly suggest you to compare the observed behaviours with either use cases.

Window is not your friend.

CChris

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu