Paul Bludov | 1 Nov 02:57 2000
Picon

Re: Bugs

> Is someone keeping a file repository with all the bug fixes to date, or by
> 'patches' do you mean you've made the code changes yourself as you've
> heard of them?

I do. http://www.codeproject.com/wtl/wtl_bugs.asp

Nenad Stefanovic | 1 Nov 11:08 2000
Picon

RE: Bug: vertical toolbar/rebar ==> no redraw of window con tent!

Hi Carlos,

Layout code in CFrameWindowImpl was designed for a simple case of a
horizontal toolbar/rebar and a status bar. If you want to have a vertical
toolbar, you'll have to override UpdateLayout and add code to calculate
layout for a vertical toolbar.

Thanks,
Nenad

-----Original Message-----
From: carlos.ferraro-cavallini@...
[mailto:carlos.ferraro-cavallini@...]
Sent: Tuesday, October 31, 2000 5:51 AM
To: wtl@...
Subject: [wtl] Bug: vertical toolbar/rebar ==> no redraw of window
content!

Hi!

(First of all: I'm running WTL w/ the most up-to-day patches. Then, 
for all the questions here, I just created a clean new project with 
the wizard, one with only toolbar support and another with 
toolbar+rebar, no command bar, just to make sure that the problems 
weren't caused by my own code..)

I don't know if this has being discussed here before. I simply needed 
to have a vertical toobal attached to the left, so I tried first to 
simply use a toolbar, no rebar, no command bar, with the vertical 
style (CCS_VERT | TBSTYLE_WRAPABLE). There were some bugs then:
(Continue reading)

carlos.ferraro | 1 Nov 17:55 2000

Bugfix [Was: Re: Bug: vertical toolbar/rebar ]

--- In wtl@..., Nenad Stefanovic <nenads <at> m...> wrote:
> Hi Carlos,
> 
> Layout code in CFrameWindowImpl was designed for a simple case of a
> horizontal toolbar/rebar and a status bar. If you want to have a 
vertical
> toolbar, you'll have to override UpdateLayout and add code to 
calculate
> layout for a vertical toolbar.
> 
> Thanks,
> Nenad

First of all, thanks for your quick answer!

I found out that if we only change a little bit in 
CFrameWindowImplBase::UpdateBarsPosition, then everything is fine! :)
Here's my working code, feel free to do what you want with it.

void UpdateBarsPosition(RECT& rect, BOOL bResizeBars = TRUE)
{
// resize toolbar
DWORD dwStyles = (DWORD)::GetWindowLong(m_hWndToolBar, GWL_STYLE) ;
if(m_hWndToolBar != NULL && (dwStyles & WS_VISIBLE))
{
if(bResizeBars)
::SendMessage(m_hWndToolBar, WM_SIZE, 0, 0);
RECT rectTB;
::GetWindowRect(m_hWndToolBar, &rectTB);
// Check the orientation!
(Continue reading)

Lipp Christian | 2 Nov 11:12 2000

RE: RE: Menu loading

Hi Nenad!

Sorry for this late reply, but I have been out of office
for one week.

> I've never heard of an issue like that. The only thing 
> different than usual
> in your description is that you have MENUEX resource, instead 
> of the usual
> MENU one. I don't know why would that make a difference, but 
> maybe you can
> check if flags for MENUITEMs are OK.

MENUEX is generated by WTL-wizard, I tried to change it back
to MENU, but this leads to ressource compiler errors since the
extension is used.

> If you comment command bar lines, does the menu appear in the app?

No, the menu doesn't appear.
I also checked the CREATESTRUCT in the OnCreate-Event,
the handle of the menu is NULL there.

> HINSTANCE hInst = _Module.GetResourceInstance();
> CFrameWndClassInfo& oClassInfo = GetWndClassInfo();
> 
> LPCTSTR lpMenuName =
> MAKEINTRESOURCE(oClassInfo.m_uCommonResourceID);
> HMENU hMenu = ::LoadMenu(hInst, lpMenuName);
> if (!hMenu) {
(Continue reading)

Nenad Stefanovic | 2 Nov 11:56 2000
Picon

RE: RE: RE: Menu loading

Hi Christian,

> MENUEX is generated by WTL-wizard

Well, that is not likely, WTL App Wizard does not use MENUEX at all, only
MENU resources.

I have to conclude that your MENUEX resource is not valid. There is probably
some value somewhere that is causing the problem. You can try replacing it
with another, simpler, menu, and than adding lines to track down which one
causes LoadMenu to fail.

Thanks,
Nenad

-----Original Message-----
From: Lipp Christian [mailto:Christian.Lipp@...]
Sent: Thursday, November 02, 2000 2:12 AM
To: 'wtl@...'
Subject: [wtl] RE: RE: Menu loading

Hi Nenad!

Sorry for this late reply, but I have been out of office
for one week.

> I've never heard of an issue like that. The only thing 
> different than usual
> in your description is that you have MENUEX resource, instead 
> of the usual
(Continue reading)

Lipp Christian | 2 Nov 13:43 2000

RE: RE: RE: RE: RE: Menu loading

Hi Nenad,

You are right (as always), MENU is created,
I changed MENUEX back to MENU and corrected div. entries
and everything is fine again.

I never changed the ressource, it seems that VC changes the
typ when I use an extended attribute.

Though it was strange, that it occurred only on certain computers
and on NT and not Win95. But I will not investigate any further.

Thanks for your help,
Christian

> Hi Christian,
> 
> > MENUEX is generated by WTL-wizard
> 
> Well, that is not likely, WTL App Wizard does not use MENUEX at all, only
> MENU resources.
> 
> I have to conclude that your MENUEX resource is not valid. There is
probably
> some value somewhere that is causing the problem. You can try replacing it
> with another, simpler, menu, and than adding lines to track down which one
> causes LoadMenu to fail.
> 
> Thanks,
> Nenad
(Continue reading)

Lipp Christian | 3 Nov 08:50 2000

Question to Nenad (was Re: Toggling the Splitter Views)

> For toggling the view panes, showing or hiding one of the pane(s), 
> I have a toolbar for this purpose. Here I am dynamically showing or 
> hiding one of splitter views.
> After hiding I am calling the UpdateSplitterLayout( ). But the view 
> does not happen to update properly. I also want the LeftSplitter 
> entirely to be hidden so I have only the Right Pane visible. 

I had the same problem. Nenad gave me the following hint:

> Middle view should be a splitter window. Let's say that the
> splitter is assigned to a variable called m_hWndMiddleView.
> You can easily hide one pane by replacing the splitter window
> with that pane, just assign the pane window handle to
> m_hWndMiddleView and call UpdateLayout. And, of course,
> hide the splitter and the other pane (ShowWindow(SW_HIDE)).

I tried this in the mainframe, but it didn't work, because the
splitter window is the parent window of the splitter panes, so
if you hide the splitter window, the panes can't be visible.

Therefore I tried to use a derived class. The splitter window
is now always visible, I still hide the other splitter pane
and the splitter bar (actually not hide, but prevent from
being drawn).

Here is the code:

#ifndef SPLITTEREX_H
#define SPLITTEREX_H

(Continue reading)

Nenad Stefanovic | 3 Nov 10:24 2000
Picon

RE: RE: RE: RE: RE: RE: Menu loading

Hi Christian,

It is quite possible that VC changes MENU to MENUEX if you use properties
that are supported only in MENUEX.

Since commenting out command bar calls results in a missing menu, something
is wrong with the MENUEX resource. It might be something related to version
of Windows (or IE) that you have on your system.

Thanks,
Nenad

-----Original Message-----
From: Lipp Christian [mailto:Christian.Lipp@...]
Sent: Thursday, November 02, 2000 4:44 AM
To: 'wtl@...'
Subject: [wtl] RE: RE: RE: RE: RE: Menu loading

Hi Nenad,

You are right (as always), MENU is created,
I changed MENUEX back to MENU and corrected div. entries
and everything is fine again.

I never changed the ressource, it seems that VC changes the
typ when I use an extended attribute.

Though it was strange, that it occurred only on certain computers
and on NT and not Win95. But I will not investigate any further.

(Continue reading)

Nenad Stefanovic | 3 Nov 10:27 2000
Picon

RE: Question to Nenad (was Re: Toggling the Splitter Views)

Hi Christian,

My suggestion was for multiple splitters, so I was talking about hiding a
splitter that is inside of a pane of another splitter window.

Unfortunately, there no easy way to override UpdateSplitterLayout without
modifying the sources. Now for the good news: showing only one splitter pane
will be directly supported in the new version of WTL.

Cheers,
Nenad

-----Original Message-----
From: Lipp Christian [mailto:Christian.Lipp@...]
Sent: Thursday, November 02, 2000 11:50 PM
To: 'wtl@...'
Subject: [wtl] Question to Nenad (was Re: Toggling the Splitter Views)

> For toggling the view panes, showing or hiding one of the pane(s), 
> I have a toolbar for this purpose. Here I am dynamically showing or 
> hiding one of splitter views.
> After hiding I am calling the UpdateSplitterLayout( ). But the view 
> does not happen to update properly. I also want the LeftSplitter 
> entirely to be hidden so I have only the Right Pane visible. 

I had the same problem. Nenad gave me the following hint:

> Middle view should be a splitter window. Let's say that the
> splitter is assigned to a variable called m_hWndMiddleView.
> You can easily hide one pane by replacing the splitter window
(Continue reading)

anders.wetterqvist | 3 Nov 14:59 2000
Picon

MDI + Form view


I have created an ATL/WTL project and chosen the MDI & dialog based
form view options. On the form I have placed Ok/Cancel buttons.

When either of those buttons are clicked I'd like to do some 
processing and then close the form. How do I close the form after
I'm through with the processing in the OnOk/OnCancel handlers?


Gmane