Solved

Working with many frame windows

Posted on 2006-07-07
1
209 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
ID: 17058406
>>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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

861 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