I want to redraw a panel/window when i start playback of a track (on_playback_new_track), but i have a problem to access wnd of the window
As the basis for my code, i use foo_uie_example:
/** Our window class */
class color_window : public uie::container_ui_extension
{
public:
color_window();
~color_window();
virtual const GUID & get_extension_guid() const;
virtual void get_name(pfc::string_base & out)const;
virtual void get_category(pfc::string_base & out)const;
unsigned get_type () const;
private:
/** Our window procedure */
LRESULT on_message(HWND wnd,UINT msg,WPARAM wp,LPARAM lp);
virtual class_data & get_class_data()const;
virtual void get_menu_items (uie::menu_hook_t & p_hook);
static const GUID g_extension_guid;
/** Our child window */
HWND wnd_static;
};
........
LRESULT color_window::on_message(HWND wnd,UINT msg,WPARAM wp,LPARAM lp)
{
switch(msg)
{
case WM_CREATE:
{
GetClientRect(wnd, &rc);
/** Create a static window*/
wnd_static = CreateWindowEx(0, WC_STATIC, _T("color"),
WS_CHILD | WS_VISIBLE, 0, 0, rc.right, rc.bottom,
wnd, HMENU(0), core_api::get_my_instance(), NULL);
}
break;
.....
class play_callback_color : public play_callback_static
{
public:
virtual unsigned get_flags(void)
{
return(flag_on_playback_new_track);
}
virtual void on_playback_new_track( metadb_handle_ptr p_track )
{
//How can i redraw child window wnd_static from here
//ShowWindow(wnd_static, SW_SHOW); UpdateWindow(wnd_static); RedrawWindow(wnd_static, 0, 0, RDW_INTERNALPAINT); ????
//No access to private!!! member wnd_static of class color_window whatever i do.
}
................
Can you give a hint?