Solved

Wizard97 Style Propertysheet

Posted on 2002-04-24
7
352 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
Comment Utility
U can load the bitmap from the direcory instead of it from the resource.

GOOD LUCK
0
 
LVL 2

Expert Comment

by:manojbkumar
Comment Utility
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
Comment Utility
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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 2

Accepted Solution

by:
manojbkumar earned 50 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
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.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

772 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now