Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Building MFC extension problem

Building MFC extension problem

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++asp-nethelp
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    Wenrich
    wrote on last edited by
    #1

    I've finished a socket application and am trying to build the core part of the application into a DLL. the "core part" includes CMySocket class derived from CAsyncSocket, and some other helper classes. CMySocket stores a pointer to a CMainFrame object, which has proper functions that handle events occuring on the socket. The main purpose of writing this DLL is to make the CMySocket class easy to be reused for future applications. I want to define the handler function prototypes that the future applications would follow. I don't want to restrict the pointer to a CMainFrame object, rather it can be pointing to any CWnd-like object, which would allow more flexibility. My question is: since CMySocket needs a pointer to a CWnd to call proper handlers when events occuer, how can I get rid of the implementation of the functions and hence the CWnd-like class? (I don't think deriving a class from CWnd is a good idea; if so, that means the applications need to derived another new class from that one. Is it?) This is the first i ever try to build a DLL. Any hint is strongely welcome. (btw, the DLL would be an MFC extention DLL) Thank you so much! Wenrich

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups