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. how can use MFC in a non MFC win32 project

how can use MFC in a non MFC win32 project

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++
11 Posts 5 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.
  • A Offline
    A Offline
    Atif Mushtaq
    wrote on last edited by
    #1

    what steps i will have to do before i could use MFC in a win32 non mfc project. Unmanaged in a .NET world

    R J P A 4 Replies Last reply
    0
    • A Atif Mushtaq

      what steps i will have to do before i could use MFC in a win32 non mfc project. Unmanaged in a .NET world

      R Offline
      R Offline
      Robert A T Kaldy
      wrote on last edited by
      #2

      Why????? Isn't much simpler to use Win32 source files in MFC project? Robert-Antonio "A flower walked around a meadow. She saw a beatiful human and plucked off his head."

      A 1 Reply Last reply
      0
      • R Robert A T Kaldy

        Why????? Isn't much simpler to use Win32 source files in MFC project? Robert-Antonio "A flower walked around a meadow. She saw a beatiful human and plucked off his head."

        A Offline
        A Offline
        Atif Mushtaq
        wrote on last edited by
        #3

        Well i know it can be that way aswell , but i am more intrested in this cauz i have quite a few win32 projects (not written by me) and i want to extend them with MFC . So still my question is same Unmanaged in a .NET world

        1 Reply Last reply
        0
        • A Atif Mushtaq

          what steps i will have to do before i could use MFC in a win32 non mfc project. Unmanaged in a .NET world

          J Offline
          J Offline
          JGStanier
          wrote on last edited by
          #4

          Don't you just include the appropriate MFC header files (see StdAfx.h of standard MFC project)?:cool:

          A 1 Reply Last reply
          0
          • J JGStanier

            Don't you just include the appropriate MFC header files (see StdAfx.h of standard MFC project)?:cool:

            A Offline
            A Offline
            Atif Mushtaq
            wrote on last edited by
            #5

            If I Include all MFC Headers file it gives in linking error "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in LIBCMT.lib(new.obj) when compiming in MFC Statis Library mode Unmanaged in a .NET world

            J 1 Reply Last reply
            0
            • A Atif Mushtaq

              what steps i will have to do before i could use MFC in a win32 non mfc project. Unmanaged in a .NET world

              P Offline
              P Offline
              Prakash Nadar
              wrote on last edited by
              #6

              Belive me its a pain to convert win32 application to MFC application its not as easy as including few header files and thats it. Besides ur current win32 logic may stop functioning or give unexected error coz both are off different architecture. and besides there nothing much that MFC can do that win32 can't. :)


              MSN Messenger. prakashnadar@msn.com

              A 1 Reply Last reply
              0
              • A Atif Mushtaq

                If I Include all MFC Headers file it gives in linking error "void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in LIBCMT.lib(new.obj) when compiming in MFC Statis Library mode Unmanaged in a .NET world

                J Offline
                J Offline
                JGStanier
                wrote on last edited by
                #7

                Sorry, don't know then. Was wondering how to include MFC into Win32 myself. I think it may be best to create an MFC project, and then put or link all your Win32 stuff in there. Only option I can think of.:)

                1 Reply Last reply
                0
                • P Prakash Nadar

                  Belive me its a pain to convert win32 application to MFC application its not as easy as including few header files and thats it. Besides ur current win32 logic may stop functioning or give unexected error coz both are off different architecture. and besides there nothing much that MFC can do that win32 can't. :)


                  MSN Messenger. prakashnadar@msn.com

                  A Offline
                  A Offline
                  Atif Mushtaq
                  wrote on last edited by
                  #8

                  Well I have solved this issue 1.First of include all headers files present in a MFC project stdafx.h 2.Go to Project --Settings ---General and select either MFC in shared library or MFC in static Library Option 3.In static library option it will give the already defined linking error to solve this issue follow this link and do the apropriate steps as given in this link http://www.as-ltd.co.uk/cgi-bin/support/faq/XLPFAQ004.htm after it include stdafx.h where u want to use MFC. Unmanaged in a .NET world

                  P 1 Reply Last reply
                  0
                  • A Atif Mushtaq

                    what steps i will have to do before i could use MFC in a win32 non mfc project. Unmanaged in a .NET world

                    A Offline
                    A Offline
                    Anonymous
                    wrote on last edited by
                    #9

                    #include or #include After that, the MFC classes should be available to your application.

                    A 1 Reply Last reply
                    0
                    • A Anonymous

                      #include or #include After that, the MFC classes should be available to your application.

                      A Offline
                      A Offline
                      Anonymous
                      wrote on last edited by
                      #10

                      Sorry... that is #include or #include

                      1 Reply Last reply
                      0
                      • A Atif Mushtaq

                        Well I have solved this issue 1.First of include all headers files present in a MFC project stdafx.h 2.Go to Project --Settings ---General and select either MFC in shared library or MFC in static Library Option 3.In static library option it will give the already defined linking error to solve this issue follow this link and do the apropriate steps as given in this link http://www.as-ltd.co.uk/cgi-bin/support/faq/XLPFAQ004.htm after it include stdafx.h where u want to use MFC. Unmanaged in a .NET world

                        P Offline
                        P Offline
                        Prakash Nadar
                        wrote on last edited by
                        #11

                        Too good man too good.:)


                        MSN Messenger. prakashnadar@msn.com

                        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