CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: mmscg

Page 1 of 9 1 2 3 4

Search: Search took 0.08 seconds.

  1. Replies
    1
    Views
    3,604

    Re: Audio Endpoint Device Removal Detection

    Could someone explain in pseudo code what this line is doing?

    hr = pEnumerator->RegisterEndpointNotificationCallback((IMMNotificationClient*)&pNotify1);

    Specifically this part:...
  2. Replies
    1
    Views
    3,604

    Audio Endpoint Device Removal Detection

    Does anyone have a working example of this http://msdn.microsoft.com/en-us/library/windows/desktop/dd371417(v=vs.85).aspx

    I've tried the code posted here...
  3. Thread: GDI+ and Fat API

    by mmscg
    Replies
    6
    Views
    4,950

    Re: GDI+ and Flat API

    Thank you... you C++ guys are amazing!!

    This works perfectly for me, and should be enough to get me on my way.
    (I'm sure I'll hit a few stumbling blocks, and might have to ask more questions).
  4. Thread: GDI+ and Fat API

    by mmscg
    Replies
    6
    Views
    4,950

    Re: GDI+ and Fat API

    Yes, I had read that, but still being fairly new to C++ I find this very confusing.

    Can one type be cast to another then?

    I have been using GDI+ in my VB6 projects for the last year, and have...
  5. Thread: GDI+ and Fat API

    by mmscg
    Replies
    6
    Views
    4,950

    Re: GDI+ and Flat API

    So are you are saying the Flat Api functions cannot be used in C++,
    or just that using the wrapper method is easier?

    I added

    using namespace Gdiplus:: DllExports;

    to my code and I now get...
  6. Thread: GDI+ and Fat API

    by mmscg
    Replies
    6
    Views
    4,950

    GDI+ and Flat API

    I am trying to figure out how to call a GDI+ Flat Api function, but cannot get anything working.

    Here is my code:


    #include <windows.h>
    #include <objidl.h>
    #include <gdiplus.h>
    #include...
  7. Replies
    3
    Views
    4,001

    Re: GDI+ and Rubberband/Selection Rectangle

    I for some reason didn't think you could mix GDI and GDI+

    Curiosity then, this cannot be done using GDI+ alone?
  8. Replies
    3
    Views
    4,001

    GDI+ and Rubberband/Selection Rectangle

    I cannot find how to draw a simple selection rectangle (rubberband) using
    GDI+.

    This should be a simple thing, but I'm beginning to wonder if it is even possible.
  9. Replies
    4
    Views
    1,962

    Re: [gdi+] DrawImage to specified size

    If I set the last parameter of the GdipDrawImageRectRect function to UnitInch I get a Not Implemented error

    If I do as below I get proper drawing except not to the specified dimension (want 1" X...
  10. Replies
    4
    Views
    1,962

    Re: [gdi+] DrawImage to specified size

    Thanks for the suggestion.

    I tried that; I get an error when GdipDrawImageRectRect executes
    (and obviously nothing gets drawn).
  11. Replies
    4
    Views
    1,962

    [gdi+] DrawImage to specified size

    I am trying to draw a bitmap on the screen 1" X 1.5" using this code:



    status = GdipDrawImageRectRect(graphics, image, _
    0, 0, 1, 1.5 , _
    ...
  12. Replies
    5
    Views
    4,512

    Re: Rotating Object About Center Using GDI++

    OK, I tried your code and it works perfectly to rotate the image about the center.

    It draws the rotating bitmap with top left corner at (0, 0) on my form.

    I tried moving the top left corner of...
  13. Replies
    5
    Views
    4,512

    Re: Rotating Object About Center Using GDI++

    Thanks Chris_F

    I think I understand what you are saying.

    I will try later and see if it works for me like I think it should.
  14. Replies
    5
    Views
    4,512

    Rotating Object About Center Using GDI++

    I am trying to rotate a bitmap about it's center point.
    The bitmap I am using in my test project is 200 X 200 pixels.

    By trial and error, I came up with the following. It works, but I don't...
  15. Replies
    8
    Views
    1,007

    Re: Declaring an object using the "new" keyword

    Yes I used delete with the new method of declaration...
    don't know if I used it correctly, but there were no compile errors or warnings.

    Yes I've seen that Hello World program before.

    With...
  16. Replies
    8
    Views
    1,007

    Re: Declaring an object using the "new" keyword

    Thanks ovidiucucu, both of your methods work... code successfully produces a metafile. :D

    While we are on the subject of new, when might it be necessary to declare something this way?

    Also, I...
  17. Replies
    8
    Views
    1,007

    Re: Declaring an object using the "new" keyword

    I am trying to use GDI+ to create the metafile (file that contains all instructions to render a vector image).
  18. Replies
    8
    Views
    1,007

    Declaring an object using the "new" keyword

    The following line of code won't compile (I copied it from MSDN)
    myMetafile = new Metafile(L"MyDiskFile.emf", hdc);

    I get this error:
    error C2065 'myMetafile' : undeclared identifier

    I've...
  19. Replies
    4
    Views
    1,077

    Re: Printing a String

    Changing the specifier in fprintf works with your suggestion... Thanks!



    FILE *fp2;
    fp2 = fopen("output2.txt", "w");
    fprintf(fp2, "dwBytesRecorded = %d\n", lpBuffer[0].dwBytesRecorded);
    ...
  20. Replies
    4
    Views
    1,077

    Re: Printing a String

    Thanks for offering some help.

    Still not getting the results I expect.

    fprintf(fp, "[%d] <%s>\n", j, lpBuffer[0].lpData);
    returns
    [0] <>
    [1] <>
    [2] <>
    [3] <>
  21. Replies
    4
    Views
    1,077

    Printing a String

    I am trying to print the contents of a buffer LPMIDIHDR lpBuffer

    I am after the lpData member, and since it is declared as LPSTR

    I tried doing it this way:


    fprintf(fp,"lpBuffer =...
  22. Replies
    20
    Views
    8,007

    Re: Printing to Default Printer

    I should add, the program operates properly for both type 0 and type 1 MIDI files,
    it is just my printing code that causes problems.
  23. Replies
    20
    Views
    8,007

    Re: Printing to Default Printer

    I am making progress with printing to a file, but have run into a problem that I don't understand.

    I am trying to read a MIDI file and print out the contents.

    The code below works for standard...
  24. Replies
    20
    Views
    8,007

    Re: Printing to Default Printer

    Works perfect!

    I coudn't get the cout to work, but I did it with fprintf.

    Thanks!
  25. Replies
    20
    Views
    8,007

    Re: Printing to Default Printer

    With regards to the code/output in Post #11, I would like output as so:


    lpEvent->nData = 8
    lpEvent->lpData = <untitled««««««««>
    char 1 = u = hex = 75
    char 2 = n = hex = 6E
    char 3...
Results 1 to 25 of 204
Page 1 of 9 1 2 3 4





Click Here to Expand Forum to Full Width

Featured