RJ10DLL::DrawPotiLayout
void DrawPotiLayout( POTI_DRAWINFO *pinfo );
Parameters
pinfo
A pointer to the POTI_DRAWINFO structure.
Remarks
draw a poti design
Example
class MyPoti : public CButton
{
DECLARE_DYNCREATE(MyPoti)
public:
POTI_DRAWINFO myInfo;
..........
};
void MyPoti::Init()
{
memset(&myInfo,0,sizeof(POTI_DRAWINFO));
myInfo.m_srange = 270;
myInfo.m_ledcol = RGB(240,40,0);
myInfo.m_flags = RM_POTILED
myInfo.m_facecol= COL_KNOBFACE;
strcpy(myInfo.Title,"SQL");
strcpy(myInfo.ExtraText,"is OFF"); //or
"-16 dB" .....
}
void MyPoti::Set(int v)
{
myInfo.m_sval=v;
}
void MyPoti::SetLed(BOOL onoff)
{
if(onoff) myInfo.m_flags |= RM_ON;
else myInfo.m_flags &= ~RM_ON;
Invalidate();
}
void MyPoti::DrawItem(LPDRAWITEMSTRUCT lpDIS)
{
myInfo.lpDIS=lpDIS;
DrawPotiLayout(&myInfo);
}
for more see on the
original SourceExample the class MyPoti
See Also -->
MyPoti.h,
MyPoti.cpp,
RJ10M-DLL.h |