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. Recreating views...

Recreating views...

Scheduled Pinned Locked Moved C / C++ / MFC
c++architecturequestionannouncement
17 Posts 5 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.
  • M mid 5741

    It's definitely possible. If you provide your email address, I'll send you some VC6 code I have.

    A Offline
    A Offline
    Abhijeet Pathak
    wrote on last edited by
    #8

    ok, i'm actually i'm working on a Windows Explorer like application. The web browser control is used in right pane. Which emulates the list view exactly similar to that in Windows Explorer. But, when some drive/folder selected in it, that folder is actually marked as 'in use' by Windows (i.e. some file handles must be kept open by Windows). Even SetCurrentDirectory() doesn't works. Now, I think that whenever a new drive is to be shown, i can destroy the old view and recreate new one...

    1 Reply Last reply
    0
    • A Abhijeet Pathak

      hi, i have a MFC Explorer style application with doc/view architecture.... is it possible to delete (free or release) current left and right views and recreate them at a particular instant (e.g. when a button is clicked.)?

      P Offline
      P Offline
      Paul Conrad
      wrote on last edited by
      #9

      Couldn't you just hide them until you want to use them again? Or is it a necessity to free/release them? ---modified I saw your post to led mike, makes sense now :-O

      "The clue train passed his station without stopping." - John Simmons / outlaw programmer

      A 1 Reply Last reply
      0
      • P Paul Conrad

        Couldn't you just hide them until you want to use them again? Or is it a necessity to free/release them? ---modified I saw your post to led mike, makes sense now :-O

        "The clue train passed his station without stopping." - John Simmons / outlaw programmer

        A Offline
        A Offline
        Abhijeet Pathak
        wrote on last edited by
        #10

        it's certainly necessary to release them and to recreate them... do u know how to do that?

        1 Reply Last reply
        0
        • A Abhijeet Pathak

          ok, i'm actually i'm working on a Windows Explorer like application. The web browser control is used in right pane. Which emulates the list view exactly similar to that in Windows Explorer. But, when some drive/folder selected in it, that folder is actually marked as 'in use' by Windows (i.e. some file handles must be kept open by Windows). Even SetCurrentDirectory() doesn't works. Now, I think that whenever a new drive is to be shown, i can destroy the old view and recreate new one...

          M Offline
          M Offline
          mid 5741
          wrote on last edited by
          #11

          That doesn't sound like a good situation for programmatically destroying and recreating views. I've used the technique to improve application responsiveness and decrease the memory footprint.

          1 Reply Last reply
          0
          • M mid 5741

            So the OP needs to pass your test before you'll offer any help? That's the spirit.

            realJSOPR Offline
            realJSOPR Offline
            realJSOP
            wrote on last edited by
            #12

            Michael Chapman wrote:

            So the OP needs to pass your test before you'll offer any help? That's the spirit.

            Many of them don't pass the test.

            "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
            -----
            "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

            1 Reply Last reply
            0
            • A Abhijeet Pathak

              ok, i'm actually i'm working on a Windows Explorer like application. The web browser control is used in right pane. Which emulates the list view exactly similar to that in Windows Explorer. But, when some drive/folder selected in it, that folder is actually marked as 'in use' by Windows (i.e. some file handles must be kept open by Windows). Even SetCurrentDirectory() doesn't works. Now, I think that whenever a new drive is to be shown, i can destroy the old view and recreate new one...

              realJSOPR Offline
              realJSOPR Offline
              realJSOP
              wrote on last edited by
              #13

              I guess I don't understand what you're asking for. When the user selects a folder in the left pane, files (and sub-folders) show up in the right pane. Simply doing a FileFind on *.* to populate the right pane should be sufficient, and whether those files/folders are "in use by windows" is irrelevant.

              "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
              -----
              "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

              A 1 Reply Last reply
              0
              • realJSOPR realJSOP

                I guess I don't understand what you're asking for. When the user selects a folder in the left pane, files (and sub-folders) show up in the right pane. Simply doing a FileFind on *.* to populate the right pane should be sufficient, and whether those files/folders are "in use by windows" is irrelevant.

                "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                -----
                "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001

                A Offline
                A Offline
                Abhijeet Pathak
                wrote on last edited by
                #14

                No, actually, instead of FindFile(), i let WebBrowser navigate to the desired location (e.g. C:\). This shows the exact ListView similar to what we see in Windows Explorer. I even get bonus items like Task Lists, Contextual Menus etc. But it can be using notification functions to know about changes in that folder and also displays 'Details', such as preview of images etc., and for that opening files in necessary... i think.

                1 Reply Last reply
                0
                • M mid 5741

                  So the OP needs to pass your test before you'll offer any help? That's the spirit.

                  L Offline
                  L Offline
                  led mike
                  wrote on last edited by
                  #15

                  Michael Chapman wrote:

                  needs to pass your test

                  led mike wrote:

                  Also I try not to help people produce the wrong solution for the problem they are solving.

                  Thanks for ignoring that part

                  Michael Chapman wrote:

                  That's the spirit.

                  I guess you are after a flame war eh?

                  M 1 Reply Last reply
                  0
                  • L led mike

                    Michael Chapman wrote:

                    needs to pass your test

                    led mike wrote:

                    Also I try not to help people produce the wrong solution for the problem they are solving.

                    Thanks for ignoring that part

                    Michael Chapman wrote:

                    That's the spirit.

                    I guess you are after a flame war eh?

                    M Offline
                    M Offline
                    mid 5741
                    wrote on last edited by
                    #16

                    You, sir, are a beautiful person and your holistic approach to righting the world's ills should be celebrated. All apologies.

                    L 1 Reply Last reply
                    0
                    • M mid 5741

                      You, sir, are a beautiful person and your holistic approach to righting the world's ills should be celebrated. All apologies.

                      L Offline
                      L Offline
                      led mike
                      wrote on last edited by
                      #17

                      Michael Chapman wrote:

                      You, sir, are a beautiful person

                      You're not bad yourself

                      Michael Chapman wrote:

                      your holistic approach

                      Sorry, I can't take any credit for my technical views, they are all from others that have come before me.

                      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