|
-
Mar 3rd, 2003, 07:10 AM
#1
Thread Starter
Fanatic Member
Property Sheet / Property Page interaction
Hello and thanks for reading.
I have a Property sheet in my Dialog application in which I have overridden the default operations of a few buttons. I've changed one of these buttons to "Clear". When it is clicked, I want to delete the contents of an edit box on one of the property pages. I'm trying to retrieve the CWnd of the edit box from the Property Sheet so that I can clear it out, but I'm not having any luck. Here's my code:
VB Code:
CWnd* pWndEdit;
pWndEdit = GetActivePage()->GetDlgItem(IDC_EDIT_SUBJECT,GetActivePage()->m_hWnd);
I keep getting an error saying "IDC_EDIT_SUBJECT" is an undeclared identifier. How do I get the property sheet to recognize the ID of the edit box on the property page?
Thanks,
OneSource
-
Mar 7th, 2003, 02:37 PM
#2
Are you sure the identifier is valid and "resource.h" is included?
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Mar 12th, 2003, 05:19 AM
#3
Thread Starter
Fanatic Member
That was it!
CornedBee,
I didn't include "resource.h" in the property sheet. After doing so, everything worked like a charm! Thanks for your help.
Actually, my work around until your post did involve "resource.h". I opened the file and got the unique integer ID of the controls and used that on the property sheet and it worked. The code looked like this:
Code:
CWnd* pWndEdit;
pWndEdit = GetActivePage()->GetDlgItem(1093);
Of course, just including "resource.h" is simpler, more direct and just better all around!
Thanks again!
OneSource
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|