CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2000
    Posts
    17

    MFC Static link vs MFC Shared DLL Issues

    My program is behaving differently when I link with MFC statically vs. when I link with MFC as a shared DLL. (In both cases I an using a debug build, so this is not a debug/release issue.)

    The first issue I noticed is with the CRectTracker. When I use a RectTracker while linking with a shared DLL everythink works correctly. The cursor changes when over the rect to a cross and the user can move the rect around the screen. But, when linking with with static MFC the rect tracker does not behave correctly. After the rect tracket is displayed, moving the cursor over the rect makes the cursor disapear. It does not change to the cross, it just disappears when over the tracking rect.

    Any ideas what I can be doing wrong? Any ideas why this is and what I can do about it? Thanks!

    Craig Smith

  2. #2
    Join Date
    Sep 2002
    Location
    DC Metro Area, USA
    Posts
    1,509
    Your best bet would be to post a small sample project that displays this behavior. As it is, I'm not even sure where to begin guessing...
    bytz
    --This signature left intentionally blank--

  3. #3
    Join Date
    Nov 2002
    Location
    a village near Krasnodar, Russia
    Posts
    11

    Cool Re: MFC Static link vs MFC Shared DLL Issues

    >Any ideas what I can be doing wrong? Any ideas why this is and what I can do about it? Thanks!

    >Craig Smith
    Hi Craig, you were doing nothing wrong. What happened is Microsoft acknowledged Bug
    "BUG: BLOCKS32 Sample Fails to Show Cursors when Linked to MFC"
    http://support.microsoft.com/kb/208856
    Resolution:
    Find and comment or delete a line in YourProject.rc file

    #define _AFX_NO_TRACKER_RESOURCES

    and all will work fine.
    I have spend a week trying to find the reason . I regret that the post is very old and my answer will not be needed most probably .
    "run rabbit, run, dig that hole..."

  4. #4
    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    3,654

    Re: MFC Static link vs MFC Shared DLL Issues

    Good post in some way Sasha but these days most programmers have abandoned VS6 for something more compliant.
    Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible, you are, by
    definition, not smart enough to debug it.
    - Brian W. Kernighan

    To enhance your chance's of getting an answer be sure to read
    http://www.codeguru.com/forum/announ...nouncementid=6
    and http://www.codeguru.com/forum/showthread.php?t=366302 before posting

    Refresh your memory on formatting tags here
    http://www.codeguru.com/forum/misc.php?do=bbcode

    Get your free MS compiler here
    https://visualstudio.microsoft.com/vs

  5. #5
    Join Date
    Sep 2002
    Location
    DC Metro Area, USA
    Posts
    1,509

    Re: MFC Static link vs MFC Shared DLL Issues

    Wow, this thread died years ago, I'm surprised that anyone would post to it.
    bytz
    --This signature left intentionally blank--

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured