Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Changing between windows

tottetotte Member Posts: 12
Hi,
I'm creating a MDI program in which I want to be able to have many different documents that don't look alike.
And I want to be able to switch between these, what command do I use?
DoModal doesn't let one hop between windows, and I want to be able to hop between windows.

ToTTe

Comments

  • jamesmatthewsjamesmatthews Member Posts: 31
    Hello,
    I'm a begginer in MFC so I'm not really sure. But I think you could use - Create(NAMEOFWINDOW); - (where NAMEOFWINDOW is the name of the Dialog Box) to create a MODELESS Dialog Box(window)(what you want) instead of a MODAL Dialog Box(window)(what you don't want)


    : Hi,
    : I'm creating a MDI program in which I want to be able to have many different documents that don't look alike.
    : And I want to be able to switch between these, what command do I use?
    : DoModal doesn't let one hop between windows, and I want to be able to hop between windows.
    :
    : ToTTe
    :

  • tottetotte Member Posts: 12
    first of all Create does not take 1 parameter... =(
    So I would appriciate a little more detailed info, if you might know please play around with it abit then tell me. I would be very happy to know how to.

    : Hello,
    : I'm a begginer in MFC so I'm not really sure. But I think you could use - Create(NAMEOFWINDOW); - (where NAMEOFWINDOW is the name of the Dialog Box) to create a MODELESS Dialog Box(window)(what you want) instead of a MODAL Dialog Box(window)(what you don't want)
    :
    :
    : : Hi,
    : : I'm creating a MDI program in which I want to be able to have many different documents that don't look alike.
    : : And I want to be able to switch between these, what command do I use?
    : : DoModal doesn't let one hop between windows, and I want to be able to hop between windows.
    : :
    : : ToTTe
    : :
    :
    :

  • jamesmatthewsjamesmatthews Member Posts: 31
    I should have asked this question first. Are you trying to show a window that is made as a resource file or are you creating the window at run time?

    ,im sorry for not asking this before.

    : first of all Create does not take 1 parameter... =(
    : So I would appriciate a little more detailed info, if you might know please play around with it abit then tell me. I would be very happy to know how to.
    :
    : : Hello,
    : : I'm a begginer in MFC so I'm not really sure. But I think you could use - Create(NAMEOFWINDOW); - (where NAMEOFWINDOW is the name of the Dialog Box) to create a ESS Dialog Box(window)(what you want) instead of a MODAL Dialog Box(window)(what you don't want)
    : :
    : :
    : : : Hi,
    : : : I'm creating a MDI program in which I want to be able to have many different documents that don't look alike.
    : : : And I want to be able to switch between these, what command do I use?
    : : : DoModal doesn't let one hop between windows, and I want to be able to hop between windows.
    : : :
    : : : ToTTe
    : : :
    : :
    : :
    :
    :

  • tottetotte Member Posts: 12
    I created a new dialog... But what kind of class should it inherit and what commands?
    You tell me how to.

    : I should have asked this question first. Are you trying to show a window that is made as a resource file or are you creating the window at run time?
    :
    : ,im sorry for not asking this before.
    :
    : : first of all Create does not take 1 parameter... =(
    : : So I would appriciate a little more detailed info, if you might know please play around with it abit then tell me. I would be very happy to know how to.
    : :
    : : : Hello,
    : : : I'm a begginer in MFC so I'm not really sure. But I think you could use - Create(NAMEOFWINDOW); - (where NAMEOFWINDOW is the name of the Dialog Box) to create a ESS Dialog Box(window)(what you want) instead of a MODAL Dialog Box(window)(what you don't want)
    : : :
    : : :
    : : : : Hi,
    : : : : I'm creating a MDI program in which I want to be able to have many different documents that don't look alike.
    : : : : And I want to be able to switch between these, what command do I use?
    : : : : DoModal doesn't let one hop between windows, and I want to be able to hop between windows.
    : : : :
    : : : : ToTTe
    : : : :
    : : :
    : : :
    : :
    : :
    :
    :

  • jamesmatthewsjamesmatthews Member Posts: 31
    I am not sure, but I would just inherit the CDialog Class. But what compiler are you using ? and did you create the dialog in a dialog box editor or with code? I don't think i can give you code unless i know how you made the dialog: with code or in an editor?

    I am sorry if I stated these questions unclearly.

    : I created a new dialog... But what kind of class should it inherit and what commands?
    : You tell me how to.
    :
    : : I should have asked this question first. Are you trying to show a window that is made as a resource file or are you creating the window at run time?
    : :
    : : ,im sorry for not asking this before.
    : :
    : : : first of all Create does not take 1 parameter... =(
    : : : So I would appriciate a little more detailed info, if you might know please play around with it abit then tell me. I would be very happy to know how to.
    : : :
    : : : : Hello,
    : : : : I'm a begginer in MFC so I'm not really sure. But I think you could use - Create(NAMEOFWINDOW); - (where NAMEOFWINDOW is the name of the Dialog Box) to create a ESS Dialog Box(window)(what you want) instead of a MODAL Dialog Box(window)(what you don't want)
    : : : :
    : : : :
    : : : : : Hi,
    : : : : : I'm creating a MDI program in which I want to be able to have many different documents that don't look alike.
    : : : : : And I want to be able to switch between these, what command do I use?
    : : : : : DoModal doesn't let one hop between windows, and I want to be able to hop between windows.
    : : : : :
    : : : : : ToTTe
    : : : : :
    : : : :
    : : : :
    : : :
    : : :
    : :
    : :
    :
    :

  • tottetotte Member Posts: 12
    [b][red]This message was edited by totte at 2002-10-27 22:17:30[/red][/b][hr]
    I made it in an editor...
    not with code..
    If I use "CDialog hej;
    hej.Create(IDD_DIALOG,NULL);
    hej.ShowWindow(SW_SHOW);"
    then one of them will always be in front(not the selected one), and they won't move along with the main window.

    I nailed some of it.. All I had to add was hej.SetParent(this), but now when I maximize the window it overlapps the toolbar... =(

    : I am not sure, but I would just inherit the CDialog Class. But what compiler are you using ? and did you create the dialog in a dialog box editor or with code? I don't think i can give you code unless i know how you made the dialog: with code or in an editor?
    :
    : I am sorry if I stated these questions unclearly.
    :
    : : I created a new dialog... But what kind of class should it inherit and what commands?
    : : You tell me how to.
    : :
    : : : I should have asked this question first. Are you trying to show a window that is made as a resource file or are you creating the window at run time?
    : : :
    : : : ,im sorry for not asking this before.
    : : :
    : : : : first of all Create does not take 1 parameter... =(
    : : : : So I would appriciate a little more detailed info, if you might know please play around with it abit then tell me. I would be very happy to know how to.
    : : : :
    : : : : : Hello,
    : : : : : I'm a begginer in MFC so I'm not really sure. But I think you could use - Create(NAMEOFWINDOW); - (where NAMEOFWINDOW is the name of the Dialog Box) to create a ESS Dialog Box(window)(what you want) instead of a MODAL Dialog Box(window)(what you don't want)
    : : : : :
    : : : : :
    : : : : : : Hi,
    : : : : : : I'm creating a MDI program in which I want to be able to have many different documents that don't look alike.
    : : : : : : And I want to be able to switch between these, what command do I use?
    : : : : : : DoModal doesn't let one hop between windows, and I want to be able to hop between windows.
    : : : : : :
    : : : : : : ToTTe
    : : : : : :
    : : : : :
    : : : : :
    : : : :
    : : : :
    : : :
    : : :
    : :
    : :
    :
    :



  • jamesmatthewsjamesmatthews Member Posts: 31
    like i said i'm a begginer at MFC so i'm just trying to make some helpful guesses at the problem,

    I hope this helps:

    Ok i'm really not sure but i think you might either:
    1)not have the main window set as an MDI Parent window
    2)not have the child window set as an MDI Child window

    if your not sure about either one of these i would check it out



    : [b][red]This message was edited by totte at 2002-10-27 22:17:30[/red][/b][hr]
    : I made it in an editor...
    : not with code..
    : If I use "CDialog hej;
    : hej.Create(IDD_DIALOG,NULL);
    : hej.ShowWindow(SW_SHOW);"
    : then one of them will always be in front(not the selected one), and they won't move along with the main window.
    :
    : I nailed some of it.. All I had to add was hej.SetParent(this), but now when I maximize the window it overlapps the toolbar... =(
    :
    : : I am not sure, but I would just inherit the CDialog Class. But what compiler are you using ? and did you create the dialog in a dialog box editor or with code? I don't think i can give you code unless i know how you made the dialog: with code or in an editor?
    : :
    : : I am sorry if I stated these questions unclearly.
    : :
    : : : I created a new dialog... But what kind of class should it inherit and what commands?
    : : : You tell me how to.
    : : :
    : : : : I should have asked this question first. Are you trying to show a window that is made as a resource file or are you creating the window at run time?
    : : : :
    : : : : ,im sorry for not asking this before.
    : : : :
    : : : : : first of all Create does not take 1 parameter... =(
    : : : : : So I would appriciate a little more detailed info, if you might know please play around with it abit then tell me. I would be very happy to know how to.
    : : : : :
    : : : : : : Hello,
    : : : : : : I'm a begginer in MFC so I'm not really sure. But I think you could use - Create(NAMEOFWINDOW); - (where NAMEOFWINDOW is the name of the Dialog Box) to create a ESS Dialog Box(window)(what you want) instead of a MODAL Dialog Box(window)(what you don't want)
    : : : : : :
    : : : : : :
    : : : : : : : Hi,
    : : : : : : : I'm creating a MDI program in which I want to be able to have many different documents that don't look alike.
    : : : : : : : And I want to be able to switch between these, what command do I use?
    : : : : : : : DoModal doesn't let one hop between windows, and I want to be able to hop between windows.
    : : : : : : :
    : : : : : : : ToTTe
    : : : : : : :
    : : : : : :
    : : : : : :
    : : : : :
    : : : : :
    : : : :
    : : : :
    : : :
    : : :
    : :
    : :
    :
    :
    :
    :

  • Shawn CarterShawn Carter Member Posts: 0

    __ [ http://forcoder.org ] free video tutorials and ebooks about // Python, JavaScript, C++, Ruby, Assembly, R, C, Delphi, Visual Basic .NET, MATLAB, Go, Swift, Scratch, Java, Perl, Objective-C, Visual Basic, PHP, C#, PL/SQL Awk, Transact-SQL, Erlang, Logo, Bash, F#, FoxPro, Dart, Scheme, LabVIEW, Clojure, Lua, Hack, Ada, Apex, Alice, Fortran, ABAP, Scala, Prolog, D, COBOL, Lisp, Kotlin, Crystal, ML, VBScript, Rust, SAS, Julia // _

Sign In or Register to comment.