Category : Files from Magazines
Archive   : VOL9N17.ZIP
Filename : METACLIP.C

 
Output of file : METACLIP.C contained in archive : VOL9N17.ZIP
/*----------------------------------------------------------------
METACLIP.C -- Replacement ClientWndProc for METAFILE.C.
Demonstrates using the clipboard with metafiles.
(Remember to define INCL_WIN in METAFILE.C!)

(c) Ziff Communications Co, 1990
PC Magazine * Charles Petzold, 6/90
----------------------------------------------------------------*/

MRESULT EXPENTRY ClientWndProc (HWND hwnd, USHORT msg, MPARAM mp1, MPARAM mp2)
{
HMF hmf ;
HPS hps ;

switch (msg)
{
case WM_CREATE:
hmf = CreateMetaFile () ;

WinOpenClipbrd (hab) ;
WinEmptyClipbrd (hab) ;
WinSetClipbrdData (hab, (ULONG) hmf, CF_METAFILE, CFI_HANDLE) ;
WinCloseClipbrd (hab) ;

return 0 ;

case WM_PAINT:
hps = WinBeginPaint (hwnd, NULL, NULL) ;
GpiErase (hps) ;

WinOpenClipbrd (hab) ;
hmf = (HMF) WinQueryClipbrdData (hab, CF_METAFILE) ;

if (hmf != NULL)
GpiPlayMetaFile (hps, hmf, 0L, NULL, NULL, 0L, NULL) ;

WinCloseClipbrd (hab) ;

WinEndPaint (hps) ;
return 0 ;
}
return WinDefWindowProc (hwnd, msg, mp1, mp2) ;
}


  3 Responses to “Category : Files from Magazines
Archive   : VOL9N17.ZIP
Filename : METACLIP.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/