|
-
Feb 19th, 2001, 12:37 PM
#1
Thread Starter
Addicted Member
Hi all,
How do you scale a bitmap without using a picture box or image control? Is it done with StretchBlt or SetViewportExtEx?
I have tried stretchblt and am having a problem... if the source and destination DCs have different width & height settings it is blank (even if it is off by one). If the settings are the exactly the same it works, but wont stretch.
Ex. if these were in the appropriate areas of stretchblt it is blank for me.
lwidth +1, lheight + 1,,, lwidth, lheight
So i have two questions.
1. does anyone have an idea about what is going on with my stretchblt?
2. What is the best way to scale a bitmap without the help of a control?
Thanks for any help you can give.
wolf
-
Feb 20th, 2001, 12:26 PM
#2
Lively Member
I don't exactly know, but I have to refresh the PictureBox after I used the BitBlt call, maybe you have also to do this.
-
Feb 20th, 2001, 01:20 PM
#3
Thread Starter
Addicted Member
Thanks for the responce. I do appreciate the advice.
There have been some developments. I fixed the problem but dont know why.
I have loaded a iPictureDisp with a bitmap, and created a compatable dc to select it into; there must be something with the scale it uses, because if i divide its x & y by 29 or higher i can see it (bigger or smaller depending on the how high the number is.) I know that 15 is typiccaly twips per pixel, but what is 29?
Thanks for the help.
wolf
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|