Thread: Help with Combo Box that closes my program

  1. #1
    Registered User
    Join Date
    Jan 2003
    Posts
    118

    Help with Combo Box that closes my program

    Hello, I just recently started programming with MFCs in visual C++ .NET

    So I have this program where you select an item from a combo box and it saves it as a string, the problem is that when I call UpdateData(FALSE) my program shuts down... does anyone have any idea why this could be? Im sorry about being so vague but as I said I just started and dont really know how it works.

    EDIR: It happens when I pass FALSE not TRUE.
    Last edited by Marcos; 06-03-2005 at 07:35 PM.
    Why drink and drive when you can smoke and fly?

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    At this point, you know how it works way more than we do.

    Attach the source file that contains the UpdateData() statement.

    gg

  3. #3
    Registered User
    Join Date
    Jan 2003
    Posts
    118
    Its in the void CCRReaderGUIDlg::OnBnClickedConvert() method.
    But it will happen anytime I call UpdateData(FALSE) anywhere.

    The Combo Box stores the string in m_strAcolor.
    Why drink and drive when you can smoke and fly?

  4. #4
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    Could be that...

    UpdateData(FALSE) calls the your OnInitDialog().

    Your OnInitDialog() calls UpdateData(FALSE)

    which ......
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. making a program leave a msg for background program when it closes
    By superflygizmo in forum Windows Programming
    Replies: 2
    Last Post: 02-06-2006, 07:44 PM
  2. Dialog Box Problems
    By Morgul in forum Windows Programming
    Replies: 21
    Last Post: 05-31-2005, 05:48 PM
  3. New Theme
    By XSquared in forum A Brief History of Cprogramming.com
    Replies: 160
    Last Post: 04-01-2004, 08:00 PM
  4. Capturing 'enter' key in combo box
    By Robert602 in forum Windows Programming
    Replies: 6
    Last Post: 11-17-2002, 06:46 AM
  5. combo box
    By monkeymon in forum Windows Programming
    Replies: 1
    Last Post: 05-21-2002, 03:50 AM