succeeded918 | 1 Nov 2004 02:17
Picon
Favicon

Re: i need something like a grid control, any suggestion?


thanks for ur help , and thank all u guys that replied
--- In wtl@..., nfr <nfr <at> g...> wrote:
> peter wrote:
> 
> >MAybe this will hel you:
> >
> >http://www.codeproject.com/wtl/wtlgrid2.asp
> >
> >
> > --- succeeded918 <wonderjin <at> m...> wrote: 
> >
> >---------------------------------
> >
> >what i need is a multiply row & col control, editable
> >cell, and every 
> >cell can contains mutiple line content, any good idea?
> >
> >
> >
> >  
> >
> or
> 
> http://www.codeproject.com/wtl/wtlgrid.asp
> 
> 
> Noël

------------------------ Yahoo! Groups Sponsor --------------------~--> 
(Continue reading)

succeeded918 | 1 Nov 2004 02:20
Picon
Favicon

Re: i need something like a grid control, any suggestion?


it would be nice if u can share ur updated code with me :)
--- In wtl@..., nfr <nfr <at> g...> wrote:
> Thomas Hansen wrote:
> 
> >On Fri, 29 Oct 2004 03:54:42 -0000, succeeded918 <wonderjin <at> m...> 
wrote:
> >  
> >
> >>what i need is a multiply row & col control, editable cell, and 
every 
> >>cell can contains mutiple line content, any good idea?
> >>    
> >>
> >
> >SmartWin (http://smartwin.sourceforge.net) has one, I don't know 
how
> >easy it would be to port to WTL but I think it should be 
possible...
> >
> >  
> >
> I've also done a grid, search WTLGRID on code project. I can send 
you 
> more up to date and less buggy code if you want.
> 
> Noël

------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
(Continue reading)

succeeded918 | 1 Nov 2004 07:48
Picon
Favicon

Re: how can i update the state of toolbar buttons which are created on the fly


hi, roger.
can u give any suggestion to do this? 
--- In wtl@..., "Roger Headrick" <lilsroro <at> y...> wrote:
> 
> --- In wtl@..., "succeeded918" <wonderjin <at> m...> wrote:
> > 
> > for (int i = 0; i < toolbar.GetButtonCount(); i++)
> > {
> >       TBBUTTON button;
> >       toolbar.GetButton(i, &button);
> >       button.idCommand // i get can the command id's in this way 
at 
> > runtime
> > }
> > but i can't get them at desin time because i don't how  how many 
> > buttons will be added to the toolbar, it depends on the user.
> > the button count maybe 0 or any positive number.
> > 
> 
> I dont think the UI map will be of much help then.  You will 
probably 
> have to send messages directly to the toolbar to set the state of 
> your buttons.
> 
> -roger

------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
(Continue reading)

Nikos Bozinis | 1 Nov 2004 10:21
Picon
Favicon

Re: Converting CSplitterWindow to CHorSplitterWindow?


--- In wtl@..., "Bill Holt" <billholtsh <at> m...> wrote:
>
> I wanted to offer the option to customize the layout of one of the 
child 
> windows in a WTL-based program, either split-vertically or 
> split-horizontally. So is it possible to convert a CSplitterWindow 
to a 
> CHorSplitterWindow? Or the only way is to have them both declared?
> 

the way i've done it was modifying atlsplit.h turning t_bVertical 
from a template to a real variable. THere are a few places in the 
code that need attention too but overall it's quite easy to convert 
and add a SetPaneOrientation() method to change things while the 
window is active

hth
nikos

----
www.zabkat.com

------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
(Continue reading)

Bill Holt | 1 Nov 2004 11:37
Picon
Favicon

RE: Re: Converting CSplitterWindow to CHorSplitterWindow?


Thanks for your reply Nikos. Actually I didn't understand why the vertical 
boolean is designed as a template parameter. People would have a lot of 
needs to convert between them.

I'll try to rebuild this class.

Regards,
Bill

>From: "Nikos Bozinis" <umeca74@...>
>Reply-To: wtl@...
>To: wtl@...
>Subject: [wtl] Re: Converting CSplitterWindow to CHorSplitterWindow?
>Date: Mon, 01 Nov 2004 09:21:11 -0000
>

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.com/

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

------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
(Continue reading)

Roger Headrick | 1 Nov 2004 14:29
Picon
Favicon

Re: Converting CSplitterWindow to CHorSplitterWindow?


--- In wtl@..., "Bill Holt" <billholtsh <at> m...> wrote:
> Thanks for your reply Nikos. Actually I didn't understand why the 
vertical 
> boolean is designed as a template parameter. People would have a 
lot of 
> needs to convert between them.
> 
> I'll try to rebuild this class.
> 
> Regards,
> Bill
> 

Hi Bill,

Consistent with the approach suggested by Nikos, here is a class 
method to change to splitter orientation at runtime.  m_bVertical is 
a bool class data member which is used instead of the t_bVertical 
template parameter.

void SetOrientation(bool bVertical, bool bUpdate = true)
{
if (m_bVertical == bVertical) return;

m_bVertical = bVertical;

m_hCursor = ::LoadCursor(NULL, m_bVertical ? IDC_SIZEWE : 
IDC_SIZENS);
		
(Continue reading)

Roger Headrick | 1 Nov 2004 14:50
Picon
Favicon

Re: how can i update the state of toolbar buttons which are created on the fly


--- In wtl@..., "succeeded918" <wonderjin <at> m...> wrote:
> 
> hi, roger.
> can u give any suggestion to do this? 
> --- In wtl@..., "Roger Headrick" <lilsroro <at> y...> wrote:
> > 
> > --- In wtl@..., "succeeded918" <wonderjin <at> m...> 
wrote:
> > > 
> > > for (int i = 0; i < toolbar.GetButtonCount(); i++)
> > > {
> > >       TBBUTTON button;
> > >       toolbar.GetButton(i, &button);
> > >       button.idCommand // i get can the command id's in this 
way 
> at 
> > > runtime
> > > }
> > > but i can't get them at desin time because i don't how  how 
many 
> > > buttons will be added to the toolbar, it depends on the user.
> > > the button count maybe 0 or any positive number.
> > > 
> > 
> > I dont think the UI map will be of much help then.  You will 
> probably 
> > have to send messages directly to the toolbar to set the state 
of 
> > your buttons.
(Continue reading)

Bill Holt | 1 Nov 2004 14:56
Picon
Favicon

RE: Re: Converting CSplitterWindow to CHorSplitterWindow?


Thank you Roger. It's now working pretty good. Except for one thing, do I 
need to destroy the cursor before loading a new one?

Bill

>From: "Roger Headrick" <lilsroro@...>
>Reply-To: wtl@...
>To: wtl@...
>Subject: [wtl] Re: Converting CSplitterWindow to CHorSplitterWindow?
>Date: Mon, 01 Nov 2004 13:29:52 -0000
>

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.com/

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

------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

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

Roger Headrick | 1 Nov 2004 16:06
Picon
Favicon

Re: Converting CSplitterWindow to CHorSplitterWindow?


--- In wtl@..., "Bill Holt" <billholtsh <at> m...> wrote:
> Thank you Roger. It's now working pretty good. Except for one 
thing, do I 
> need to destroy the cursor before loading a new one?
> 
> Bill
> 

I assumed the cursor is a "shared" cursor and shouldn't be destroyed 
according to MSDN docs on the DestroyCursor function.  Also, I 
noticed that the original splitter classes do not destroy the cursor 
when the last class instance is destructed, even though it loads the 
cursor in the constructor.  If this is a problem - a resource leak - 
then the original classes also have a leak.

Also, in my new splitter class, I changed the m_hCursor variable so 
that it is not static, and I load the cursor in my OnCreate handler 
rather than in the constructor.

In OnCreate:

if (m_hCursor == NULL)
m_hCursor = ::LoadCursor(NULL, m_bVertical ? IDC_SIZEWE : 
IDC_SIZENS);  

-Roger

------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
(Continue reading)

Nikos Bozinis | 1 Nov 2004 16:48
Picon
Favicon

Re: Converting CSplitterWindow to CHorSplitterWindow?


note the cursor will have to be re-loaded every time there's a change 
of orientation

--- In wtl@..., "Roger Headrick" <lilsroro <at> y...> wrote:
> 
> --- In wtl@..., "Bill Holt" <billholtsh <at> m...> wrote:
> > Thank you Roger. It's now working pretty good. Except for one 
> thing, do I 
> > need to destroy the cursor before loading a new one?
> > 
> > Bill
> > 
> 
> I assumed the cursor is a "shared" cursor and shouldn't be 
destroyed 
> according to MSDN docs on the DestroyCursor function.  Also, I 
> noticed that the original splitter classes do not destroy the 
cursor 
> when the last class instance is destructed, even though it loads 
the 
> cursor in the constructor.  If this is a problem - a resource leak -

> then the original classes also have a leak.
> 
> Also, in my new splitter class, I changed the m_hCursor variable so 
> that it is not static, and I load the cursor in my OnCreate handler 
> rather than in the constructor.
> 
> In OnCreate:
(Continue reading)


Gmane