Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Problem PropertySheets Controls

Posted on 2000-05-11
2
Medium Priority
?
322 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 15

Accepted Solution

by:
NickRepin earned 400 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
This article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
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 course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…

604 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