Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 217
  • Last Modified:

Working with many frame windows

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
geomvigla
Asked:
geomvigla
1 Solution
 
lakshman_ceCommented:
>>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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now