Casio IT-2000W PDAs & Smartphones User Manual


 
211
Example of expansion pad operation
Registration of expansion key pad
<In case of VC>
void Cclass::SetProp( void )
{
HBITMAP hBmp;
PIC pic;
HPIC hPic;
// Loads the bitmap from resouce
hBmp = LoadBitmap( AfxGetInstanceHandle(), "bitmap resource name");
pic.picData.bmp.hbitmap = hBmp;
pic.picType = PICTYPE_BITMAP;
hPic = AfxSetPict( NULL, &pic ); // Creates HPIC.
m_PadCtrl->SetPictureProperty("Ext1Data1",hPic);
// Registration of picture property
AfxReferencePict( hPic, TRUE ); // Reference count operation of HPIC
m_PadCtrl->SetNumProperty( "KeyNo",0 );
// Registration of Key No. (0-47)
m_PadCtrl->SetNumProperty( "ExtNo", 1 );
// Registration of expansion pad No. (1-2)
m_PadCtrl->SetNumProperty( "KeyCode", 65 );
// Registration of keycode
m_PadCtrl->SetNumProperty( "ExtPad", 1 );
}
<In case of VB>
Private Sub Command1_Click()
Padctrl1. KeyNo = 0
Padctrl1. ExtNo = 1
Padctrl1. Ext1Data1 = LoadPicture("d: work ocx zen.bmp")
Padctrl1. KeyCode = 65
Padctrl1. ExtPad = 1
End Sub