Thanks for the reply.  I've found the solution on my own.

>  sizeof( m_szPanelNames ) will be 4 (it's the size of a char * pointer),
> not 1. Try the ARRAY_SIZE() macro instead :)
>
> - Alfred

Yeah, I wrote a "countof" macro to fix this.  I'll use ARRAY_SIZE() then.  :)

The real problem, though, was with the convoluted casting:

> > PostMessage( (Panel *)(gViewPortInterface->FindPanelByName(
> > PANEL_BASE )), new KeyValues( "SetShowPanel", "panel", PANEL_CLASS )

With a bit more wringing of hands, I found that the pointer returned by
casting gViewPortInterface->FindPanelByName() into a *Panel had a different
value than the viewport panel itself.  So instead, I call:

PostMessage( gViewPortInterface->FindPanelByName(...)->GetVPanel(), ... )

and everything's fine and dandy.

Thanks anyways.  -John Sheu

--
                                I
            think                                poem
   that              never               as                a
I       shall    see        a     lovely      as     binary   tree

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to