Your best bet for example code would be to 1) find the source of a component and mimic it, or 2) find the 0.8.3 SDK and look at the examples (the HTTP reader is a good simple one). The configuration pages have pretty much kept the same API from 8 to 9.
Not sure why all the great examples are ripped out of the 0.9 SDK..
Edit: Thought I'd be more helpful.. (this is for 0.8 you'll have to change some stuff for 0.9. From what I can tell the changes are pretty minor)
class config_http : public config
{
static BOOL CALLBACK DialogProc(HWND wnd,UINT msg,WPARAM wp,LPARAM lp)
{
switch(msg)
{
case WM_INITDIALOG:
uSetDlgItemInt(wnd,IDC_BUFSIZE,cfg_buffer_size/1024,0);
uSendDlgItemMessage(wnd,IDC_PREBUF_START,TBM_SETRANGE,0,MAKELONG(1,100));
uSendDlgItemMessage(wnd,IDC_PREBUF_UNDERRUN,TBM_SETRANGE,0,MAKELONG(1,100));
uSendDlgItemMessage(wnd,IDC_PREBUF_START,TBM_SETPOS,1,cfg_prebuffer_start);
uSendDlgItemMessage(wnd,IDC_PREBUF_UNDERRUN,TBM_SETPOS,1,cfg_prebuffer_underrun);
uSetDlgItemText(wnd,IDC_STATUS_PREBUF1,string_printf("%u%%",(int)cfg_prebuffer_start));
uSetDlgItemText(wnd,IDC_STATUS_PREBUF2,string_printf("%u%%",(int)cfg_prebuffer_underrun));
uSendDlgItemMessageText(wnd,IDC_PROXY_MODE,CB_ADDSTRING,0,"Don't use proxy");
uSendDlgItemMessageText(wnd,IDC_PROXY_MODE,CB_ADDSTRING,0,"Use proxy only for port 80 connections");
uSendDlgItemMessageText(wnd,IDC_PROXY_MODE,CB_ADDSTRING,0,"Use proxy for all connections");
uSendDlgItemMessage(wnd,IDC_PROXY_MODE,CB_SETCURSEL,cfg_proxy_mode,0);
g_proxy_sync.enter();
uSetDlgItemText(wnd,IDC_PROXY_URL,cfg_proxy_url);
g_proxy_sync.leave();
uSendDlgItemMessage(wnd,IDC_ICY_METADATA,BM_SETCHECK,cfg_icy_metadata,0);
break;
case WM_COMMAND:
switch(wp)
{
case (CBN_SELCHANGE<<16) | IDC_PROXY_MODE:
cfg_proxy_mode = uSendMessage((HWND)lp,CB_GETCURSEL,0,0);
break;
case (EN_CHANGE<<16)|IDC_BUFSIZE:
cfg_buffer_size = uGetDlgItemInt(wnd,IDC_BUFSIZE,0,0) * 1024;
break;
case (EN_CHANGE<<16)|IDC_PROXY_URL:
g_proxy_sync.enter();
cfg_proxy_url = string_utf8_from_window((HWND)lp);
g_proxy_sync.leave();
break;
case IDC_ICY_METADATA:
cfg_icy_metadata = uSendMessage((HWND)lp,BM_GETCHECK,0,0);
break;
}
break;
case WM_HSCROLL:
switch(uGetWindowLong((HWND)lp,GWL_ID))
{
case IDC_PREBUF_START:
cfg_prebuffer_start = uSendMessage((HWND)lp,TBM_GETPOS,0,0);
uSetDlgItemText(wnd,IDC_STATUS_PREBUF1,string_printf("%u%%",(int)cfg_prebuffer_start));
break;
case IDC_PREBUF_UNDERRUN:
cfg_prebuffer_underrun = uSendMessage((HWND)lp,TBM_GETPOS,0,0);
uSetDlgItemText(wnd,IDC_STATUS_PREBUF2,string_printf("%u%%",(int)cfg_prebuffer_underrun));
break;
}
break;
}
return 0;
}
virtual HWND create(HWND parent)
{
return uCreateDialog(IDD_CONFIG,parent,DialogProc);
}
virtual const char * get_name() {return "HTTP Reader";}
virtual const char * get_parent_name() {return "Components";}
};
static service_factory_single_t<config,config_http> foo2;