800x600 1024x768 Navigation:    
FireBoard
Welcome, Guest
Please Login or Register.    Lost Password?
wikipedia user message Create multiple dialogs at runtime (1 viewing) (1) Guests
Go to bottom Post Reply Favoured: 0
TOPIC: wikipedia user message Create multiple dialogs at runtime
#6443
wikipedia user message Create multiple dialogs at runtime  
Hi, I want to make it possible for the user to create an unlimited (perhaps up to ten in practice ) number of dialog boxes/windows at runtime depending on what the user selects in the main gui. It is meant to be a lot of dialog modules each containing a specific set of adjustable parameters that affects the processing in the main gui. The problem is I don't know how many dialog are going to be created at compile time. Because of the ways I want to use the code it is very important for me that I do not just hardcode ten different resource ids in the resource file. I want to create the dialog ids, set their positions, _style_s, sizes and fill controls into them at runtime. I have made this class: class AM3DParamInterfaceWindow : public CDialog and in the constructor I try to create the dialog: this-Create(dialogId, pParent); //CWnd* pParent is a pointer to the parent window The problem is that dialogId apparently has to exist in the .rc file otherwise I get an error saying that the resource can not be found. I also think the ids of the dialogs have to be different in order not to mix up things. I hope you understand what I want to accomplish otherwise I will try to explain it better. /Kim
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#6444
Tom Serface (Visitor)
Click here to see the profile of this user
Birthdate:
wikipedia user message Create multiple dialogs at runtime  
I want to make it possible for the user to create an unlimited (perhaps up to ten in practice ) number of dialog boxes/windows at runtime depending on what the user selects in the main gui. It is meant to be a lot of dialog modules each containing a specific set of adjustable parameters that affects the processing in the main gui. The problem is I don't know how many dialog are going to be created at compile time. Because of the ways I want to use the code it is very important for me that I do not just hardcode ten different resource ids in the resource file. I want to create the dialog ids, set their positions, _style_s, sizes and fill controls into them at runtime. I have made this class: class AM3DParamInterfaceWindow : public CDialog and in the constructor I try to create the dialog: this-Create(dialogId, pParent); //CWnd* pParent is a pointer to the parent window The problem is that dialogId apparently has to exist in the .rc file otherwise I get an error saying that the resource can not be found. I also think the ids of the dialogs have to be different in order not to mix up things. I hope you understand what I want to accomplish otherwise I will try to explain it better. /Kim
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#6445
wikipedia user message Create multiple dialogs at runtime  
Hi, I want to make it possible for the user to create an unlimited (perhaps up to ten in practice ) number of dialog boxes/windows at runtime depending on what the user selects in the main gui. It is meant to be a lot of dialog modules each containing a specific set of adjustable parameters that affects the processing in the main gui. The problem is I don't know how many dialog are going to be created at compile time. Because of the ways I want to use the code it is very important for me that I do not just hardcode ten different resource ids in the resource file. I want to create the dialog ids, set their positions, _style_s, sizes and fill controls into them at runtime. I have made this class: class AM3DParamInterfaceWindow : public CDialog and in the constructor I try to create the dialog: this-Create(dialogId, pParent); //CWnd* pParent is a pointer to the parent window The problem is that dialogId apparently has to exist in the .rc file otherwise I get an error saying that the resource can not be found. I also think the ids of the dialogs have to be different in order not to mix up things. I hope you understand what I want to accomplish otherwise I will try to explain it better. Have you considered using just one dialog template, with no controls on it? That would be much easier. Are you a  beginner with MFC?  Your concept sounds like a poor solution and will be extremely difficult to implement.  But you haven't explained your real problem so I can't suggest a better approach.  To do what you think you want to do you will have to create the dialogs with the CreateDialogIndirectParam API, which is not part of MFC.  But MFC itself uses this API so you can get some hints how to integrate it with CDialog by studying the MFC source code.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#6446
wikipedia user message Create multiple dialogs at runtime  
I hope you understand what I want to accomplish otherwise I will try to explain it better. /Kim Joseph M. Newcomer [MVP] email: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it Web: http://www.flounder.com MVP Tips: http://www.flounder.com/mvp_tips.htm
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#6447
wikipedia user message Create multiple dialogs at runtime  
Thank you everyone! You are right - I am a beginner with MFC. I have now successfully created the dialog template at runtime. Your comments helped me find this article: http://blogs.msdn.com/oldnewthing/archive/2005/04/29/412577.aspx For now the dialogs look very much the same. So far I only use slider controls (CSliderCtrl) and text boxes (CEdit) in the dialogs and the number of slider controls/text boxes varies from dialog to dialog. The user is only able to change the settings of the sliders - the text boxes are read only. Inside the AM3DParamInterfaceWindow : public CDialog class event handling is done using the ON_WM_HSCROLL() message. So when a slider is changed by the user, the event handler takes care of opdating the underlying system. What I am trying to accomplish is make a simple GUI that can handle plugins similar to VST plugins: http://en.wikipedia.org/wiki/Virtual_Studio_Technology The idea is that you can change your audio stream by inserting and configuring one or more of some audio plugins in a given order. Every plugin must then have a GUI where it is possible to adjust the number of parameters that plugin has. For that purpose I could create a single empty template and use it for all the plugin GUIs, however I also want the source files for automatic GUI generation to be easily used in another MFC project. It should be possible just to include the source files in another MFC project that uses the plugin structure without having to create a new resource template manually. /Kim
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#6448
wikipedia user message Create multiple dialogs at runtime  
Thank you everyone! You are right - I am a beginner with MFC. I have now successfully created the dialog template at runtime. Your comments helped me find this article: http://blogs.msdn.com/oldnewthing/archive/2005/04/29/412577.aspx For now the dialogs look very much the same. So far I only use slider controls (CSliderCtrl) and text boxes (CEdit) in the dialogs and the number of slider controls/text boxes varies from dialog to dialog. The user is only able to change the settings of the sliders - the text boxes are read only. Inside the AM3DParamInterfaceWindow : public CDialog class event handling is done using the ON_WM_HSCROLL() message. So when a slider is changed by the user, the event handler takes care of opdating the underlying system. What I am trying to accomplish is make a simple GUI that can handle plugins similar to VST plugins: http://en.wikipedia.org/wiki/Virtual_Studio_Technology The idea is that you can change your audio stream by inserting and configuring one or more of some audio plugins in a given order. Every plugin must then have a GUI where it is possible to adjust the number of parameters that plugin has. For that purpose I could create a single empty template and use it for all the plugin GUIs, however I also want the source files for automatic GUI generation to be easily used in another MFC project. It should be possible just to include the source files in another MFC project that uses the plugin structure without having to create a new resource template manually. /Kim Joseph M. Newcomer [MVP] email: This e-mail address is being protected from spam bots, you need JavaScript enabled to view it Web: http://www.flounder.com MVP Tips: http://www.flounder.com/mvp_tips.htm
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop
teksty piosenek - military patches - lyrics - Ungeniessbar - iron casting - Famous quotes - kredite - embroidered patches - Trockenbau Hamburg - proxy toplist - rechnung-24.de - accommodation kolobrzeg - Computer Press - Art Gallery - pozycjonowanie
Search Exchange Web Portal SpyderMap
906 no host brak hosta 906 wymiana linkow gdansk hotels | Teatr | spadochroniarstwo | Makdonaldyzacja | Ritzenfeld | Kotki | Parki | Parki | Antonina | Vileda Vileda Vileda.e-lumarko.pl | Schmitt | buddyzm | Smutne | Taniec | forum komputery