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. Opening 2 windows upon startup

Opening 2 windows upon startup

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
6 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.
  • H Offline
    H Offline
    hurr1can3
    wrote on last edited by
    #1

    Hi all. Do anyone know how to open two windows as soon as I open my application? One window is used to display some output during the running of the application and the other window is used for the user to open some image file. Does anyone know how to do this? Thank you.

    T 1 Reply Last reply
    0
    • H hurr1can3

      Hi all. Do anyone know how to open two windows as soon as I open my application? One window is used to display some output during the running of the application and the other window is used for the user to open some image file. Does anyone know how to do this? Thank you.

      T Offline
      T Offline
      The_Server
      wrote on last edited by
      #2

      Hi... ----- If I understand your question (which I dont). If you want your app to be with multi windows. (*in you example 2 windows*) You can call twice "CreateWindow(...)" but then you use the same winproc or You can register 2 difrent classes for 2 diffrent window procs and call "CreateWindow(...)" twice also, but ONE for each registered class =-=-=-=-=-= The-Server :rose:

      H 1 Reply Last reply
      0
      • T The_Server

        Hi... ----- If I understand your question (which I dont). If you want your app to be with multi windows. (*in you example 2 windows*) You can call twice "CreateWindow(...)" but then you use the same winproc or You can register 2 difrent classes for 2 diffrent window procs and call "CreateWindow(...)" twice also, but ONE for each registered class =-=-=-=-=-= The-Server :rose:

        H Offline
        H Offline
        hurr1can3
        wrote on last edited by
        #3

        HI. Thank you for your reply. What I mean is that when I open my application, it will display two blank child windows (frames) instead of the usual one. Hope this is more clear.

        T 1 Reply Last reply
        0
        • H hurr1can3

          HI. Thank you for your reply. What I mean is that when I open my application, it will display two blank child windows (frames) instead of the usual one. Hope this is more clear.

          T Offline
          T Offline
          The_Server
          wrote on last edited by
          #4

          I m very sorry... But I dont understand what you want to do. If you are talking about programming in VCPP. Please let me know what are you talking about, I m very intresting in your question... Because I just dont understand it. I have some question for you: How many windows in total? (include the main one) How many & what types if windows you have in total? Also, How many times you need to call **RegisterClass(...)** =-=-=-=-=-= The-Server :rose:

          H 1 Reply Last reply
          0
          • T The_Server

            I m very sorry... But I dont understand what you want to do. If you are talking about programming in VCPP. Please let me know what are you talking about, I m very intresting in your question... Because I just dont understand it. I have some question for you: How many windows in total? (include the main one) How many & what types if windows you have in total? Also, How many times you need to call **RegisterClass(...)** =-=-=-=-=-= The-Server :rose:

            H Offline
            H Offline
            hurr1can3
            wrote on last edited by
            #5

            Hi. thank you for your reply. I am using VC++ and mfc in my application. Usually if you create a MDI application, when you run the program, only one child frame or window is opened. What I wanted to do is that when my application is double clicked, it runs and two blank child windows should be opened instead of just one as in the normal case. So in total, I have the main window, and two child windows inside the main window. I tried using another CView class for the second child window but it did not work. I keep getting the error "COutputView (the class I created) is not a class or namespace name" and I do not know how to resolve it. Hope you understand now. Thank you.

            T 1 Reply Last reply
            0
            • H hurr1can3

              Hi. thank you for your reply. I am using VC++ and mfc in my application. Usually if you create a MDI application, when you run the program, only one child frame or window is opened. What I wanted to do is that when my application is double clicked, it runs and two blank child windows should be opened instead of just one as in the normal case. So in total, I have the main window, and two child windows inside the main window. I tried using another CView class for the second child window but it did not work. I keep getting the error "COutputView (the class I created) is not a class or namespace name" and I do not know how to resolve it. Hope you understand now. Thank you.

              T Offline
              T Offline
              The_Server
              wrote on last edited by
              #6

              Yes.. It took me some time, But finally I get it. Sorry to disapoint you, But I didn't work with MFC since 1999... It's about 4 years now. =-=-=-=-=-=- The-Server :rose:

              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