dmagn25 | 2 Sep 12:55 2010
Picon

Using SetWindowTheme with CCustomDraw

Hi,

I've created a listview and used setwindowtheme to make it look like explorer's, using
SetWindowTheme(hwnd, L"Explorer", NULL);

Than I needed some extra modification to the way the data is displayed so I've started to custom draw the
control (using CCustomdraw). In result the explorer theme is gone... 

Is there anyway to use the theme with custom draw? (i'm only drawing 
the text and icons, I want the background/selection colors to be the same as in explorer's theme) - or am I
doing something totally wrong?

thanks=

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

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@... 
(Continue reading)

addicted2freefall | 2 Sep 17:32 2010
Picon

Adding dialogs as pages to a WTL::CTabCtrl

I've created a WTL dialog application, and added a CTabCtrl to the CMainDlg, in order to house the main
interface categories, which I've implemented as borderless, child dialogs.

I've created the child dialog(s) as having the tab control as the parent window:

        m_StreamPage.Create( m_tabCtrl, m_rectTabCtrl );
        m_StreamPage.SetWindowLongW( GWL_STYLE, WS_CHILD );
        m_StreamPage.ShowWindow(SW_SHOW);

But I can't seem to position the dialogs after creation time - they always appear over the top of the tab
controls, and I can't move them down. I call this function below to attempt to position the child dialogs,
but they never move.

void CMainDlg::SetTabClientRectangle()
{
        RECT tabRect, itemRect;	

	m_tabCtrl.GetItemRect(0, &itemRect);
	m_tabCtrl.GetClientRect(&tabRect);	

	tabRect.top	+= itemRect.bottom + 2;
	tabRect.bottom	-= 1;			

	m_StreamPage.SetWindowPos(m_tabCtrl.m_hWnd, &tabRect, SWP_SHOWWINDOW); 
}

I think I may be failing to remove a window style from the child dialog after it's initially created.

All insights greatly appreciated.

(Continue reading)

Dick Dievendorff | 2 Sep 18:07 2010
Picon
Picon

RE: Adding dialogs as pages to a WTL::CTabCtrl

I converted my tabbed dialog application to a property sheet because I
needed the tabs themselves to be tab stops, which was necessary to have them
spoken by a screen reader.

Before doing that my blind users were having difficulties.  I learned a lot
working with them!

I disabled and hid the property sheet buttons and then expanded the tab
control within the property sheet to cover over where the buttons used to
be.

Dick

From: wtl@...
[mailto:wtl@...] On Behalf Of
addicted2freefall
Sent: Thursday, September 02, 2010 8:32 AM
To: wtl@...
Subject: [wtl] Adding dialogs as pages to a WTL::CTabCtrl

I've created a WTL dialog application, and added a CTabCtrl to the CMainDlg,
in order to house the main interface categories, which I've implemented as
borderless, child dialogs.

I've created the child dialog(s) as having the tab control as the parent
window:

m_StreamPage.Create( m_tabCtrl, m_rectTabCtrl );
m_StreamPage.SetWindowLongW( GWL_STYLE, WS_CHILD );
m_StreamPage.ShowWindow(SW_SHOW);
(Continue reading)

addicted2freefall | 2 Sep 18:20 2010
Picon

Re: Adding dialogs as pages to a WTL::CTabCtrl

I'd prefer to avoid having to convert everything to property sheets if possible....

--- In wtl@..., "Dick Dievendorff" <dieven <at> ...> wrote:
>
> I converted my tabbed dialog application to a property sheet because I
> needed the tabs themselves to be tab stops, which was necessary to have them
> spoken by a screen reader.
> 
>  
> 
> Before doing that my blind users were having difficulties.  I learned a lot
> working with them!
> 
>  
> 
> I disabled and hid the property sheet buttons and then expanded the tab
> control within the property sheet to cover over where the buttons used to
> be.
> 
>  
> 
> Dick
> 
>  
> 
>  
> 
>  
> 
> From: wtl@...
(Continue reading)

Dick Dievendorff | 2 Sep 18:30 2010
Picon
Picon

RE: Re: Adding dialogs as pages to a WTL::CTabCtrl

I would have preferred a less dramatic conversion as well, had I been able
to get the tabbed dialog to work as my blind users needed.

Dick

From: wtl@...
[mailto:wtl@...] On Behalf Of
addicted2freefall
Sent: Thursday, September 02, 2010 9:20 AM
To: wtl@...
Subject: [wtl] Re: Adding dialogs as pages to a WTL::CTabCtrl

I'd prefer to avoid having to convert everything to property sheets if
possible....

--- In wtl@... <mailto:wtl%40yahoogroups.com> , "Dick
Dievendorff" <dieven <at> ...> wrote:
>
> I converted my tabbed dialog application to a property sheet because I
> needed the tabs themselves to be tab stops, which was necessary to have
them
> spoken by a screen reader.
> 
> 
> 
> Before doing that my blind users were having difficulties. I learned a lot
> working with them!
> 
> 
> 
(Continue reading)

davies Jonathan | 3 Sep 11:58 2010

RE: Adding dialogs as pages to a WTL::CTabCtrl

Hi,

I’ve loaded Dialogs windows onto the pages of a CTabView but can’t remember
the difference between a CTabView and a CTabCtrl.
Are they similar?

For the gist of it see:
http://www.codeproject.com/Messages/3530663/Re-Display-controls-in-editor-created-tab-control.aspx

Jonathan

[Non-text portions of this message have been removed]

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

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@...
(Continue reading)

Anthony Williams | 6 Sep 11:42 2010
Picon

Re: Using SetWindowTheme with CCustomDraw

"dmagn25" <dmagn25@...> writes:

> Is there anyway to use the theme with custom draw? (i'm only drawing
> the text and icons, I want the background/selection colors to be the
> same as in explorer's theme) - or am I doing something totally wrong?

Use CTheme (from atltheme.h) to manage the theme data.
Use theme.OpenThemeData(hWnd,L"Explorer") to load the theme data and
theme.CloseThemeData() to free it when you're done.

Then you can use the member functions like theme.DrawThemeBackground()
and theme.DrawThemeText() to draw your control.

Anthony
--

-- 
Author of C++ Concurrency in Action     http://www.stdthread.co.uk/book/
just::thread C++0x thread library             http://www.stdthread.co.uk
Just Software Solutions Ltd       http://www.justsoftwaresolutions.co.uk
15 Carrallack Mews, St Just, Cornwall, TR19 7UL, UK. Company No. 5478976

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

Yahoo! Groups Links

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

<*> Your email settings:
    Individual Email | Traditional

(Continue reading)

dmagn25 | 7 Sep 20:33 2010
Picon

Re: Using SetWindowTheme with CCustomDraw

Anthony, Thank you very much, I followed your instruction and got it working, 
cheers

--- In wtl@..., Anthony Williams <anthony_w.geo <at> ...> wrote:
>
> "dmagn25" <dmagn25 <at> ...> writes:
> 
> > Is there anyway to use the theme with custom draw? (i'm only drawing
> > the text and icons, I want the background/selection colors to be the
> > same as in explorer's theme) - or am I doing something totally wrong?
> 
> Use CTheme (from atltheme.h) to manage the theme data.
> Use theme.OpenThemeData(hWnd,L"Explorer") to load the theme data and
> theme.CloseThemeData() to free it when you're done.
> 
> Then you can use the member functions like theme.DrawThemeBackground()
> and theme.DrawThemeText() to draw your control.
> 
> Anthony
> -- 
> Author of C++ Concurrency in Action     http://www.stdthread.co.uk/book/
> just::thread C++0x thread library             http://www.stdthread.co.uk
> Just Software Solutions Ltd       http://www.justsoftwaresolutions.co.uk
> 15 Carrallack Mews, St Just, Cornwall, TR19 7UL, UK. Company No. 5478976
>

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

Yahoo! Groups Links

(Continue reading)

yarp | 9 Sep 10:33 2010

ListView Text change notification ?

This is not really WTL related but is there a way to get notified of Text changed in a ListView (Report mode) ?

At first I was thinking about LVM_ITEMCHANGED notification but that one is only fired for LVIF_STATE change.
I will end up overriding SetItem but I would prefer build-in notification if any.

Just wondering.

Thanks,

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

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@...

(Continue reading)

bviksoe | 9 Sep 17:11 2010
Picon

Re: ListView Text change notification ?

I don't believe such a notification exists. A ListView could easily be ownerdrawn in which case it would be
void. In most cases it is you who changes the text anyway.

bjarke

--- In wtl@..., "yarp" <lac <at> ...> wrote:
>
> This is not really WTL related but is there a way to get notified of Text changed in a ListView (Report mode) ?
> 
> At first I was thinking about LVM_ITEMCHANGED notification but that one is only fired for LVIF_STATE change.
> I will end up overriding SetItem but I would prefer build-in notification if any.
> 
> Just wondering.
> 
> Thanks,
>

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

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)


Gmane