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. C / C++ / MFC
  4. Another Question under MFC...

Another Question under MFC...

Scheduled Pinned Locked Moved C / C++ / MFC
c++questiondata-structurestutorial
4 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.
  • N Offline
    N Offline
    NewbieStats
    wrote on last edited by
    #1

    I have made a program using Microsoft Visual C++ 6.0 using MFC app, and ive decided to "enhance" it... Its basically a "blog" or "journal" in a way... I was wondering whats the easiest way if someone clicks on "save" (i have it set to save to folder as (date).txt and inside is the entry... But i was thinking about using a Tree for the folder to easily access all journal entries... What would be the easiest way to access all the journal entries added using the same program? Possibilities; 1) OnSave, saves file to folder and somehow automatically save title to a ComboBox that'll allow you to click on it and allow entry to be viewed... 2) Tree, having tree set to that folder only allowing user to click on file wanted and having it open entry like combobox idea... Im queued... I dont know how to use the Tree control, all tutorials ive found are based around C:\\ (a tree for full harddrive with 2 classes and millions of files)... Is there a way to make it so that a user can view past save's in a combo box and being allowed to click on date to view entry? /* Just a Human Trying to Live in a Computers World. */

    B 1 Reply Last reply
    0
    • N NewbieStats

      I have made a program using Microsoft Visual C++ 6.0 using MFC app, and ive decided to "enhance" it... Its basically a "blog" or "journal" in a way... I was wondering whats the easiest way if someone clicks on "save" (i have it set to save to folder as (date).txt and inside is the entry... But i was thinking about using a Tree for the folder to easily access all journal entries... What would be the easiest way to access all the journal entries added using the same program? Possibilities; 1) OnSave, saves file to folder and somehow automatically save title to a ComboBox that'll allow you to click on it and allow entry to be viewed... 2) Tree, having tree set to that folder only allowing user to click on file wanted and having it open entry like combobox idea... Im queued... I dont know how to use the Tree control, all tutorials ive found are based around C:\\ (a tree for full harddrive with 2 classes and millions of files)... Is there a way to make it so that a user can view past save's in a combo box and being allowed to click on date to view entry? /* Just a Human Trying to Live in a Computers World. */

      B Offline
      B Offline
      Blake Miller
      wrote on last edited by
      #2

      Mentally separate the files (data) from your user interface considerations for a moment. Suppose you had something like a calendar control instead, that had a different representation for the days that HAD journal entries. The user could go back and forth a month or year at a time. They could double-click on the day for the journal they wanted to see. Hovering over a date would show a tooltip with the subject of that journal. A sort of 'report view' in this control would perhaps have the date along the left column and the subject in the right column. Anyway, just a different way to think about selecting an entry than a 'tree view'. If your data representation is separate from your user interface, you can experiment with different 'views' of your data without constantly rewriting your program.

      N 1 Reply Last reply
      0
      • B Blake Miller

        Mentally separate the files (data) from your user interface considerations for a moment. Suppose you had something like a calendar control instead, that had a different representation for the days that HAD journal entries. The user could go back and forth a month or year at a time. They could double-click on the day for the journal they wanted to see. Hovering over a date would show a tooltip with the subject of that journal. A sort of 'report view' in this control would perhaps have the date along the left column and the subject in the right column. Anyway, just a different way to think about selecting an entry than a 'tree view'. If your data representation is separate from your user interface, you can experiment with different 'views' of your data without constantly rewriting your program.

        N Offline
        N Offline
        NewbieStats
        wrote on last edited by
        #3

        Thanks... Never thought of it that way... A friend of mine made a basic calander program for his class that would show white for non-entered data, and colored for entered data and when clicked it would open another CDialog with the data entry... Similar to the idea of the ComboBox but i just started using MFC, and im just experimenting and ive caught onto it pretty easily... Thanks for your input ill give it a try... Do you know any tutorials or open sources to easy access to files without trees that i could review? /* Just a Human Trying to Live in a Computers World. */

        B 1 Reply Last reply
        0
        • N NewbieStats

          Thanks... Never thought of it that way... A friend of mine made a basic calander program for his class that would show white for non-entered data, and colored for entered data and when clicked it would open another CDialog with the data entry... Similar to the idea of the ComboBox but i just started using MFC, and im just experimenting and ive caught onto it pretty easily... Thanks for your input ill give it a try... Do you know any tutorials or open sources to easy access to files without trees that i could review? /* Just a Human Trying to Live in a Computers World. */

          B Offline
          B Offline
          Blake Miller
          wrote on last edited by
          #4

          There are some 'file helper classes' here on CodePRoject that fill CStringArray with all the files in a specified folder or set of folders. You might want to use them to find your journal entry files. The MFC class CFileFind performs local file searches. Also the FindFirstFile function searches a directory for a file or subdirectory whose name matches the specified name.

          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