|
| | |||||||
| Tablet PC Developers Show off your work while discussing with others how to create ink enabled applications. |
| | LinkBack | Thread Tools |
| |||
| InkCollector shrinks collected ink I'm trying to write a simple Tablet PC app in VB6 with the Automation library inkobj.dll. I am using an InkCollector attached to a window (e.g. a PictureBox) to collect a bitmap image of the doodles made over the window.. I am then using InkCollector.Ink.Save(IPF_GIF) to generate a GIF bitmap that I save to a file. Because I want a bitmap that covers the entire PictureBox, I start by adding a diagonal ink stroke from the upper left of the window to the lower right. This forces the InkRectangle to the size I want. I compute the Ink Coordinates for this by calling Ink.Renderer with the DC of the attached window, then I call Ink.CreateStrokes and this works properly if I save the GIF file. The display also looks correct, with a diagonal line from UL to LR. If I now doodle on the window, this works and displays correctly. So far so good. The problem comes if I now call Ink.Save(IPF_GIF) to save the Ink. Now, the diagonal stroke I created looks ok, but the doodles are shrunk to the upper left of the GIF file. Why are my pen doodles not scaling properly as they appeared during the drawing process. Why is Ink.Save moving the doodles, but keeping my diagonal stroke intact? Is there some special scaling parameters I must set in InkCollector to save the ink image the way it is being displaying? Also, I've noticed that penstrokes moved from inside to outside the PictureBox are also being picked up. How do I capture Ink strokes.made only within the attached window? Do I need to do something in addition to setting the InkCollector.hWnd to the attached window's handle? I would think that using InkCollector this way would be straightforward, but there is obviously something I am not understanding here. Thanks for any help / advice! |
| |||
| RE: InkCollector shrinks collected ink See this thread in the MSDN forum: http://forums.microsoft.com/MSDN/Sho...27811&SiteID=1 Thanks, Stefan Wick http://blogs.msdn.com/swick/ "hogwell" wrote: > I'm trying to write a simple Tablet PC app in VB6 with the Automation > library inkobj.dll. > > I am using an InkCollector attached to a window (e.g. a PictureBox) to > collect a bitmap image of the doodles made over the window.. > > I am then using InkCollector.Ink.Save(IPF_GIF) to generate a GIF > bitmap that I save to a file. > > Because I want a bitmap that covers the entire PictureBox, I start by > adding a diagonal ink stroke from the upper left of the window to the > lower right. > This forces the InkRectangle to the size I want. > I compute the Ink Coordinates for this by calling Ink.Renderer with > the DC of the attached window, > then I call Ink.CreateStrokes and this works properly if I save the > GIF file. > > The display also looks correct, with a diagonal line from UL to LR. > > If I now doodle on the window, this works and displays correctly. > > So far so good. > > The problem comes if I now call Ink.Save(IPF_GIF) to save the Ink. > Now, the diagonal stroke I created looks ok, but the doodles are > shrunk to the upper left of the GIF file. > > Why are my pen doodles not scaling properly as they appeared during > the drawing process. Why is Ink.Save moving the doodles, but keeping > my diagonal stroke intact? > Is there some special scaling parameters I must set in InkCollector to > save the ink image the way it is being displaying? > > Also, I've noticed that penstrokes moved from inside to outside the > PictureBox are also being picked up. How do I capture Ink strokes.made > only within the attached window? > Do I need to do something in addition to setting the InkCollector.hWnd > to the attached window's handle? > > I would think that using InkCollector this way would be > straightforward, but there is obviously something I am not > understanding here. > > Thanks for any help / advice! > > |
| Bookmarks |
| Thread Tools | |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| display shrinks when changing screen resolution | Stephen240 | Windows Vista | 10 | 09-09-2007 12:40 PM |
| Clipboard Item not collected excel 2003 | MrMako | Microsoft Office | 0 | 09-07-2007 08:30 AM |
| Clipboard - "item not collected" | SJ | Microsoft Office | 0 | 05-22-2007 10:10 AM |
| Left-Hand taskbar shrinks | fehr.markus@gmail.com | Windows XP | 0 | 02-12-2007 10:49 PM |
| InkPicture, InkCollector & JScript | =?Utf-8?B?RnV6eXJhbQ==?= | Windows XP Tablet PC Newsgroup | 1 | 07-19-2004 03:20 PM |
| New To Technology Questions? | Do You Need Help with Your Computer or Device? | Do You Need Help with this site? |