https://www.betaarchive.com/wiki/index.php?title=Microsoft_KB_Archive/104963&feed=atom&action=history
Microsoft KB Archive/104963 - Revision history
2024-03-28T15:03:18Z
Revision history for this page on the wiki
MediaWiki 1.39.3
https://www.betaarchive.com/wiki/index.php?title=Microsoft_KB_Archive/104963&diff=27386&oldid=prev
X010: 1 revision imported: importing part 1
2020-07-16T18:14:56Z
<p>1 revision imported: importing part 1</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<tr class="diff-title" lang="en-GB">
<td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 18:14, 16 July 2020</td>
</tr><tr><td colspan="2" class="diff-notice" lang="en-GB"><div class="mw-diff-empty">(No difference)</div>
</td></tr></table>
X010
https://www.betaarchive.com/wiki/index.php?title=Microsoft_KB_Archive/104963&diff=27385&oldid=prev
X010: stage1
2020-07-16T17:46:27Z
<p>stage1</p>
<p><b>New page</b></p><div>{|<br />
|width="100%"|<br />
== BUG: SelectClipRgn() Does Not Update Properly on Printer ==<br />
|}<br />
<br />
Q104963<br />
<br />
3.10 WINDOWS kbprg kbbuglist<br />
<br />
<br />
-----<br />
<br />
The information in this article applies to:<br /><br />
<br />
<br />
* Microsoft Windows Software Development Kit (SDK) 3.1<br />
<br />
<br />
-----<br />
<br />
<br /><br />
<br />
<br />
== SYMPTOMS ==<br />
<br />
In a Windows 3.1 printing application, calling '''SelectClipRgn()''' with the second parameter set to NULL to reset the clipping region to clip output to the printer page does not reset the clipping region. Clipping on the printer device context is still set to the clipping region specified in the previous call to '''SelectClipRgn()'''.<br />
<br />
<br /><br />
<br />
<br />
== CAUSE ==<br />
<br />
The HP LaserJet II and HP LaserJet III printer drivers do not handle the call to '''SelectClipRgn()''' properly when the hrgn parameter is set to NULL. Instead of setting the clipping region to be the entire printable page (as it should), the call has no effect and the previous clipping region is still the device context's clipping region.<br />
<br />
<br /><br />
<br />
<br />
== RESOLUTION ==<br />
<br />
Instead of sending NULL as the hrgn parameter to '''SelectClipRgn()''', create a region of the printable area of the page and send that region as the hrgn parameter. This will give the desired effect of calling SelectClipRgn(hPrnDC, NULL). The following is an example of how this workaround could be implemented:<br />
<br />
<pre class="CODESAMP"> HRGN hRgn,hPageRgn;<br />
POINT pt;<br />
<br />
SelectClipRgn(hPrnDC,hRgn=CreateRectRgn(200,200,500,500));<br />
// . . .<br />
// SelectClipRgn(hPrnDC,NULL);<br />
// Instead of calling the above function, try this:<br />
pt.x=GetDeviceCaps(hPrnDC,HORZRES);<br />
pt.y=GetDeviceCaps(hPrnDC,VERTRES);<br />
SelectClipRgn(hPrnDC,hPageRgn=CreateRectRgn(0,0,pt.x,pt.y));<br />
DeleteObject(hRgn);<br />
DeleteObject(hPageRgn); </pre><br />
<br /><br />
<br />
<br />
== STATUS ==<br />
<br />
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.<br />
<br />
Additional query words: buglist3.10 3.10<br />
<br />
Keywords : kbOSWin310 _IK kbSDKWin16<br /><br />
Issue type : kbbug<br /><br />
Technology : kbAudDeveloper kbWin3xSearch kbSDKSearch kbWinSDKSearch kbWinSDK310<br />
<br />
{|<br />
|width="100%"| <br /><br />
Last Reviewed: July 9, 1999<br /><br />
[http://www.microsoft.com/misc/cpyright.htm © 2001 Microsoft Corporation. All rights reserved. Terms of Use.]<br /><br />
|}</div>
X010