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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Using Static Lib For Creating the MFC Controls

Using Static Lib For Creating the MFC Controls

Scheduled Pinned Locked Moved C / C++ / MFC
c++
3 Posts 2 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.
  • L Offline
    L Offline
    lavate malllik
    wrote on last edited by
    #1

    Hi, I have created a LIB using Win32 Static Library in which i have overriden the CWnd ::Create method. when i use this LIB in MFC application to create the Window its giving ASSERSETION due to parent window handle is becoming NULL.

    M 1 Reply Last reply
    0
    • L lavate malllik

      Hi, I have created a LIB using Win32 Static Library in which i have overriden the CWnd ::Create method. when i use this LIB in MFC application to create the Window its giving ASSERSETION due to parent window handle is becoming NULL.

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      Window handles don't just "become NULL". The problem could be anything from mismatched or multiple MFC libraries to errors in your code. Have you tried to debug it? Mark

      Mark Salsbery Microsoft MVP - Visual C++ :java:

      L 1 Reply Last reply
      0
      • M Mark Salsbery

        Window handles don't just "become NULL". The problem could be anything from mismatched or multiple MFC libraries to errors in your code. Have you tried to debug it? Mark

        Mark Salsbery Microsoft MVP - Visual C++ :java:

        L Offline
        L Offline
        lavate malllik
        wrote on last edited by
        #3

        Hi, I have created the Win32 Static Library which has MFC Support and Using Precompiled Header (This LIB has been created by selecting Win32 Static Library from MFC Project Option ) I have added one class to library which is derived from CWnd, In Derived Class i have overriden the Create()method to create the window. At Application side I have MFC SDI application which has multiple splitters where each pane of splitter corrsoponds to one class. One of the class wants to create the window using the LIB that i have created. when i give call to the Create from application side it is giving assertion on ASSERT(afxCurrentInstanceHandle != NULL) To Test LIB,i have tried for following things I have created the TestApp using MFC SDI and while generating the Application CTestView is derived from the CFormView. here call to Create of LIB is working fine.

        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