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. ATL / WTL / STL
  4. Some WTL - to MFC conversion help

Some WTL - to MFC conversion help

Scheduled Pinned Locked Moved ATL / WTL / STL
c++helpquestioncomtutorial
2 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.
  • A Offline
    A Offline
    Ajnstajn
    wrote on last edited by
    #1

    Hi respected ATL/WTL/STL people, I need your heeeeeeeelp at once. 1. Tell me, or send me a good wtl tutorial, especially if it contains a comparison between usage of MFC and WTL. or 2. If this look shorter and easier for u, first listen to this and then send me needed answers I need to convert a program from MFC to WTL. 2.1. How should I write this MFC code: SetFont(GetStockFont(DEFAULT_GUI_FONT)); in WTL ? It always tells me: error C3861: 'GetStockFont': identifier not found, even with argument-dependent lookup 2.2. What about this? : CWnd* pWndOwner = GetOwner(); How should THIS ^ MFC line be written in WTL ? 2.3. What does this means and what should I do if it writes to me: error C3861: 'ASSERT': identifier not found, even with argument-dependent lookup That's it Would you be so kind to help me out with this? Please send me the answer for me first and/or my second question at my e-mail: vuchko_@hotmail.com Thank you very much for your help and for your time Greatfull Ajnstajn:-D

    J 1 Reply Last reply
    0
    • A Ajnstajn

      Hi respected ATL/WTL/STL people, I need your heeeeeeeelp at once. 1. Tell me, or send me a good wtl tutorial, especially if it contains a comparison between usage of MFC and WTL. or 2. If this look shorter and easier for u, first listen to this and then send me needed answers I need to convert a program from MFC to WTL. 2.1. How should I write this MFC code: SetFont(GetStockFont(DEFAULT_GUI_FONT)); in WTL ? It always tells me: error C3861: 'GetStockFont': identifier not found, even with argument-dependent lookup 2.2. What about this? : CWnd* pWndOwner = GetOwner(); How should THIS ^ MFC line be written in WTL ? 2.3. What does this means and what should I do if it writes to me: error C3861: 'ASSERT': identifier not found, even with argument-dependent lookup That's it Would you be so kind to help me out with this? Please send me the answer for me first and/or my second question at my e-mail: vuchko_@hotmail.com Thank you very much for your help and for your time Greatfull Ajnstajn:-D

      J Offline
      J Offline
      Jason De Arte
      wrote on last edited by
      #2

      Ajnstajn wrote: 1. Tell me, or send me a good wtl tutorial Check out Michael Dunn's excelent series of "WTL for MFC Programmers" articles http://codeproject.com/wtl/wtl4mfc1.asp[^] Ajnstajn wrote: GetStockFont(DEFAULT_GUI_FONT)); You could try AtlGetStockFont(DEFAULT_GUI_FONT); If you look at it's source in atlmisc.h, you see that it's just a wrapper for ::GetStockObject() Ajnstajn wrote: 2.2. What about this? : CWnd* pWndOwner = GetOwner(); How should THIS ^ MFC line be written in WTL ? Well looking at the MFC source (it's always a good thing to install the MFC source when installing devstudio - you'll never know what you'll learn) CWnd::GetOwner looks like this

      _AFXWIN_INLINE CWnd* CWnd::GetOwner() const
      { return m_hWndOwner != NULL ? CWnd::FromHandle(m_hWndOwner) : GetParent(); }

      Depending on your situation, you could probably replace it with someing like CWindow wndOwner = GetParent(). Presuming that you are in a CWindow object ;-) Ajnstajn wrote: 'ASSERT': identifier not found Use ATLASSERT But seriously, check out Michael Dunn's articles, there all found in the WTL section here on CodeProject http://codeproject.com/wtl/index.asp#Beginners[^] You'll learn a lot. [ Jason De Arte | Toy Maker | 1001010.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