HOMEPAGE

Open Source Project RJ10.DLL - Less is More: This does not mean that 'More' is too complicated.

Project Level 1

Developer Plattform

!?

Start and Process Control

Radio Control

IF-In & AF-Out Control
Panorama-View & ExtIQ-Receiver
EEprom & Calibration
Graphical Utillity

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

 

   Copyright 2012 © Bonito Germany.   

www.bonito.net