song.huiju | 3 Dec 09:24 2010
Picon

menu does not work

hi, all.
I migarate a vc 6.0 project to vc 2005. The project is a IE plug-in, using wtl 7.1, in vc 6.0 , after migarated to
VS 2005, using wtl 8.1. After migaration, the CMenu is not work, as if the menu resource can't be loaded. 

------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/wtl/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/wtl/join
    (Yahoo! ID required)

<*> To change settings via email:
    wtl-digest@... 
    wtl-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
    wtl-unsubscribe@...

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

dennisyjiang | 12 Dec 12:32 2010
Picon

Dialog activation issue (hard problem?)

Hi Everyone,

I have this problem for a long time and hope to find a solution for it. It is very cumbersome to describe, so
please bear with me.

I have developed a CAD application using WTL. The screen is divided into two parts. The main window on left
size is a 3D canvas. The right side is 3DS like interface that uses an embedded tab control/view to host
various GUI pages. Each page hosts one or more dialogs which itself host various UI wedgets, eg. radio
button, edit control. 

The problem: every time I want access any non-hot tracking UI wedgets, I have to double click it: 1st time to
activate the dialog, 2nd time to actually use the GUI control itself.

This is very annoying as user would not expect double clicks. My way of getting around this is to use
SetCapture for mouse and SetFocus for keyboard on mouse move or mouse enter event. I do this both for the
embedded dialogs and for the 3D canvas window. That is,when mouse enters the embedded dialogs,
SetCapture and SetFocus is called to set focus/capture to the dialog where mouse cursor is. When the mouse
is moved back into the 3D canvas, I do the same. This introduce another annoyance: when the mouse cursor is
moved back to 3D canvas, any floating non-modal dialog will NOT get focus, unless the mouse cursor is set to
a hot-tracking widget (e.g. a button that reacts to mouse enter event) in the non-modal dialog. This means
I have to make all controls in the non-modal dialog track with the
  mouse movement. But as the application must run as an ActiveX control in another host, I have no controls to
any non-modal dialog displayed by the 3rd party host.

Is there any way to get around this problem? I can give you access to my software if my explanation of the
problem is not clear enough.

I know this is probably not WTL problem per se. But as the entire application is built with WTL, I think my
question is still relevant. Any help is appreciated. 

(Continue reading)

Joe Andrieu | 12 Dec 14:35 2010
Picon

Re: Dialog activation issue (hard problem?)

Dennis,

It sounds like you should be able to solve this by putting both "parts" 
into the same top-level window. What classes are you using for the two 
parts? I think you might need to move from a Dialog to a different 
window type, but otherwise, the only thing you should have to do is 
create a common parent to both "parts". Windows likes embedding windows 
within windows...

Another option to explore would be to handle the activation click on the 
dialog box explicitly, passing it through to the appropriate child 
widget, rather than capturing the mouse. I'm not fluent in the details 
it would take to do that, but I'd try it if switching from a dialog and 
making a common parent doesn't work.

-j

Joe Andrieu
joe@...
+1 (805) 705-8651

On 12/12/2010 3:32 AM, dennisyjiang wrote:
> Hi Everyone,
>
> I have this problem for a long time and hope to find a solution for it. It is very cumbersome to describe, so
please bear with me.
>
> I have developed a CAD application using WTL. The screen is divided into two parts. The main window on left
size is a 3D canvas. The right side is 3DS like interface that uses an embedded tab control/view to host
various GUI pages. Each page hosts one or more dialogs which itself host various UI wedgets, eg. radio
(Continue reading)

Dan Jiang | 13 Dec 01:12 2010
Picon

RE: Dialog activation issue (hard problem?)


Hi Joe,
Thanks for the suggestions! The number of dialogs involved is over 15. So converting each of them into a
CWindow is out of question due to amount of work involved. The dialogs and 3D canvas do share the same parent
but they do not live on same levels.
Handing activation click sounds a way to go. Do you know what message is translated into dialog activation
click? WM_MOUSEDOWN?
Thanks again,
Dennis

To: wtl@...
From: joe@...
Date: Sun, 12 Dec 2010 05:35:46 -0800
Subject: Re: [wtl] Dialog activation issue (hard problem?)

    

      
      Dennis,

It sounds like you should be able to solve this by putting both "parts" 

into the same top-level window. What classes are you using for the two 

parts? I think you might need to move from a Dialog to a different 

window type, but otherwise, the only thing you should have to do is 

create a common parent to both "parts". Windows likes embedding windows 

(Continue reading)

Dan Jiang | 13 Dec 01:26 2010
Picon

RE: Dialog activation issue (hard problem?)


Found this article:http://chabster.blogspot.com/2010/03/focus-and-window-activation-in-win32.html
It seems I need to handle WM_ACTIVATE? i.e.,  on receving one the messages, instead of passing the control to
default dialog procedure, I need to call SetFocus on the GUI widget that was clicked?
Thanks,
Dennis
> To: wtl@...
> From: danjiang@...
> Date: Sun, 12 Dec 2010 19:12:06 -0500
> Subject: RE: [wtl] Dialog activation issue (hard problem?)
> 
> 
> Hi Joe,
> Thanks for the suggestions! The number of dialogs involved is over 15. So converting each of them into a
CWindow is out of question due to amount of work involved. The dialogs and 3D canvas do share the same parent
but they do not live on same levels.
> Handing activation click sounds a way to go. Do you know what message is translated into dialog activation
click? WM_MOUSEDOWN?
> Thanks again,
> Dennis
> 
> To: wtl@...
> From: joe@...
> Date: Sun, 12 Dec 2010 05:35:46 -0800
> Subject: Re: [wtl] Dialog activation issue (hard problem?)
> 
> 
> 
> 
> 
(Continue reading)

Dani | 18 Dec 23:39 2010
Picon

Mainframe menu position (as in explorer)

Hi,
I'm creating an application which has a breadcrumb which looks similar to explorer's. It starts with the
control menu hidden. When the user presses "Alt" the menu toggles between visible/hidden. I'm using

SetMenu(mainmaun) and SetMenu(NULL)

The problem is the menu appears *above* my own breadcrums, and I can't find a way to make it appear below it(as
in explorer). Is there any way to position the menu?

thanks, Dan

------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/wtl/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/wtl/join
    (Yahoo! ID required)

<*> To change settings via email:
    wtl-digest@... 
    wtl-fullfeatured@...

<*> To unsubscribe from this group, send an email to:
(Continue reading)

Igor Tandetnik | 19 Dec 00:26 2010

Re: Mainframe menu position (as in explorer)

Dani <dmagn25@...> wrote:
> I'm creating an application which has a breadcrumb which looks similar to explorer's. It starts with the
control menu hidden.
> When the user presses "Alt" the menu toggles between visible/hidden. I'm using 
> 
> SetMenu(mainmaun) and SetMenu(NULL)
> 
> The problem is the menu appears *above* my own breadcrums, and I can't find a way to make it appear below
it(as in explorer). Is
> there any way to position the menu? 

In Explorer, it's not a real menu bar (the kind you manage with SetMenu). It's actually a toolbar with its
buttons cleverly custom-drawn to look like menu items. You can see that with Spy++. It's all smoke and mirrors.
--

-- 
Igor Tandetnik

------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/wtl/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/wtl/join
    (Yahoo! ID required)

(Continue reading)

Shan Lin | 20 Dec 09:14 2010
Picon

Re: Mainframe menu position (as in explorer)


--- In wtl@..., "Igor Tandetnik" <itandetnik <at> ...> wrote:
>
> Dani <dmagn25 <at> ...> wrote:
> > I'm creating an application which has a breadcrumb which looks similar to explorer's. It starts with the
control menu hidden.
> > When the user presses "Alt" the menu toggles between visible/hidden. I'm using 
> > 
> > SetMenu(mainmaun) and SetMenu(NULL)
> > 
> > The problem is the menu appears *above* my own breadcrums, and I can't find a way to make it appear below
it(as in explorer). Is
> > there any way to position the menu? 
> 
> In Explorer, it's not a real menu bar (the kind you manage with SetMenu). It's actually a toolbar with its
buttons cleverly custom-drawn to look like menu items. You can see that with Spy++. It's all smoke and mirrors.
> -- 
> Igor Tandetnik
>

try:  SetParent(hwnd );//hwnd is your explore's hwnd
if not work   ----modify window's style and exstyle

------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/wtl/

(Continue reading)

Dani | 22 Dec 08:48 2010
Picon

Re: Mainframe menu position (as in explorer)


--- In wtl@..., "Igor Tandetnik" <itandetnik <at> ...> wrote:
>
> Dani <dmagn25 <at> ...> wrote:
> > I'm creating an application which has a breadcrumb which looks similar to explorer's. It starts with the
control menu hidden.
> > When the user presses "Alt" the menu toggles between visible/hidden. I'm using 
> > 
> > SetMenu(mainmaun) and SetMenu(NULL)
> > 
> > The problem is the menu appears *above* my own breadcrums, and I can't find a way to make it appear below
it(as in explorer). Is
> > there any way to position the menu? 
> 
> In Explorer, it's not a real menu bar (the kind you manage with SetMenu). It's actually a toolbar with its
buttons cleverly custom-drawn to look like menu items. You can see that with Spy++. It's all smoke and mirrors.
> -- 
> Igor Tandetnik
>

Thank you very much, I'll try and implement something like this.

------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/wtl/

<*> Your email settings:
(Continue reading)


Gmane