Solved

Wizard97 Style Propertysheet

Posted on 2002-04-24
7
353 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
  • 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
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 
LVL 2

Accepted Solution

by:
manojbkumar earned 50 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

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
lucky13 challenge 11 147
only14 challenge 19 76
sumHeights2  challenge 7 107
SQUD PROXY SERVER, UNIX, SLL/HTTPS 5 95
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 …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.

831 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