Solved

Problem PropertySheets Controls

Posted on 2000-05-11
2
297 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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
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 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…

749 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