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 22-Apr-2008, 22:20
manmfc manmfc is offline
New Member
 
Join Date: Feb 2008
Posts: 10
manmfc is on a distinguished road

Adding check boxes to Dialog at run time


Hi,
Here I got a problem. I have created a dialog window with DoModal(). Now in that window I will read a file in OnInitDialog(), that file will have variable number of fields( File1 may have 10, file 2 may have 20 etc, and all these files are with same extension). Now based on the number of fields I want to display the number of checkboxes in that Dialog window. I tried to create check boxes and adding those to dialog, but no use. And I have created the check boxes a bunch statically and I gave the property visible as false and I tried to make that check box visible in OnInitDialog(). But I didn't find any appropriate function for that. Please help me out.

Regards
Ashok
  #2  
Old 25-Apr-2008, 12:59
JustinFox JustinFox is offline
Junior Member
 
Join Date: Mar 2008
Posts: 59
JustinFox will become famous soon enough

Re: Adding check boxes to Dialog at run time


Hi,
Here I got a problem. I have created a dialog window with DoModal(). Now in that window I will read a file in OnInitDialog(), that file will have variable number of fields( File1 may have 10, file 2 may have 20 etc, and all these files are with same extension). Now based on the number of fields I want to display the number of checkboxes in that Dialog window. I tried to create check boxes and adding those to dialog, but no use. And I have created the check boxes a bunch statically and I gave the property visible as false and I tried to make that check box visible in OnInitDialog(). But I didn't find any appropriate function for that. Please help me out.

Regards
Ashok

Are you using VS or just Visual C++?
It really does make a difference, because if you are using VS

you can just put the code you need to read and make your checkbox/file contents ratio creation in the form onload event handler.

if VS is the case let me know and I can help you.

which I'm thinking that you're not using VS because to show a form modal, you just use the form->showdialog()

Justin Fox
  #3  
Old 30-Apr-2008, 00:57
manmfc manmfc is offline
New Member
 
Join Date: Feb 2008
Posts: 10
manmfc is on a distinguished road

Re: Adding check boxes to Dialog at run time


Hi,
Thanks for your reply. Am 100% new to MS products. So, I can't figure out much difference between a dialog and form. Am using Visual Studio 2005 with VC++ only installed. And am not creating any forms( if am correct that Dialog and Form is different). In the resource view I have added a new dialog and I want to add the check boxes to that dialog at runtime.

Regards
Ashok
 
 

Recent GIDBlogDeveloping GUIs with wxPython (Part 4) 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
Adding Hotkeys for multiple Dialog navi1084 MS Visual C++ / MFC Forum 0 07-Jul-2007 04:04
constructors/classes mapes479 C++ Forum 3 19-Nov-2006 17:34
Traversing multiple dialog boxes Chronocide MS Visual C++ / MFC Forum 0 04-Sep-2006 23:27
Need help understand function prototypes! Blstretch C++ Forum 20 25-Oct-2005 14:14

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

All times are GMT -6. The time now is 18:32.


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