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

Search:

Type: Posts; User: jmc_mod

Page 1 of 2 1 2

Search: Search took 0.13 seconds.

  1. Replies
    4
    Views
    1,350

    In answer to your first question, I don't want to...

    In answer to your first question, I don't want to say absolutely yes without looking at any code, but from the result of those two memory differences it does appear like you fixed that memory leak.
    ...
  2. Replies
    4
    Views
    545

    The number is 0xfffffd08. The U forces the...

    The number is 0xfffffd08.
    The U forces the number to be Unsigned.
    Why? The notification codes are stored within a 32bit unsigned integer. By default, the compiler would have seen this as a...
  3. Replies
    2
    Views
    2,579

    If you are interested in internationalization,...

    If you are interested in internationalization, then yes, you should be thinking about Unicode, and the earlier you do, the easier it will be.

    When using TCHARs, you select at compile time whether...
  4. Replies
    7
    Views
    1,068

    Are you sure its not just being created...

    Are you sure its not just being created unexpanded? Did you try double clicking on the root node?
  5. I think his confusion is because he is looking at...

    I think his confusion is because he is looking at both MFC and raw Win32 and thinking they are the same api.

    The Win32 API methods always use handles:
    HWND - handle to a window
    HDC - handle to...
  6. Microsoft's C++ compiler processes function...

    Microsoft's C++ compiler processes function parameters right-to-left when pushing them onto the stack, so the KK that you were curious about is actually the first thing that is processed when...
  7. Replies
    1
    Views
    669

    If you look at the actual make up of the class, I...

    If you look at the actual make up of the class, I believe you will find that instead of keeping the entire function table, it just keeps a pointer to a function table. This saves memory because each...
  8. Replies
    4
    Views
    3,395

    BSTRs are the typical method used to pass strings...

    BSTRs are the typical method used to pass strings around in COM. There are a set of functions for dealing with BSTRS: SysAllocString, SysFreeString, SysAllocStringLen, etc.
    Since you are in MFC,...
  9. Thread: memory leak

    by jmc_mod
    Replies
    3
    Views
    1,318

    I think the main problem is the fact that you are...

    I think the main problem is the fact that you are allocating an entire tree of wordEntry's, but it appears that you are only deleting the root entry.
    Now, I believe your current code will work fine...
  10. Replies
    4
    Views
    3,395

    The XMLDocument is an older XML parser, you want...

    The XMLDocument is an older XML parser, you want do create the DOMDocument parser. To do this, change the CLSID from CLSID_XMLDocument to CLSID_DOMDocument.

    Also, you mentioned that you were in...
  11. Thread: com

    by jmc_mod
    Replies
    5
    Views
    724

    CLSIDFromProgID does a lookup in the registry...

    CLSIDFromProgID does a lookup in the registry based on the name you passed in. If that name isn't in the registry, it will fail.
    Chances are, the object you are trying to create has not been...
  12. Replies
    5
    Views
    1,290

    First, SetLocale sets a language identifier, you...

    First, SetLocale sets a language identifier, you really should not be calling it, at least in the method that you are currently using.

    Second, as far as I know, ON_CBN_* cannot be used to handle...
  13. Replies
    2
    Views
    619

    First, let me say that simply defining messages...

    First, let me say that simply defining messages with a hard coded number, is usually a bad idea.
    I would suggest using RegisterWindowMessage, that way, you know your message is unique, and will not...
  14. No, InvokeHelper will not let you call any method...

    No, InvokeHelper will not let you call any method that isn't explicitly defined by their OCX.
    The dispatch identifier that you pass into InvokeHelper is only unique to that specific object. Note...
  15. Replies
    5
    Views
    1,290

    First, let me say that using 'WM_USER+1' as a...

    First, let me say that using 'WM_USER+1' as a control ID, although I'm sure it works, is not really the best idea. WM_* is for windows messages, that parameter is a control ID. I would suggest...
  16. I was staying consistant with previous posts, bmp...

    I was staying consistant with previous posts, bmp is the BITMAP structure you retrieved from GetObject.
    GetBitmapBits is a Window's GDI call. CBitmap, like much of MFC, is a wrapper around a set of...
  17. Are you familiar with Spy++? It should be...

    Are you familiar with Spy++? It should be installed with Visual Studio, and it allows you to look at all of a program's windows, and analyze their styles, and track all their messages.
    With regards...
  18. Shoot, I just did a little more reading, and...

    Shoot, I just did a little more reading, and apparently GetObject doesn't set that value. After you call that function, you have to allocate a buffer to hold the bitmap and call GetBitmapBits.


    ...
  19. Well, part of his question was: "How do I capture...

    Well, part of his question was: "How do I capture WM_MOUSEMOVE while over the caption?"
    You are correct though, it is not the best solution, but it will work. I know MFC does set the cursor on mouse...
  20. Hmm, I'm not sure why that would have failed,...

    Hmm, I'm not sure why that would have failed, unless for some reason it didn't return the bits of the bitmap.

    As for handling the colors, I'm not very familiar with that.
    You might want to...
  21. nMaxX and nMaxY are the width/height of your...

    nMaxX and nMaxY are the width/height of your bitmap.

    bmp.bmWidthBytes is the width of each row. So row Y starts at byte Y * bmp.bmpWidthBytes. Additionally, moving from a position in one row, to...
  22. Replies
    3
    Views
    584

    Before you ask about this problem again, I would...

    Before you ask about this problem again, I would suggest running regsvr32 through the debugger. It should at the very least give you more information about the problem you are having.
    To do this,...
  23. Replies
    6
    Views
    971

    No, there are almost always alternatives, I...

    No, there are almost always alternatives, I believe that method is the most straightforward. You could define the variable as a static member of a class, or define it as a static member of a...
  24. Well, I will give it a shot, but its been a long...

    Well, I will give it a shot, but its been a long time since I've written anything that played around with pixels like this, so this is just off the top of my head.


    BYTE* pbPixels = (BYTE*)...
  25. You should recieve WM_NCMOUSEMOVE messages while...

    You should recieve WM_NCMOUSEMOVE messages while the mouse is over a windows border/caption. Unfortunately, this message is also fired when the users are over the borders of the window. If you only...
Results 1 to 25 of 30
Page 1 of 2 1 2





Click Here to Expand Forum to Full Width

Featured