?
Solved

Subclass a control on a property page: problems ???

Posted on 2001-09-12
8
Medium Priority
?
458 Views
Last Modified: 2013-11-20
This question was posted by another person on another forum, but it is exactly the issue I'm running into also. I dont know and cant find the answer he got, but someone here at EE helped him out to success and I need the same answers. Thank You.

I'm trying to dynamically subclass a field on a property page.  The code looks like this:

  BOOL CMyPropertyPage::OnInitDialog()
  {
    CPropertyPage::OnInitDialog();
    m_myedithandler.SubclassDlgItem(IDC_TEXT,this);
    return TRUE;  
  }

The SubclassDlgItem fails on an ASSERT in

  BOOL CWnd::Attach(HWND hWndNew)
  {
    ASSERT(m_hWnd == NULL);                       //OK
    ASSERT(FromHandlePermanent(hWndNew) == NULL); //fails
    ...

I used the same override logic on an edit field in a regular dialog
without any problem.  Is there something special about subclassing
on a property page?  Or can someone point me to something else
I am doing wrong?
0
Comment
Question by:CrazyLee
[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
  • 4
  • 3
8 Comments
 
LVL 3

Expert Comment

by:cypherljk
ID: 6477768
CrazyLee,
Howdy MS states that you can't assiciate DDX/DV with controls that you wish to subclass. That is your problem. Here is the link to the exact MSDN problem and how to solve it.  http://support.microsoft.com/support/kb/articles/Q113/4/21.asp

My 2 cents...
0
 
LVL 1

Expert Comment

by:MRNMurthy
ID: 6482850
Hi,

I will try & mail back to u.

From

MRN Murthy
0
 

Author Comment

by:CrazyLee
ID: 6483380
My email is rstudley@intersil.com
0
Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

 

Author Comment

by:CrazyLee
ID: 6483385
cypherljk ,
Did you get points for the answer? I'm new to the system
and havn't been able to verify.
Thanks,
Lee
0
 
LVL 3

Expert Comment

by:cypherljk
ID: 6483418
No I didn't get the points you have to accept my comment as an answer or I can submit an answer; if you like, so yo can explicitly accept it. Glad to be of help.

My2 cents.
0
 

Author Comment

by:CrazyLee
ID: 6483501
Hi,
I thought I had done it correclty, I hit accept as answer
and graded it(A+)and also tried just 'accept' and close, but have seen no feedback that it actually happened...
Be nice if they popped up a 'recieved' dialog or something.
It kept going to your info/stats page and that was it.
Thanks and let me know if it still doesnt go thru,
This is a great forum and your response was quick!

Lee
0
 
LVL 3

Accepted Solution

by:
cypherljk earned 400 total points
ID: 6483561
I'll just prospose an answer and see if that fixes it. That way you can just click accepts.  (Seems like we need some debugging with the EE code ;-)

My 2 cents...
0
 

Author Comment

by:CrazyLee
ID: 6483662
I think I was accepting AND leaving a comment and they cant both be done at the same time. Thanks again.
-Lee
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

770 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