Print Page | Close Window

Child windows can’t get their messages

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=3061
Printed Date: 06 October 2024 at 3:27am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Child windows can’t get their messages
Posted By: mehran20
Subject: Child windows can’t get their messages
Date Posted: 19 October 2005 at 8:17am

Hi,
I'm trying to work with Command Bars, and ...
As you know CXTPControlCustom::CreateControlCustom method gets a CWnd* and shows it in as the content of the command bar control.
I wanted to create a complex command bar control, including an EditBox and a CSliderCtrl which the EditBox shows the silder's current position's.
So I created a dialog box (CDialog inherited class) and put an EditBox and a slider in it. Then I put it in a command bar control and showed it. And then there it was, nice and clean, but with a problem.
The problem, which I can't pass it by easily, is that the EditBox and slider can't get windows messages!! I mean I can't silde the silder and can't type anything in the EditBox. After spending some times, I realized that if I set the CFrameWnd (CommandBar's container) as the parent window of the silder (instead of dialog) it will get the messages but it's not in the dialog window anymore, which is not acceptable.
So can I have a window, with child windows in it, as a command bar control?
If it matters, I'm using the 9.6 version.

Thanks,
Mehran Ziadloo




Replies:
Posted By: Oleg
Date Posted: 19 October 2005 at 8:38am

Can't reproduce problem. See sample:

http://forum.codejock.com/uploads/oleg/2005-10-19_083838_cc.zip - 2005-10-19_083838_cc.zip

 



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: mehran20
Date Posted: 19 October 2005 at 11:33pm

First of all thank you for your sample project.

That's strange because my code is exactly like yours but it's frozen!!

After some another time that I spend, I realized that my window is disabled. So I tried to enable it by EnableWindow(TRUE), but it didn't work. The only way I could enable my window was to put the EnableWindow(TRUE) in the OnWndMsg method of my dialog!! Which means that my window was getting disabled all the time. Do you know what is happening?

Thanks again,
Mehran Ziadloo




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