I want receive screen shot. But I see some limitation. My question.
Why?
My steps
- Enlarge window size. (Window without scrollbar)
- GetDC, CreateCompatibleDC, CreateDIBSection, SelectObject
- Then! I send message WM_PAINT. Also I send WM_PRINT and
WM_PRINTCLIENT but result the same.
SendMessage(m_hTree, WM_PAINT, (WPARAM)m_memDC, 0);//PRF_CHILDREN |
PRF_CLIENT | PRF_ERASEBKGND | PRF_NONCLIENT | PRF_OWNED);
- Use BitBlt
if height window dues not more then ~32700, it is ok
But if more I receive black area after ~32700.
Why?
Thanks In Advance.
Because that limit exists by design (I believe you will find that the
problem starts at 32768 pixels).
--
John Carson
It is terrible.
Maybe you know where I can read about this limitation(exactly)?
Ok. If limitation exists, maybe you know, how can I resolve this
problem?
Thanks!
Why is it terrible? Why is it that you must deal with windows this big,
given that most screens are less than 2000 pixels in width and height?
--
John Carson
No, I don't know where you can read about it. However, a signed short has a
maximum value of 32,767. This can't be coincidence. Presumably somewhere in
its internals, Windows is using a short to store window dimensions.
--
John Carson
This is common limitation in many Windows APIs. For some there are
workarounds (like for scrollbars).
In case of window size, though most APIs take integer as width and
height, WM_SIZE and alike messages reads width and height from lParam,
where low order word is width and high order word is height.
--
Grzegorz Wróbel
http://www.4neurons.com/
677265676F727940346E6575726F6E732E636F6D
Yes. I agree. We are right.
How can I execute something like
SendMessage(m_hTree, WM_PAINT, (WPARAM)m_memDC, (LPARAM)&rect);
where rect is rectangle
If exists limitation, I specifying next coordinates
rect.top = 32751
rect.left = 0
rect.button = height window
rect.right = width window
is it really?
How about you tell us what you are really trying to do and why it involves
such enormous windows.
--
John Carson
Because I have big window. This is tree control. I must send this to
printer.
So, I need way for obtain specified window's part.
myaso,
Do you understand the question? I just don't see why you seem to be avoiding
it.
Noone needs a window that is more than 32,767 pixels wide or high. How is
anyone going to view that window?
Paul
Time for redesigning. Make the client area smaller, sent the client area
to the printer, scroll the window, send client area to the printer
again, and so on, until you printed entire tree.
Perhaps you should query each item using the tree view window handle and
using your own custom printing code.
What is the purpose of the printout? I imagine that there may actually be a
format that is more useful than the on-screen format anyway. For example, on
the printout you may want to see all nodes expanded and you may not want to
see shadows, selection and focus rectangles, etc.
Paul
"Grzegorz Wróbel" </dev/nu...@localhost.localdomain> wrote in message
news:ejsjg0$881$1...@atlantis.news.tpi.pl...