GIDForums  

Go Back   GIDForums > Computer Programming Forums > MS Visual C++ / MFC Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 07-Feb-2008, 02:58
manmfc manmfc is offline
New Member
 
Join Date: Feb 2008
Posts: 10
manmfc is on a distinguished road

Creating Multiple Dialog Frames in a single MFC Application


Hi,
I am a new bee to MFC. I tried to create more than one Frame Dialogs in a single MFC application. But unfortunately I couldn't solve it.

I have a dialog frame with only one button that is "OK". Whenever if I click on OK, this dialog frame should disappear and a new dialog frame should come with lots of Check boxes, Radio buttons. Please help me how to do this.

And in one dialog frame I have 8 Labels. I want to do the text format for each format individually. I have checked in the label properties, I didn't get that. Is there any possibility that I can do that through coding.

Please help me out to come out of these problems.

Thanks in Advance.
  #2  
Old 07-Feb-2008, 03:23
jov0708 jov0708 is offline
New Member
 
Join Date: Feb 2008
Posts: 12
jov0708 is on a distinguished road

Re: Creating Multiple Dialog Frames in a single MFC Application


you can check this site: http://www.functionx.com/visualc/index.htm.
it has really helped me in learning MFC...
  #3  
Old 14-Feb-2008, 01:31
sree sree is offline
New Member
 
Join Date: Jul 2007
Posts: 9
sree is on a distinguished road
Thumbs up

Re: Creating Multiple Dialog Frames in a single MFC Application


CREATE A CLASS FOR NEW DIALOG FRAME ., IF HAVE BEEN ALREADY CREATED THEN JUSTWRITE THE CODINGS FOR....WHICH I MENTIONED BELOW

CPP / C++ / C Code:
VOID CDialog::OnOK()
{
      Cclassname dlg;
       dlg.DoModal();
}


SREE
BE COOL
Last edited by admin : 03-Mar-2008 at 05:52. Reason: Please insert your example C/C++ codes between [CPP] and [/CPP] tags
  #4  
Old 03-Mar-2008, 02:30
Nishtha Nishtha is offline
New Member
 
Join Date: Feb 2008
Posts: 5
Nishtha is on a distinguished road

Re: Creating Multiple Dialog Frames in a single MFC Application


Hi
I am using MDI in MFC. I have a CRecordset type form and from button click on this form I want to open another form of CRecordView type. I tried the following code but this is not working
CPP / C++ / C Code:
VOID CDialog::OnOK()
{
Cclassname dlg;
dlg.DoModal();
}

Please help me.
Thanks in Advance
Last edited by admin : 03-Mar-2008 at 05:53. Reason: Please insert your example C/C++ codes between [CPP] and [/CPP] tags
  #5  
Old 04-Mar-2008, 13:12
TurboPT's Avatar
TurboPT TurboPT is offline
Senior Member
 
Join Date: Feb 2006
Location: Atlanta, GA
Posts: 1,017
TurboPT is a jewel in the roughTurboPT is a jewel in the roughTurboPT is a jewel in the rough

Re: Creating Multiple Dialog Frames in a single MFC Application


Nishtha,
How would that work?

That is the same code snippet found in post #3. The 'Cclassname' portion, is general form, and that needs to be replaced with your class name.
__________________
Use the force...read the source!!
WYCIWYG -- what you code is what you get!
  #6  
Old 05-Mar-2008, 00:08
Nishtha Nishtha is offline
New Member
 
Join Date: Feb 2008
Posts: 5
Nishtha is on a distinguished road

Re: Creating Multiple Dialog Frames in a single MFC Application


Thanks Buddy,
I know that it was the general name which u specified.I changed that to the classname in my project but still that is not working.
Actually I inserted a Form from insert tab on the main menu and i want to open this form on button click from previous form

Also i have one more query:
I want to create a Static Library in VC++ which will contain the functions to access the Mysql database.I am using MFC application to enter the details.
As in,in my form if I enter the person ID the information of that person should be retrieved on the form itself or may be on the next form.The problem is that I have to write the code for retrieval in my static library.I really dont know how to give a start.
Kindly help.
Thanx once again
  #7  
Old 05-Mar-2008, 20:41
TurboPT's Avatar
TurboPT TurboPT is offline
Senior Member
 
Join Date: Feb 2006
Location: Atlanta, GA
Posts: 1,017
TurboPT is a jewel in the roughTurboPT is a jewel in the roughTurboPT is a jewel in the rough

Re: Creating Multiple Dialog Frames in a single MFC Application


Quote:
Originally Posted by Nishtha
Thanks Buddy,
I know that it was the general name which u specified.I changed that to the classname in my project but still that is not working...
...
Can you post any code to see what might be happening?

Oh, and do you still assistance with the "image filename to database" issue that I noticed in another post?
__________________
Use the force...read the source!!
WYCIWYG -- what you code is what you get!
  #8  
Old 05-Mar-2008, 23:26
whitepenguin whitepenguin is offline
New Member
 
Join Date: Dec 2007
Posts: 9
whitepenguin is on a distinguished road

Re: Creating Multiple Dialog Frames in a single MFC Application


Me suggest the best solution is to Use SDI MFC , and your View Window Should be CFormView

Second Way is : CDialog X(MAKEINTRESOURCE(" XXXXXX"), NULL);
X.DoModal();
 
 

Recent GIDBlogUS Elections and the ?Voter?s Responsibility? by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Traversing multiple dialog boxes Chronocide MS Visual C++ / MFC Forum 0 05-Sep-2006 00:27
Adding Menu in MFC dialog Application aboo-siddiq MS Visual C++ / MFC Forum 0 24-Apr-2006 04:45
dialog based application hezyse MS Visual C++ / MFC Forum 1 20-Mar-2005 19:16
Help! Some basal questions about MFC xutingnjupt MS Visual C++ / MFC Forum 1 05-Dec-2004 04:38
controling dialog objects & multiple source files omills MS Visual C++ / MFC Forum 0 15-Jul-2004 00:30

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 19:57.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.