CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Just simple !!

  1. #1
    Guest

    Just simple !!

    In my MFC application i want to use a global function , that's all my files should be able to access it , where i declare/ define
    thanx in advance



  2. #2
    Join Date
    May 1999
    Posts
    7

    Re: Just simple !!

    Just make your ownn header file and ad the function there.
    Then include the headerfile you jsut made in those files which will
    use it.
    Is that simple enought?
    I hope it helps.

    Feel free to mail me if it doesn´t work.
    [email protected]


  3. #3
    Join Date
    May 1999
    Location
    Farnborough, Hants, England
    Posts
    710

    Re: Just simple !!

    Don't make it global, put it as a public member function of your app class (CMyApp, or whatever). As theApp (the global variable which starts the app running) can be accessed from anywhere, define theApp as an external variable in the app's header file, then just include the app's header file (new classes generated by ClassWizard do this automatically), and you can access this function.

    Follow that?



    --
    Jason Teagle
    [email protected]

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