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
F

fferland

@fferland
About
Posts
8
Topics
8
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Localization tools
    F fferland

    I'm writing a program in Visual C++ and I'm looking for a localization tool to help me with internationalization. Anyone knows of a good *free* localization tool? I need one that allows me to see the english text and translate it in another language in another column. I also need the tool to allow adding new strings to the list (I've seen some that only let you translate what's already there). Any suggestion?

    C / C++ / MFC c++ tools help question

  • Overloading operator=( )
    F fferland

    I'm trying to better understand how operator=() overloading works. I have the following code:

    CBase* pB1 = new CDerived( 1, 2 );
    CBase* pB2 = new CDerived( 10, 20 );
    *pB1 = *pB2;

    The first argument to the CDerived constructor is assigned to a data member in CBase and the second argument is assigned to a data member in CDerived. I have overloaded operator=() for both CBase and CDerived like this:

    CBase& operator=( const CBase& src )
    {
    m_nBaseData = src.m_nBaseData;
    return *this;
    }

    CDerived& operator=( const CDerived& src )
    {
    m_nDerivedData = src.m_nDerivedData;
    return *this;
    }

    When I wrote *pB1 = *pB2; (like in the code above), I was expecting both operator=() functions to be called and thus both the CBase data member and the CDerived data member to be copied. However, my pointers being pointers to CBase rather that CDerived, only the CBase::operator=() function was called, resulting in a partial copy of the derived object. I tried making both functions virtual, but the result was the same. The only way I found that resulted in a complete copy is by making my pointers CDerived pointers and adding the following line at the beginning of CDerived::operator=():

    *(CBase*)this = (const CBase&)src;

    Unfortunately, this is not a good solution since it is quite common that I need to store pointers to a base class without knowing exactly what the object is. So, my question is did I miss something somewhere? Is there a way to have objects copy completely with pointers to their base class? Thanks!

    C / C++ / MFC question

  • Free library that handles sending e-mail?
    F fferland

    I'm looking for a library that I could use to write a small program that only sends e-mails (no reading). Can anyone suggest one? Thanks!

    C / C++ / MFC question

  • Detecting when an internet connection is active
    F fferland

    I need to know how I can detect whether the user currently has an active internet connection. Can anyone help? I've tried InetIsOffline(), but that only determines if the user is in online or offline mode, not if the actual connection is currently active.

    C / C++ / MFC help question

  • Using SourceSafe's file comparison feature externally?
    F fferland

    I like SourceSafe's file comparison feature and the way it displays differences much better than other products such as WinDiff. Unfortunately, we'll be dropping SourceSafe for something else for our next project, and we'll have to use WinDiff or whatever else we can find that does an ok job. My question is: if I leave my copy of SourceSafe on my computer, is there a way I could somehow use the VSS protocol (or whatever else) from a program that I would write in order to use SourceSafe's file comparison feature? Would it be possible to compare two local files or would I need to add the file to SourceSafe first? Thanks for any information you can provide! :)

    C / C++ / MFC question career

  • How do I handle "enter" key in a listbox?
    F fferland

    I have a dialog with two listboxes in it. I want my listboxes to do something when the "enter" key is pressed. The LBN_* messages listed in the ClassWizard are of no help. I tried responding to WM_KEYUP/DOWN messages from the parent dialog, but the didn't work either. How can I know when the user hits "enter" from a listbox?

    C / C++ / MFC question help

  • Changing the font used to draw tabs in CPropertyPage
    F fferland

    I have a CPropertySheet object that has four CPropertyPages attached to it. How can I have the tab control of one page display as bold text and the others as normal text? Also, can this be changed dynamically at any time or can it only be done when my dialog is initialized? Thanks!

    C / C++ / MFC question

  • How do I toggle the "password" style for an edit box?
    F fferland

    This should be a simple question... :) I have an edit box (with the 'password' style set in my resource file) in a dialog that I'd like to use to display either passwords (******) or normal, readable text. I need this behaviour to change dynamically. I tried adding/removing the ES_PASSWORD style from the control, but that didn't work. The edit box still displayed asterisks. How can I get the desired result? Thanks!

    C / C++ / MFC question learning
  • Login

  • Don't have an account? Register

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