|
From: Conan on 29 Aug 2005 11:41 My driver is a virtual printer driver.It used a device managed surface and implemented DrvCopyBits and other painting functions.Here ,The DrvCopyBits needs to be paid attention.. The DrvCopyBits function have six intake parameters,thereinto,The fifths parameter prclDest, the destination rectangle that defines the area to be modified.The second parameter psoSrc , the source surface,the sizlBitmap of the SURFOBJ structure default the size of the surface. The problem that, In the application ,the follow code is used: pDC->BitBlt(400,0,200,306,&dcmem,0,0,SRCCOPY); and in the driver,the drvCopyBits is called. In the ideal situation,the parameters of DrvCopyBits ,prclDest should be (400, 0)--(600,306),and sizlBitmap of the psoSrc is (200,306). But in the fact,receives the parameters is that,prclDest is (400,0)--(401,1),and sizlBitmap of the psoSrc is (1,1) Why would like this ?Anybody can help me? Thanks Conan Wu
From: Tim Roberts on 31 Aug 2005 02:02 "Conan" <Conan(a)discussions.microsoft.com> wrote: > >The problem that, >In the application ,the follow code is used: >pDC->BitBlt(400,0,200,306,&dcmem,0,0,SRCCOPY); >and in the driver,the drvCopyBits is called. > >In the ideal situation,the parameters of DrvCopyBits ,prclDest should be >(400, 0)--(600,306),and sizlBitmap of the psoSrc is (200,306). >But in the fact,receives the parameters is that,prclDest is >(400,0)--(401,1),and sizlBitmap of the psoSrc is (1,1) > >Why would like this ?Anybody can help me? Is it possible that dcmem contains a 1x1 bitmap? Have you actually selected a memory bitmap into dcmem? How did you do it? -- - Tim Roberts, timr(a)probo.com Providenza & Boekelheide, Inc.
From: Conan on 31 Aug 2005 05:14 Hi,Tim. Thanks for your reply. These codes are in the application: CDC dcmem; dcmem.CreateCompatibleDC(pDC); CBitmap* pOld = dcmem.SelectObject(&m_bmpSample); //m_bmpSample loaded a bitmap from the source. pDC->BitBlt(400,0,200,306,&dcmem,0,0,SRCCOPY); dcmem.DeleteDC(); From codes, you may find out. I have selected the bitmap into the dcmem,and the size of the bitmap is (200,306). "Tim Roberts" wrote: > > Is it possible that dcmem contains a 1x1 bitmap? Have you actually > selected a memory bitmap into dcmem? How did you do it? > -- > - Tim Roberts, timr(a)probo.com > Providenza & Boekelheide, Inc. >
From: Vipin on 1 Sep 2005 17:59 (200,306) are the source/destination widths in BitBlt. That in itself doesn't imply the bitmap widths. What is the size of m_bmpSample? Use GetObject(...) and find out if your module is not the one that is creating the bitmap. Thanks Vipin "Conan" <Conan(a)discussions.microsoft.com> wrote in message news:B728A8F8-3E6F-4E25-A37F-B31E6B796CFA(a)microsoft.com... > Hi,Tim. > Thanks for your reply. > These codes are in the application: > > CDC dcmem; > dcmem.CreateCompatibleDC(pDC); > CBitmap* pOld = dcmem.SelectObject(&m_bmpSample); //m_bmpSample > loaded a bitmap from the source. > > pDC->BitBlt(400,0,200,306,&dcmem,0,0,SRCCOPY); > dcmem.DeleteDC(); > > From codes, you may find out. > I have selected the bitmap into the dcmem,and the size of the bitmap is > (200,306). > > > > "Tim Roberts" wrote: > > > > Is it possible that dcmem contains a 1x1 bitmap? Have you actually > > selected a memory bitmap into dcmem? How did you do it? > > -- > > - Tim Roberts, timr(a)probo.com > > Providenza & Boekelheide, Inc. > >
From: Conan on 1 Sep 2005 22:29 Hi Vipin; The size of m_bmpSample is (200,306). I hope to get the size of source surface in DrvCopyBits of driver.For instance, in above example code my hope is in DrvCopyBits get ( 200,306) this size . Now ,I don't know how to get the size of source and target in DrvCopyBits.This is the key point of this problem. Thanks -- Conan Wu Email:aqua_aqua(a)21cn.com MSN:aqua_aqua(a)21cn.com "Vipin" wrote: > (200,306) are the source/destination widths in BitBlt. That in itself > doesn't imply the bitmap widths. > What is the size of m_bmpSample? Use GetObject(...) and find out if your > module is not the one that is creating the bitmap. > > Thanks > Vipin > > "Conan" <Conan(a)discussions.microsoft.com> wrote in message > news:B728A8F8-3E6F-4E25-A37F-B31E6B796CFA(a)microsoft.com... > > Hi,Tim. > > Thanks for your reply. > > These codes are in the application: > > > > CDC dcmem; > > dcmem.CreateCompatibleDC(pDC); > > CBitmap* pOld = dcmem.SelectObject(&m_bmpSample); //m_bmpSample > > loaded a bitmap from the source. > > > > pDC->BitBlt(400,0,200,306,&dcmem,0,0,SRCCOPY); > > dcmem.DeleteDC(); > > > > From codes, you may find out. > > I have selected the bitmap into the dcmem,and the size of the bitmap is > > (200,306). > > > > > > > > "Tim Roberts" wrote: > > > > > > Is it possible that dcmem contains a 1x1 bitmap? Have you actually > > > selected a memory bitmap into dcmem? How did you do it? > > > -- > > > - Tim Roberts, timr(a)probo.com > > > Providenza & Boekelheide, Inc. > > > > > >
|
Next
|
Last
Pages: 1 2 3 Prev: MPIO driver installation Next: HID and DirectInput ? (WDM Driver hidgame) |