home *** CD-ROM | disk | FTP | other *** search
- EXTPROC CEnvi
- /**********************************************
- *** CBPrint.cmd - Print contents of the ***
- *** ver.1 clipboard to the printer ***
- **********************************************/
-
- #include <ClipBrd.lib>
-
- ClipText = GetClipboardData(CF_TEXT);
- if ( ClipText ) {
- printf("Have clipboard text\n");
- fp = fopen("\\DEV\\PRN","wt");
- if ( fp ) {
- fwrite(ClipText,strlen(ClipText),fp);
- fclose(fp);
- printf("Clipboard text has been sent to the printer.\n");
- } else
- printf("Error opening printer.\n");
- } else
- printf("No text data in the clipboard.\n");