Solved

Problem PropertySheets Controls

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

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…
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
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…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

708 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

13 Experts available now in Live!

Get 1:1 Help Now