最好用CPrintDialog来创建dc,用StartDoc开始打印,这方面文档很多

解决方案 »

  1.   

    你在onprint()中写下pDC->TextOut(1,1,"abc");试试先
      

  2.   

    CDC printDC;
    char file[70];
    char * Driver,*Device,*Output;
    GetProfileString("windows","device","",file,70);
    Device=(char *)strtok(file,",");
    Driver=(char *)strtok(NULL,",");
    Output=(char *)strtok(NULL,","); if (Device && Driver && Output) {
    printDC.CreateDC(Driver,Device,Output,NULL);
                     printDC.StartDoc(&docinfo);
                      printDC.StartPage();
    //here out you text or graph
    printDC.EndPage();
    printDC.EndDoc();
    }