Print Page | Close Window

Trapping Property Sheet buttons messages

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=24006
Printed Date: 21 November 2024 at 11:05am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Trapping Property Sheet buttons messages
Posted By: mstj
Subject: Trapping Property Sheet buttons messages
Date Posted: 25 June 2020 at 1:22pm
(I moved this post to this sub-forum which is more appropriate and deleted the old post)

Hello.

I'm having trouble trapping any message coming from the property sheet to pages, especially when I click on OK | Cancel | Apply buttons.

First thing I tried was whether I could trap a button click on the Property Sheet.
It seems that a simple ON_BN_CLICKED with the appropriate button ID like so:

   ON_BN_CLICKED(IDOK, OnBnClickedOk)
   ON_BN_CLICKED(IDCANCEL, OnBnClickedClose)
   ON_BN_CLICKED(ID_APPLY_NOW, OnBnClickedApply)

doesn't do anything.

Following the source code, its seems that a SendMessage(WM_NOTIFY) is sent to each page after a button click.  So I could trap some message in the Property Page but WM_NOTIFY is usually not used as an ON_MESSAGE(WM_NOTIFY) to trap anything. 

Another funny thing:  The property sheet sample is pretty silent about it.

So how can I trap any button messages either on the Property Sheet or Page ?




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net