 |
|
 |
BOOL CPage2::OnSetActive()
{
SearchFiles(m_szPath, m_szFilter);
return CPropertyPage::OnSetActive();
}
CPage2 : second page in wizard property sheet.
this page not viewed and if any button (Cancel, Back, ...) is clecked there is any thin action, Until the Function SearchFiles finished.
How correct this problem ?
And Hank you.
Redhouane
|
|
|
|
 |
|
 |
Redhouane_KM wrote:
How correct this problem ?
put SearchFiles into its own thread
|
|
|
|
 |
|
 |
hi,
i built the project with vs7 and copied mfc71.dll and msvcr71.dll
to the testsystem (windows 98 with ie 4.72)
i don't get the wizard. i've got nothing. no errormessage.
if i install the ie5 the wizard runs correctly. does andybody
know the reason ?
thanks for help
emmi
|
|
|
|
 |
|
 |
Actually, it's pretty straightforward.
Wizard97 (which this code uses) is implemented in version 5.80 of the Common Controls Library - which is distributed with IE5.
Incidentally, when the article was written there was a standalone installer which would install the requisite version of comctl32.dll without the need to install IE5.
Anna
Currently working mostly on: Visual Lint
Anna's Place | Tears and Laughter
"Be yourself - not what others think you should be"
- Marcia Graesch
"Anna's just a sexy-looking lesbian tart"
- A friend, trying to wind me up. It didn't work.
|
|
|
|
 |
|
 |
Hi,
I see you are using an image that is not like a standard logo (normally it's 49 x 49).
Is this standard or do I have to expand en draw the image myself?
Best regards,
Geert
http://geert.yoki.org
|
|
|
|
 |
|
|
 |
|
 |
...Just what i was looking for.
Thanks again for sharing ur code
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
 |
|
 |
Anytime hun. I'm glad you're finding it useful.
Love the sig by the way!
Anna
Homepage | Tears and Laughter
"Be yourself - not what others think you should be"
- Marcia Graesch
"Anna's just a sexy-looking lesbian tart"
- A friend, trying to wind me up. It didn't work.
Trouble with resource IDs? Try the Resource ID Organiser Visual C++ Add-In
|
|
|
|
 |
|
 |
Okay, I am stumped.
The OnWizardFinish() gets called in the CNGWizardPage, but if I add the OnWizardNext() or OnWizardBack() to this class, they are not called.
Has anyone else had such experiences?
Here is the reason for wanting them.
I do not know how to tell from within the UpdateData of a class derived from CNGWizardPage if the UpdateData is being called because of Wizard BACK or Wizard NEXT. A property page's UpdateData gets called coming and going - forwards or backwards. I do not want to necessarily force a DDX failure if the user is going BACKWARDS in the Wizard, only want to prevent them from moving FORWARDS if the data is invalid.
I could also care less about data validation if they press the Cancel button or otherwise 'escape' from the property sheet.
The memories of a man in his old age are the deeds of a man in his prime.
|
|
|
|
 |
|
 |
Hi Blake. I hope I can help you unravel a bit of the puzzle, at least!
Firstly, I've not had any problems overriding either OnWizardBack() or OnWizardNext(). The only things I can think of that might cause overrides not to be called are mismatches in their signatures (check the base class definitions) or an incomplete rebuild.
Both methods are called from CPropertyPage::OnNotify() in response to the PSN_WIZBACK and PSN_WIZNEXT, so you should be able to trace the calls through from there.
To prevent UpdateData() from being called you'll have to override CPropertyPage::OnKillActive(), which will otherwise call it whenever the page goes inactive (and regardless of which button was pressed):
BOOL CPropertyPage::OnKillActive()
{
ASSERT_VALID(this);
if (!UpdateData())
{
TRACE0("UpdateData failed during page deactivation\n");
return FALSE;
}
return TRUE;
}
Note that you'll also want to override CPropertyPage::OnSetActive() to prevent it from transfering the contents of the page's member vars to the screen controls when going forwards - but only if the page has been active before (and therefore the user has pressed "Back").
Good luck!
Anna
Homepage | Tears and Laughter
"Be yourself - not what others think you should be"
- Marcia Graesch
"Anna's just a sexy-looking lesbian tart"
- A friend, trying to wind me up. It didn't work.
Trouble with resource IDs? Try the Resource ID Organiser Visual C++ Add-In
|
|
|
|
 |
|
 |
Thanks for the suggestions and the time spent on the analysis.
I triply checked the signatures, and the ones in your class matched the base MFC class exactly, and the ones in my derived class matched as well (even copying lines exactly from MFC's sources !!!). I also did many full rebuilds of the project. In all cases, the OnNotify() of MFC went directly to the MFC class members.
I decided to override OnNotify() myself in your class, and I track which button was pressed. In my derived class' data exchange handlers, I just examine the button tracking variable and decided whether to save the data or not. In any case, I wanted the data to go back and forth to the controls from the pages' member data, just not necessarily from the pages' member data to the data store.
Therefore, the idea was not to avoid the UpdateData entirely, but rather to know from WIHTIN one of the data exchange handlers if the wizard was going forward or backward. I did not want to necessarily force data validation on a control's data if the user was going backwards.
|
|
|
|
 |
|
 |
Blake Miller wrote:
Thanks for the suggestions and the time spent on the analysis.
Anytime.
Blake Miller wrote:
I triply checked the signatures, and the ones in your class matched the base MFC class exactly, and the ones in my derived class matched as well (even copying lines exactly from MFC's sources !!!). I also did many full rebuilds of the project. In all cases, the OnNotify() of MFC went directly to the MFC class members.
That is really, really, odd. I can't think what else to suggest I'm afraid.
Blake Miller wrote:
I decided to override OnNotify() myself in your class, and I track which button was pressed. In my derived class' data exchange handlers, I just examine the button tracking variable and decided whether to save the data or not. In any case, I wanted the data to go back and forth to the controls from the pages' member data, just not necessarily from the pages' member data to the data store.
Good idea. I hope it works out.
Anna
Homepage | Tears and Laughter
"Be yourself - not what others think you should be"
- Marcia Graesch
"Anna's just a sexy-looking lesbian tart"
- A friend, trying to wind me up. It didn't work.
Trouble with resource IDs? Try the Resource ID Organiser Visual C++ Add-In
|
|
|
|
 |
|
 |
As titled!!
Please give me a suggestion, thanks!!
|
|
|
|
 |
|
 |
hi,
Again i am disturbing you. i am using your wizard97 style. In the First Page, i am adding editbox with the property of the Multiline, and readonly the purpose is which i display in the License Information in the edit Box.
Now i am facing problem is?.. the waterMark color is also display in the editbox. that means its overlapping. How do i avoid this?... i cannt view the content in the editbox(not properly).
pl. help on this?...
thanks,
regards,
Rajesh. S
|
|
|
|
 |
|
 |
Hi
You've implemented a SetHeader & SetWatermark methods. How about also implementing a SetSideBitmap method that displays a bitmap on the left hand side of each page. Similar to the way an InstallShield wizard looks.
Great Classes Though !!
|
|
|
|
 |
|
 |
That's a great idea, but I'm afraid I'm not likely to get time to do it for a while yet - I'm fully committed at work and in porting my ResOrg Add-In to Visual Studio .NET at the moment.
Andy Metcalfe - Sonardyne International Ltd
Trouble with resource IDs? Try the Resource ID Organiser Add-In for Visual C++
"I would be careful in separating your wierdness, a good quirky weirdness, from the disturbed wierdness of people who take pleasure from PVC sheep with fruit repositories."
- Paul Watson
|
|
|
|
 |
|
 |
hi,
First of all i convay my thanks to you. How do i add a new button with in the back and Next Button.
can u give me a sample code...
thanks,
Rajesh. S
|
|
|
|
 |
|
 |
hi, Thanks, for ex: // Interior1.h i am add the the member PROPSHEETPAGE m_psp97; // Interior1.cpp i am adding the line into the Construstor CInterior1::CInterior1() : CInterior1_BASE(CInterior1::IDD) { m_psp97.dwFlags |= PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE; m_psp97.pszHeaderTitle = _T("This is the title line"); m_psp97.pszHeaderSubTitle = _T("This is the sub-title line"); } But it cant display in the header and subtitle.. What should i do?. 2. In the Wizare97 model. there are two Bmp is there know. One is IDB_WATERMARK,IDB_BANER. i want to past this two Bmp in the single page. How should i do that?. ..pl. help me very urgent.... i send mail to you. can u help me on this.... thanks a lot. Rajesh. S
|
|
|
|
 |
|
 |
Firstly, there's no need to add a PROPSHEETPAGE as a member of a Wizard Page - CPropertyPageEx has one already (CPropertyPageEx::m_psp)!
To set the title/subtitle directly without using resource IDs the following code will do the job:
CInterior2::CInterior2() : CInterior2_BASE(CInterior2::IDD){
m_strHeaderTitle = _T("This is the title line");
m_strHeaderSubTitle = _T("This is the subtitle");
}
In order to display both a watermark and a bitmap, the first thing you'll need to do is ensure the style PSP_HIDEHEADER is not set in the page you want to have the header and watermark, e.g.:
CIntroPage::CIntroPage() : CIntroPage_BASE(CIntroPage::IDD)
{
}
This will add a header to the first page, but unfortunately the watermark will dissappear, since CNGWizard::AddPage assumes (as does the Wizard97 control itself) that a page won't have both a watermark and header.
void CNGWizard::AddPage(CNGWizardPage* pPage)
{
if ( (pPage->m_psp.dwFlags & PSP_HIDEHEADER) != 0)
{
pPage->SetWatermark(m_uWatermarkID, m_eWatermarkStyle);
}
CNGWizard_BASE::AddPage(pPage);
}
Fortunately, the solution is straightforward, though it involves a little legwork. In your CNGWizard derived class, override AddPage() as above but omit the check for PSP_HIDEHEADER, and ensure you call SetWatermark() for all pages you want to have a watermark.
Good luck!
Andy Metcalfe - Sonardyne International Ltd
Trouble with resource IDs? Try the Resource ID Organiser Add-In for Visual C++
"I would be careful in separating your wierdness, a good quirky weirdness, from the disturbed wierdness of people who take pleasure from PVC sheep with fruit repositories."
- Paul Watson
|
|
|
|
 |
|
 |
Hi,
i need add a headertitle and subtitle dynamically how?.
without using string table. for ex. Header and subtitle of is in the text file means how i can add into project page?.
can u give me a idea or sample code?.
thanks,
Rajesh. S(rajesh_s76@hotmail.com)
|
|
|
|
 |
|
 |
Looking through the code for CPropertyPageEx, I noticed that although the class takes IDs for string table entries, all it does is load them into two member variables - m_strHeaderTitle and m_strHeaderSubTitle.
These are used to set m_psp.pszHeaderTitle and m_psp.pszHeaderSubTitle in each page, in CPropertySheetEx::BuildPropPageArray(), which is called from CPropertySheet::DoModal():
void CPropertySheetEx::BuildPropPageArray()
{
delete[] (PROPSHEETPAGE*)m_psh.ppsp;
m_psh.ppsp = NULL;
<br>
PROPSHEETPAGE* ppsp = new PROPSHEETPAGE[m_pages.GetSize()];
m_psh.ppsp = (LPPROPSHEETPAGE)ppsp;
BOOL bWizard = (m_psh.dwFlags & (PSH_WIZARD | PSH_WIZARD97));
for (int i = 0; i < m_pages.GetSize(); i++)
{
CPropertyPage* pPage = GetPage(i);
memcpy(&ppsp[i], &pPage->m_psp, sizeof(pPage->m_psp));
ppsp[i].dwSize = sizeof(PROPSHEETPAGE);
if (pPage->IsKindOf(RUNTIME_CLASS(CPropertyPageEx)))
{
CPropertyPageEx* pPageEx = (CPropertyPageEx*)pPage;
if (!pPageEx->m_strHeaderTitle.IsEmpty())
{
ppsp[i].pszHeaderTitle = pPageEx->m_strHeaderTitle;
ppsp[i].dwFlags |= PSP_USEHEADERTITLE;
}
if (!pPageEx->m_strHeaderSubTitle.IsEmpty())
{
ppsp[i].pszHeaderSubTitle = pPageEx->m_strHeaderSubTitle;
ppsp[i].dwFlags |= PSP_USEHEADERSUBTITLE;
}
}
pPage->PreProcessPageTemplate(ppsp[i], bWizard);
}
m_psh.nPages = m_pages.GetSize();
}
Hence the titles of the pages can be set at any time up until the Wizard is invoked.
Once the wizard pages have been created you may still be able to change the title/subtitle by allocating a new string and changing m_psp.pszHeaderTitle and m_psp.pszHeaderSubTitle to point to the new strings (don't forget to free the old ones though!). Be aware though that it may not work - it depends upon how co-operative the underlying Wizard97 control is.
Good luck!
Andy Metcalfe - Sonardyne International Ltd
Trouble with resource IDs? Try the Resource ID Organiser Add-In for Visual C++
"I would be careful in separating your wierdness, a good quirky weirdness, from the disturbed wierdness of people who take pleasure from PVC sheep with fruit repositories."
- Paul Watson
|
|
|
|
 |
|
 |
hi, Thanks, for ex: // Interior1.h i am add the the member PROPSHEETPAGE m_psp97; // Interior1.cpp i am adding the line into the Construstor CInterior1::CInterior1() : CInterior1_BASE(CInterior1::IDD) { m_psp97.dwFlags |= PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE; m_psp97.pszHeaderTitle = _T("This is the title line"); m_psp97.pszHeaderSubTitle = _T("This is the sub-title line"); } But it cant display in the header and subtitle.. What should i do?. 2. In the Wizare97 model. there are two Bmp is there know. One is IDB_WATERMARK,IDB_BANER. i want to past this two Bmp in the single page. How should i do that?. ..pl. help me very urgent.... i send mail to you. can u help me on this.... thanks a lot. Rajesh. S
|
|
|
|
 |
|
 |
The wizard works great even under NT4 (SP5). However, when I run under Windows 95 I get:
"This program has performed an illegal operation" in module .
This is a a raw Windows 95 SP1 without anything else except I did install MFC42.DLL and MSVCRT.DLL, of course. What else is required?
I'm not sure this matters as not that many people still use Windows 95 I believe. Does anyone have some figures?
Andrew Phillips
andrew @ expertcomsoft.com
|
|
|
|
 |
|
 |
That's a little worrying, though you're probably right - not many people are using Win95 anymore!
Running the executable through Dependency Walker (supplied with VC 6.0) confirms that the only non-core DLLs it uses are indeed MFC42.DLL and MSVCRT.DLL (versions 6.0.8665.0 and 6.1.8924.0 respectively on my Win2000 laptop), so you did exactly the right thing.
The only thing I can think of is that the MFC42.DLL and MSVCRT.DLL you installed were earlier versions (pre-SP3 is bad news!), but that's admittedly speculation on my part.
I have actually run the demo on a Win95 (OSR2) machine before now, and the only thing wrong was that pages with watermarks didn't paint quite right - presumably controls don't support transparent backgrounds on Win95.
One thing you could try is to rebuild the demo with debug info turned on in the release build and run it under the debugger (remote debugging is good for this if the box is an old one) to see where the crash happens. I'd be interested to see the results.
Good luck, and I hope you find the code useful.
Andy Metcalfe - Sonardyne International Ltd
Trouble with resource IDs? Try the Resource ID Organiser Add-In for Visual C++
"I would be careful in separating your wierdness, a good quirky weirdness, from the disturbed wierdness of people who take pleasure from PVC sheep with fruit repositories."
- Paul Watson
|
|
|
|
 |
|
 |
hi,
i want to use the water256 and Baner256 bitmap file dynamically. how i can use in the wizard97 property style. for ex. these to bitmap file in my current working dir. if the user update the Bmp means then the wizard97 property page also need to chage how?....
give me any idea
thanks,
regards,
Rajesh. S
|
|
|
|
 |