?
Solved

Wizard97 Style Propertysheet

Posted on 2002-04-24
7
Medium Priority
?
361 Views
Last Modified: 2013-11-20
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)
0
Comment
Question by:raju_s76
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 23

Expert Comment

by:Roshan Davis
ID: 6965265
U can load the bitmap from the direcory instead of it from the resource.

GOOD LUCK
0
 
LVL 2

Expert Comment

by:manojbkumar
ID: 6965523
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
 

Author Comment

by:raju_s76
ID: 6970387
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 2

Accepted Solution

by:
manojbkumar earned 150 total points
ID: 6970460
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
 

Author Comment

by:raju_s76
ID: 6970643
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
 

Author Comment

by:raju_s76
ID: 6976006
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
 

Author Comment

by:raju_s76
ID: 7071920
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

Featured Post

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

718 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