when clicked load file

This is a discussion on when clicked load file within the Windows Programming forums, part of the Platform Specific Boards category; how do you get the file to load when you click on the menu item...

  1. #1
    Registered User
    Join Date
    Oct 2002
    Posts
    10

    when clicked load file

    how do you get the file to load when you click on the menu item

  2. #2
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,600
    Um, with several lines of code.

    Show us what you've got.
    Code:
    if( numeric_limits< byte >::digits != bits_per_byte )
        error( "program requires bits_per_byte-bit bytes" );
    24bbs.cpp

  3. #3
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    You catch the message (WM_COMMAND), verify that it's the correct menuitem that was pressed (LOWORD(wParam) == IdFileOpen), then call a function that loads the actual file. Eventually calling a dialog to select the file you want to load.
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  4. #4
    Registered User
    Join Date
    Oct 2002
    Posts
    10
    actually i wan't it to open one certain file every time that it is clicked
    Andrew Ferguson!

  5. #5
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,856
    Try pasting in some more code from other people tutorials rather than spending time ACTUALLY learning how to write the code from scratch.

    Or

    Continue to post threads in the vain hope someone who has spent the time learning will take pity on you and spend time doing yo work
    "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

  6. #6
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    Originally posted by andrewjf9
    actually i wan't it to open one certain file every time that it is clicked
    Use file streams (ifstream). If you don't know it, there is a tutorial on this site.
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need Help Fixing My C Program. Deals with File I/O
    By Matus in forum C Programming
    Replies: 7
    Last Post: 04-29-2008, 07:51 PM
  2. help with text input
    By Alphawaves in forum C Programming
    Replies: 8
    Last Post: 04-08-2007, 04:54 PM
  3. Simple File encryption
    By caroundw5h in forum C Programming
    Replies: 2
    Last Post: 10-13-2004, 10:51 PM
  4. System
    By drdroid in forum C++ Programming
    Replies: 3
    Last Post: 06-28-2002, 10:12 PM
  5. Need a suggestion on a school project..
    By Screwz Luse in forum C Programming
    Replies: 5
    Last Post: 11-27-2001, 01:58 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21