Solved

Problem PropertySheets Controls

Posted on 2000-05-11
2
280 Views
Last Modified: 2013-12-03
When using the PropertySheet Control (form comctl32.dll) the program receives a WM_NOTIFY message when the user presses the "Back", "Next", "Finish" or "Cancel" button. The lParam now points to a struct which can be used to get the type of action the user wants. E.g. PSN_WIZFINISH when the user presses "Finish" and PSN_WIZNEXT when the user presses "Next".
When my program receives a PSN_WIZNEXT or PSN_WIZFINISH the program validates the input given by the user.

My problem now is that when the input is invalid the program should stay on the same dialog and so in that case I return -1 (as the MSDN library describes). But... the program still goes to the next dialog (!?).

How do I fix this problem?
0
Comment
Question by:eelko
2 Comments
 
LVL 15

Accepted Solution

by:
NickRepin earned 100 total points
ID: 2802165
Dialog procedures may return TRUE or FALSE only.

To return result to the notification message, use the following code:


    SetWindowLong(hPropPage,DWL_MSGRESULT,-1);
    return TRUE;
0
 
LVL 2

Author Comment

by:eelko
ID: 2809916
You're right. That was the mistake I made. It now works perfectly!
Thanks.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

896 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

15 Experts available now in Live!

Get 1:1 Help Now