Closed Bug 201207 Opened 22 years ago Closed 22 years ago

Need to handle WM_PRINTCLIENT message

Categories

(Core Graveyard :: Embedding: APIs, defect, P1)

x86
Windows 2000
defect

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.4beta

People

(Reporter: NancySumner1, Assigned: kmcclusk)

Details

(Keywords: topembed+, Whiteboard: edt_b3)

Attachments

(2 files, 1 obsolete file)

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:
Attached file nsWindow patch (obsolete) —
Attaching this patch as a starting point (seems to do the trick).
Keywords: topembed+
-> Rod
Status: UNCONFIRMED → NEW
Ever confirmed: true
Reassign properly
Assignee: adamlock → rods
FYI: Rod doesn't work on printing anymore. taking.
Assignee: rods → kmcclusk
Priority: -- → P1
Target Milestone: --- → mozilla1.4beta
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)
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+
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 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+
Fix checked into trunk.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: