User Profile

Collapse

Profile Sidebar

Collapse
bradyounie
bradyounie
Last Activity: Dec 16 '09, 03:51 PM
Joined: Aug 27 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Okay, let me see...

    The product that I'm developing is an SDK, and my team inherited one. The COM support was done in C++ and had propget line of code in its IDL. Normally, a propget has only the "out, retval" parameter, which behaves like a normal C# property. In fact, to create a COM interop interface in C# that duplicates a normal propget, you would create a property. If the IDL has both a propget and a propput with the...
    See more | Go to post

    Leave a comment:


  • I solved it!

    I just use an indexer and add the IndexerName attribute to it, like this:

    Code:
    [IndexerName("Field")]
    public string this [string itemName]
    {
        ...
    }
    See more | Go to post

    Leave a comment:


  • A problem converting a C++ COM interface to a C# interface

    I'm trying to make a C# assembly that replaces an old C++ COM DLL. The new interface must have the same API so that the customers don't have to change code to support the new assembly. Sure, they might need to rebuild, but no code changes.

    That said, it's all going fine, except for one method in the IDL. It's defined as this:

    Code:
    [propget, id(3)] HRESULT Field([in] BSTR name, [out, retval] VARIANT *pVal);
    ...
    See more | Go to post

  • bradyounie
    replied to Compile errors in a MIDL generated _i.c file
    in C
    Tried that. Did the same thing. Plus, I was told to use 2005 for this project.
    See more | Go to post

    Leave a comment:


  • bradyounie
    replied to Compile errors in a MIDL generated _i.c file
    in C
    I figured it out about an hour ago.

    The line it was complaining about was the IID_ITransactio n one. Windows already defines an IID_ITransactio n. For some reason, MSVC 6 didn't complain about it, but VS 2005 does. If I change my interface name, it builds fine.

    The errors it gave weren't very helpful. In fact, they led me in the wrong direction, but at least I figured it out.

    Thanks for the help.
    See more | Go to post

    Leave a comment:


  • bradyounie
    replied to Compile errors in a MIDL generated _i.c file
    in C
    I did just now, with no luck. I have one source file including the _i.c file, so I included <windows.h> before that include. No dice. I get the same errors....
    See more | Go to post

    Leave a comment:


  • bradyounie
    replied to Compile errors in a MIDL generated _i.c file
    in C
    Good point. Duh. Sorry about that.

    Here's the snippet of generated code that has the error:

    Code:
    #define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \
            const type name = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
    
    MIDL_DEFINE_GUID(IID, IID_IResponse,0xCEB229AF,0x9439,0x43E7,0xB5,0xE1,0xB6,0xE2,0xC7,0xCB,0x2E,0xA7);
    
    MIDL_DEFINE_GUID(IID, IID_ITransactionElement,0xA1650A7E,0x54D5,0x4f66,0x80,0x6B,0x40,0x28,0xCF,0xB6,0xC2,0x56);
    ...
    See more | Go to post

    Leave a comment:


  • bradyounie
    started a topic Compile errors in a MIDL generated _i.c file
    in C

    Compile errors in a MIDL generated _i.c file

    I have a C++ COM project that was created with Visual C++ 6. I have just converted the project to Visual Studio 2005 and have been trying to build it. I get the following compile errors:

    Code:
    warning C4290: C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
    error C2143: syntax error : missing ';' before '__uuidof'
    error C2059: syntax error : '__uuidof'
    error C2143: syntax
    ...
    See more | Go to post

  • Well, that's a good point. At least, it will let me see if the library does what I need it to do. If it does, then I can decide if it's worth the fee. This is for a commercial product, so if I do decide to use it, I will pay the fee.

    Most of them have a trial version, so I might just go with that....
    See more | Go to post

    Leave a comment:


  • There seems to be a bunch of commercial solutions that would do what I want, but they're expensive, and I don't have the budget for that. I was hoping there'd be something on SourceForge, but no such luck.

    Thanks anyway....
    See more | Go to post

    Leave a comment:


  • Ultimately, what I need is to get each page of the PDF as an image (like a Bitmap object) that I can then draw things on top of and print. Basically, my app will use a user-selected PDFs as a backdrop for other stuff that they place on the page....
    See more | Go to post

    Leave a comment:


  • Is there a .Net PictureBox control that can show PDFs?

    I have an application that displays a user-supplied image as part of what the app does. I need to include a PDF as a supported image type.

    Is there a PictureBox or some control that can show PDFs? The AxAcroPDF COM control comes close, but I need to be able to access a page of the PDF as a Bitmap object, which I haven't been successful at with AxAcroPDF.
    See more | Go to post

  • I need a library for extracting PDF pages as Bitmaps

    I have an application that loads image files into Bitmap objects and displays them as part of the app's operation. Currently, C# lets you load a variety of file types into Bitmap objects off the shelf, such as BMP, JPG, PNG, TIF, and so on.

    I want to be able to load a PDF and have individual pages be converted to Bitmap objects so that I can support that too.

    Is there a library out there that lets you do that? I've been...
    See more | Go to post

  • I solved it! I have a PictureBox holding my overlaying picture, and I use a custom Panel-derived class with special code to make the transparency work. It works like a charm and I was able to delete a lot of the code I was using to do the refreshes of the image.

    Thanks for your help!
    See more | Go to post

    Leave a comment:


  • Actually, I was displaying my image on the Form itself, and Refresh will only reset the image back to 0, 0, no matter how far over I've scrolled. In other words, I guess I can't use Form.Background Image if I want to be able to use the scroll bars to show parts of the image that are off the screen.

    So, now I'm using a PictureBox, which I had done before. The problem with that is that any controls that I place on top of the PictureBox...
    See more | Go to post

    Leave a comment:


  • Scrolling a Form with ScrollBars causes background image to mess up

    I'm trying to use a Form's BackgroundImage to display the base image that I'm placing controls on top of. To make the form scroll to the bounds of the image, I set the AutoScrollMinSi ze. This works great, except that when I scroll, the image gets all chopped up and doesn't automatically refresh when scrolling is done.

    Is there a way to prevent this problem so that it scrolls smoothly?
    See more | Go to post

  • I think the main problem is that I haven't been able to figure out how to make the PictureBox transparent. Any Bitmap I put on it will always have the standard gray background because that's the BackColor of the PictureBox. I've tried the following, but it did nothing:

    pictureBox2.Bac kColor = Color.Transpare nt;...
    See more | Go to post

    Leave a comment:


  • But on a Form, I would need to put that transparent bitmap onto a control, like a PictureBox and then have that PictureBox sitting on top of the one that has the big image. I found that to appear rather clunky. Is there a way to lay Bitmaps on top of each other without using PictureBox controls?...
    See more | Go to post

    Leave a comment:


  • Writing and moving text on Bitmaps of various resolutions

    I'm writing a program that displays a user-supplied Bitmap and then writes text fields to it. These "text fields" are things that the user can move around on the image, but to render them efficiently, I draw the text directly to the image. It's faster that way.

    The problem is that right now I have to redraw the original (unwritten-to) bitmap and redraw the text whenever the user moves the text because I haven't figured out...
    See more | Go to post

  • bradyounie
    started a topic Printing 300+ DPI bitmaps in C#
    in .NET

    Printing 300+ DPI bitmaps in C#

    I'm writing an app that displays a bitmap as its background and then draws text on top of it at certain positions based on user interaction. This bitmap/text combination is also sent to the printer when the user chooses to print. I already know how to do all that, except...

    When I try to load and print a full-page bitmap that has a resolution of, say, 300 DPI, it ends up printing huge; so huge in fact, that only the upper-left corner...
    See more | Go to post
No activity results to display
Show More
Working...