From: Vipin on
SURFOBJ's SIZEL sizlBitmap; has what you need.


Thanks
Vipin

"Conan" <Conan(a)discussions.microsoft.com> wrote in message
news:2365A89E-3A63-4DD5-8537-70AABE822BA0(a)microsoft.com...
> 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.
>> > >
>>
>>
>>


From: Tim Roberts on
"Conan" <Conan(a)discussions.microsoft.com> wrote:
>
>The size of m_bmpSample is (200,306).

How do you know? Where did it come from?
--
- Tim Roberts, timr(a)probo.com
Providenza & Boekelheide, Inc.
From: Conan on
Oh,This I knew.
But the SURFOBJ's sizlBitmap of the source surface is also (1,1), and the
value is wrong.
From the above code,This value(sizlBitmap of the SURFOBJ) is (200,306) is
right, and should not be (1,1).
--
Conan Wu
Email:aqua_aqua(a)21cn.com



"Vipin" wrote:

> SURFOBJ's SIZEL sizlBitmap; has what you need.
>
>
> Thanks
> Vipin
>
> "Conan" <Conan(a)discussions.microsoft.com> wrote in message
> news:2365A89E-3A63-4DD5-8537-70AABE822BA0(a)microsoft.com...
> > 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.
> >> > >
> >>
> >>
> >>
>
>
>
From: Conan on
In the application,the m_bmpSample have been showed,so I knew its size.Please
note,this is in the application,not in the driver.

--
Conan Wu
Email:aqua_aqua(a)21cn.com



"Tim Roberts" wrote:

> "Conan" <Conan(a)discussions.microsoft.com> wrote:
> >
> >The size of m_bmpSample is (200,306).
>
> How do you know? Where did it come from?
> --
> - Tim Roberts, timr(a)probo.com
> Providenza & Boekelheide, Inc.
>
From: Vipin on
It can't be wrong. Your bitmap is not probably selected then into the
memory DC then,
leaving in it still the default 1X1 bitmap. check the return code of
SelectObject(...). It should be NULL most probably in your case. You may be
trying to select a non compatible DDB into a memory DC.

You haven't shown any of your bitmap creation code, wherre is it?

Thanks
Vipin

"Conan" <Conan(a)discussions.microsoft.com> wrote in message
news:D4071DD6-A478-4087-BB46-9253696CE48C(a)microsoft.com...
> Oh,This I knew.
> But the SURFOBJ's sizlBitmap of the source surface is also (1,1), and the
> value is wrong.
> From the above code,This value(sizlBitmap of the SURFOBJ) is (200,306) is
> right, and should not be (1,1).
> --
> Conan Wu
> Email:aqua_aqua(a)21cn.com
>
>
>
> "Vipin" wrote:
>
>> SURFOBJ's SIZEL sizlBitmap; has what you need.
>>
>>
>> Thanks
>> Vipin
>>
>> "Conan" <Conan(a)discussions.microsoft.com> wrote in message
>> news:2365A89E-3A63-4DD5-8537-70AABE822BA0(a)microsoft.com...
>> > 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.
>> >> > >
>> >>
>> >>
>> >>
>>
>>
>>