/**************/ /* cliptest.c */ /***************************************************************************** PROGRAM: cliptest.c Windows: Win 3.1 & WIN32 PURPOSE: Tutkitaan leikepöydän sisältöä Editor: Vesa Lappalainen 9.10.1994 PROJECT: cliptest.c, demo.def, ALI\tabhand.c, ALI\clipboar.c, ALI\printw.c *****************************************************************************/ #include #include "tabhand.h" #include "clipboar.h" #include "printw.h" /****************************************************************************/ TblClassSWindowMAIN("TblWndClass","ikoni","Otsikko",MsgTbl,0); /****************************************************************************/ static EVENT WM_paint(tMSGParam *msg) /* # MAKE_DC # */ { char *s; SetTextStart(msg->hDC,10,10); s = TextClipboard(msg->hWnd); printw(msg->hDC,s); return 0; } static EVENT WM_lbuttondown(tMSGParam *msg) { InvalidateRect(msg->hWnd,NULL,TRUE); return 0; } /****************************************************************************/ /* Viestien käsittelytaulukko */ /****************************************************************************/ tMSGEntry MsgTbl[] = { EV_HANDLE_WM_DESTROY, { WM_PAINT , DoC , DoC , WM_paint, MAKE_DC }, /*a*/ { WM_LBUTTONDOWN , DoC , DoC , WM_lbuttondown }, /*a*/ { 0 } }; /****************************************************************************/