Closed
Bug 201207
Opened 22 years ago
Closed 22 years ago
Need to handle WM_PRINTCLIENT message
Categories
(Core Graveyard :: Embedding: APIs, defect, P1)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.4beta
People
(Reporter: NancySumner1, Assigned: kmcclusk)
Details
(Keywords: topembed+, Whiteboard: edt_b3)
Attachments
(2 files, 1 obsolete file)
|
2.91 KB,
patch
|
kinmoz
:
superreview+
|
Details | Diff | Splinter Review |
|
2.96 KB,
patch
|
john
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02
Build Identifier: mozilla trunk
Currently, the nsWindow object for windows does not handle the WM_PRINTCLIENT
message. This is needed in order to support some windows functions, like
AnimateWindow().
Reproducible: Always
Steps to Reproduce:
Attaching this patch as a starting point (seems to do the trick).
| Assignee | ||
Comment 4•22 years ago
|
||
FYI: Rod doesn't work on printing anymore.
taking.
Assignee: rods → kmcclusk
Priority: -- → P1
Target Milestone: --- → mozilla1.4beta
Comment 5•22 years ago
|
||
Would it be possible to handle WM_PRINT as well?
Here is my Python code which captures IE window contents just fine.
The Mozilla ActiveX Control returns black pixels.
Thanks in advance,
Michael Krause
Here is the snippet I am using:
def GetScreenDataHwnd(self, filename, hwnd=None):
if not hwnd:
hwnd = self.ie.GetSafeHwnd()
hwnd = win32gui.FindWindowEx(hwnd, 0, self.windowClass, None)
dc = win32gui.GetWindowDC(hwnd)
dc = win32ui.CreateDCFromHandle(dc)
left, top, right, bottom = win32gui.GetWindowRect(hwnd)
w = right - left
h = bottom - top
hdcMem = dc.CreateCompatibleDC()
bitmap = win32ui.CreateBitmap()
bitmap.CreateCompatibleBitmap(dc, w, h);
hold = hdcMem.SelectObject(bitmap)
win32gui.SendMessage(hwnd, WM_PRINT, hdcMem.GetSafeHdc(),
PRF_CHILDREN | PRF_CLIENT | PRF_ERASEBKGND | PRF_NONCLIENT | PRF_OWNED)
hdcMem.SelectObject(hold)
bitmap.SaveBitmapFile(hdcMem, filename)
| Assignee | ||
Comment 6•22 years ago
|
||
Attachment #119839 -
Attachment is obsolete: true
Updated•22 years ago
|
Whiteboard: edt_b3
Comment on attachment 120133 [details] [diff] [review]
Cosmetic cleanup of previous patch. Fixed, tabs, coding conventions etc.
sr=kin@netscape.com
Attachment #120133 -
Flags: superreview+
| Assignee | ||
Comment 8•22 years ago
|
||
| Assignee | ||
Comment 9•22 years ago
|
||
Comment on attachment 120489 [details] [diff] [review]
removed WM_PRINT case. It is handled by the default window proc
John can you review? Thanks!
Attachment #120489 -
Flags: review?(jkeiser)
Comment 10•22 years ago
|
||
Comment on attachment 120489 [details] [diff] [review]
removed WM_PRINT case. It is handled by the default window proc
Yep, that does it.
Attachment #120489 -
Flags: review?(jkeiser) → review+
| Assignee | ||
Comment 11•22 years ago
|
||
Fix checked into trunk.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•