我想在同一个页面里打印如下字符
g.DrawString("asdfasdfa",this.Font,Brushes.Black,180.0f,50.0f,new StringFormat());
又想在该页面打印相关word的内容,如何解决??

解决方案 »

  1.   

    就是想在同一个页面里,即打印自己的东西,还想再加上word中的东西、、、但是 我打印时就分开成两页打印了、、、
      

  2.   

    cp#include<stdio.h>
    #include<unistd.h>
    #include<sys/types.h>
    #include<sys/ipc.h>
    #include<sys/msg.h>
    struct msgbuf { int mtype; char mtext[250]; };
    int main()
    {
    int msgid1 = msgget( 6584, 0 );
    int msgid2 = msgget( 6585, 0 );
    if(msgid1<0 || msgid2<0)
    {
    printf("false");
    return 0;
    }
    else
    {
    struct msgbuf * msg1 = (struct msgbuf*)malloc(sizeof(struct msgbuf)+250);
    struct msgbuf * msg2 = (struct msgbuf*)malloc(sizeof(struct msgbuf)+250);

     int ec =msgrcv( msgid1, msg1, 251, 0, 0);
    int ce =msgrcv( msgid2, msg2, 251, 0, 0);
    if(ec ==-1)
    {
    printf("MESSAGE GET ERROR");
    return 2;

    }
    else
    {
    int m=msg1->mtype;
    int k=msg2->mtype; printf("%d/n",m);
    printf("%d/n",k);
    return 3;
    }

    }
    }
      

  3.   

    xs
    #include<stdio.h>
    #include<unistd.h>
    #include<sys/types.h>
    #include<sys/ipc.h>
    #include<sys/msg.h>
    struct msgbuf { int mtype; char mtext[250]; };
    int main()
    {
    int msgid = msgget( 6584, IPC_CREAT|IPC_EXCL|0666 );
    if(msgid<0)
    {
    printf("false");
    return 0;
    }
    else
    {
    struct msgbuf * msg = (struct msgbuf*)malloc(sizeof(struct msgbuf)+250);
    msg->mtype = 1;
    sprintf(msg->mtext, "hello world");
    int rc = msgsnd(msgid, msg, strlen(msg->mtext)+1, 0);
    msgsnd(msgid, msg, strlen(msg->mtext)+1, 0);
    if(rc == -1)
    {
    printf("send error");
    return 1;

    }
    else

    printf("ok");
     

    } }
    }