Solved

Working with many frame windows

Posted on 2006-07-07
1
198 Views
Last Modified: 2010-04-24
Hi.I have a quickwin project(dialog based).I want, when I push a button, to be created a new frame window(I want to create 2 frame windows at the same time) .Please can  you tell me how can I do it (if you can, send me the code)?????Also in this window I want to be shown a document or a text which I have created before.In this document I want to add some results.Please if you can,answer me ....Thank you......  
0
Comment
Question by:geomvigla
1 Comment
 
LVL 15

Accepted Solution

by:
lakshman_ce earned 500 total points
Comment Utility
>>I want, when I push a button, to be created a new frame window(I want to create 2 frame windows at the same time)

Not sure why would display two frames separately. If they are related you can display a property sheet with two dialogs in it.

If you want them separate, you can add two more dialogs. Add classes to them and show them as modeless dialog.

for example, OnButtonClick

CDialog1 *pDialog1 = new CDialog1();
   //Check if new succeeded and we got a valid pointer to a dialog object
   if(pDialog1 != NULL)
   {
      BOOL ret = pDialog1->Create(IDD_DIALOG1,this);
      pDialog1->ShowWindow(SW_SHOW);
   }
   CDialog2 *pDialog2 = new CDialog2();
   //Check if new succeeded and we got a valid pointer to a dialog object
   if(pDialog2 != NULL)
   {
      BOOL ret = pDialog2->Create(IDD_DIALOG2,this);
      pDialog2->ShowWindow(SW_SHOW);
   }

These would create modeless dialogs. You may need to show in different positions using SetWindowPos API.

For reading document/text file you can add a RichEditCtrl to the dialog and read files into it.
You can refer to this link for streaming in  .rtf file into RichEditCtrl
http://msdn2.microsoft.com/en-us/library/h2hkhzhe.aspx

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

The following diagram presents a diamond class hierarchy: As depicted, diamond inheritance denotes when two classes (e.g., CDerived1 and CDerived2), separately extending a common base class (e.g., CBase), are sub classed simultaneously by a fourt…
In Easy String Encryption Using CryptoAPI in C++ (http://www.experts-exchange.com/viewArticle.jsp?aid=1193) I described how to encrypt text and recommended that the encrypted text be stored as a series of hexadecimal digits -- because cyphertext may…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now