Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Child windows can’t get their messages
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Child windows can’t get their messages

 Post Reply Post Reply
Author
Message
mehran20 View Drop Down
Newbie
Newbie


Joined: 10 September 2005
Location: Iran
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote mehran20 Quote  Post ReplyReply Direct Link To This Post Topic: Child windows can’t get their messages
    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



Edited by mehran20
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 19 October 2005 at 8:38am

Can't reproduce problem. See sample:

2005-10-19_083838_cc.zip

 

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
mehran20 View Drop Down
Newbie
Newbie


Joined: 10 September 2005
Location: Iran
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote mehran20 Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.157 seconds.