Wizard97 Style Propertysheet

Hi
   i am using the Wizard97 Style Propertysheet. goto the www.codeproject.com in that website goto the Property
sheet in that i am using the "Resizeable Wizard97 style Wizards".
First you can download and test, then Only u know my problem very easily. In that they are using two bitmap Water256.bmp and Banner256.bmp. these two files. whenever the user changes the BMP. then dynamically My application also need to change. how i can do that?. pl. help. me.
its urgent .....

thanks,
Rajesh. S(rajesh_s76@hotmail.com)
raju_s76Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
manojbkumarConnect With a Mentor Commented:
Hi Rajesh
   The SetWatermark() function I referred to is in the  NGWizardPage.cpp.Dont overload the function of CWizard97Sheet.
To solve the problem
Made the changes I suggested in the previous commend comment and also
Overload the function AddPage() of the class CNGWizard(file:NGWizard.h)
virtual void AddPage(CNGWizardPage* pPage, CString strFileName);
Also in cpp file
void CNGWizard::AddPage(CNGWizardPage* pPage, CString strFileName)
{
     if ( (pPage->m_psp.dwFlags & PSP_HIDEHEADER) != 0)
     {
          pPage->SetWatermark(strFileName, m_eWatermarkStyle);
     }
     CNGWizard_BASE::AddPage(pPage);
}
////////////
Now your change your call
AddPage(&m_Intro,_T("Test.bmp"));

NOTE:-Dont change SetWatermark(IDB_WATERMARK256,IZ97_BITMAP_STRETCH);
U can pass some No instead of IDB_WATERMARK256 if u r deleting the resource bitmap
GoodLuck

0
 
Roshan DavisCommented:
U can load the bitmap from the direcory instead of it from the resource.

GOOD LUCK
0
 
manojbkumarCommented:
Hi Rajesh
   Overload CNGWizardPage::SetWatermark()

ie, Add the following declaration in NGWizardPage.h

BOOL SetWatermark(CString strFileName,int eStyle = WIZ97_BITMAP_STRETCH);

and in cpp

BOOL CNGWizardPage::SetWatermark(CString strFileName, int eStyle /*CWizard::WIZ97_BITMAP_STRETCH*/)
{
     m_eWatermarkStyle = eStyle;
     
     ASSERT(     WIZ97_BITMAP_TILE == m_eWatermarkStyle  ||
               WIZ97_BITMAP_STRETCH == m_eWatermarkStyle ||
               WIZ97_BITMAP_CENTER == m_eWatermarkStyle);

     if (m_bmpWatermark.Load(strFileName) )
     {
          m_HollowBrush.DeleteObject();
          VERIFY(m_HollowBrush.CreateStockObject(HOLLOW_BRUSH));

          return TRUE;
     }
     return FALSE;
}


Then

You can call this function with file name as argument to set it as the backgroung of current page

like

void CIntroPage::OnButton1()
{
     SetWatermark(_T("C:\\Test.bmp"));
     Invalidate();
}
/////
Hope this helps


Manoj
0
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.

 
raju_s76Author Commented:
hi Manoj,

    I tried as per your overload func. and i am calling the that function. in the Wizard97Sheet.cpp. But the bitmap is not display. I need to know m_bmpWatermark is this object of CDIBitmap or any other class ?.

void CWizard97Sheet::Initialise(void)
{
     m_bResizeable = TRUE;

     if (Is256ColorSupported())
     {
      SetWatermark("C:\\Rajesh\\Gmpc\\reswiz97_demo\\Water256_Old.bmp");
          SetHeader(IDB_BANNER256,          WIZ97_BITMAP_STRETCH);
     }
     else
     {
          SetWatermark(IDB_WATERMARK16,     WIZ97_BITMAP_STRETCH);
          SetHeader(IDB_BANNER16,               WIZ97_BITMAP_STRETCH);
     }
     Invalidate();

     // add all the pages of the wizard    
     //AddPage(&m_Interior3);
     AddPage(&m_Intro);
     AddPage(&m_Interior1);
     AddPage(&m_Interior2);    
     AddPage(&m_Completion);    
}

is it correct way?. Any other thing i need to add or what?.
pl. help manoj. is this very urgent, can u give me ur mailid.  U know Bitmap cannt display, do u have any samples of this project. Send mail to me rajesh_s76@hotmail.com. i am waiting for your reply.

0
 
raju_s76Author Commented:
Hi manoj,

   i need one more help, In the Wizard97 Property Page. Each Page is having separate Header and subtitle is there know. I want to change the Header and subtitle dynamically,i dont want to read from the string table.  
for example:
   I want to read the Header and Subtitle from the file or some CString object, then display the header and subtitle of each page means how i can do ?.

see the sample the each page
CInterior1::CInterior1() : CInterior1_BASE(CInterior1::IDD, 0, IDS_HEADERTITLE, IDS_HEADERSUBTITLE1)
{
     //{{AFX_DATA_INIT(CInterior1)
     m_csDescription = _T("");
     m_csFileName = _T("");
     //}}AFX_DATA_INIT
Set the title of the Property Page    
     
}

in the above code the header and subtitle message get from the String table. i dont want get from String Table. i want to read from the File. and then display it. how i can do it?.
thanks,
Rajesh. S
0
 
raju_s76Author Commented:
Hi manoj,

  i need one more help, In the Wizard97 Property Page. Each Page is having separate Header and subtitle
is there know. I want to change the Header and subtitle dynamically,i dont want to read from the string
table.  
for example:
  I want to read the Header and Subtitle from the file or some CString object, then display the header
and subtitle of each page means how i can do ?.

see the sample the each page
CInterior1::CInterior1() : CInterior1_BASE(CInterior1::IDD, 0, IDS_HEADERTITLE, IDS_HEADERSUBTITLE1)
{
    //{{AFX_DATA_INIT(CInterior1)
    m_csDescription = _T("");
    m_csFileName = _T("");
    //}}AFX_DATA_INIT
Set the title of the Property Page    
   
}

in the above code the header and subtitle message get from the String table. i dont want get from String
Table. i want to read from the File. and then display it. how i can do it?. Give me your personnal mail id. easy to contact u.

thanks,
Rajesh. S
0
 
raju_s76Author Commented:
Hi manoj,

     In the wizard97 model. If i pressed the Cancel Button it closed the wiz97. that's fine. But before that i want ask the confirmation. How do i map the this message(Cancel Button). How do i handle this message.

can u give me solu.

thanks,
Regards,
Rajesh. S
0
All Courses

From novice to tech pro — start learning today.