Casio PA-2400W manual Sample program to start up the SIPanel

Page 29

Sample program to start up the SIPanel

This is a source program of SipTsr.exe which must be used together with “CallSip.exe”.

// SipTsr.cpp : Defines the entry point for the application. //

#include “stdafx. h” #include “SIPanel. h”

TCHAR ClassName[] = TEXT(“SipTsr”);

// ***************************************************************************************//

// WndProc

//

//***************************************************************************************//

LRESULT CALLBACK WndProc(HWND hwnd, UNIT message, WPARAM wParam, LPARAM IParam)

{

switch (message) {

 

case (WM_USER + 1):

//ten-key SIPanel

SIP_ExecutePanel( TEXT(“/N2 /T0 /P200.0 /S180, 120”));

 

break;

 

case (WM_USER + 2);

//SIPanel with text area

SIP_ExecutePanel( TEXT(“/T1 /N0 /P0, 0 /S320, 120”));

 

break;

 

case WM_DESTROY:

 

PostQuitMessage(0);

 

return 0;

 

}

 

return defWindowProc(hwnd, message, wParam, lParam);

 

}

 

// ***************************************************************************************//

// InitApplication

//

//***************************************************************************************//

BOOL InitApplication (HINSTANCE hInstance)

{

WINDCLASSW wc; BOOL f;

wc.style = CS_HREDRAW CS_VREDRAW; wc. lpfnWndProc = WndProc; wc.cbClsExtra = 0;

wc. cbWndExtra = DLGWINDOWEXTRA; wc. hInstance = hInstance;

wc. hIcon = NULL; wc. hCursor = NULL;

wc. hbrBackground = (HBRUSH) GetStockObject(LTGRAY_BRUSH); wc. lpszMenuName = NULL;

wc. lpszClassName = ClassName; f= (RegisterClass(&wc));

return f;

}

// ***************************************************************************************//

// InitInstance

//

//***************************************************************************************//

BOOL InitInstance(HINSTANCE hIntance, int nCmdShow)

{

HWND hWnd;

hWnd = CreateWindow( ClassName, NULL, WS_OVERLAPPED, 0, 0, 0, 0, NULL, NULL, hInstance, NULL);

29

Image 29
Contents Version PA-2400W Library ManualTable of Contents Fchkce /G Fchkce /C Casio PrefaceSupported Files Bootup LibrarySystem Library SIPanel LibraryHost PC PA-2400W Copy System configurationSIPanel Library 3 I/O Bootup LibraryDedicated Library and Utility System Library File Check Utility File Transfer UtilityDevelopment Environment System Library Overview Title Function Details of FunctionParameters None Return Values Header #include CasioSys.h RemarksTurns off the backlight Language Interface Calling Sequence Backlight is on TrueFalse Backlight is offHeader #include CasioSys. h Remarks DisablePowerOff Bool EnablePowerOff Header Disable the power to be turned off with the power buttonEnable the power to be turned off with the power button Bool ApoCountReset Void SoftReset Internal error Disables automatic power-on with the alarmLanguage Interface Calling Sequence Parameters Bool bModeBool GetPowerOnAlarm Default Sample program to acquire power-on event notification Bool GetPowerEventStat SIPANEL.EXE SIPanel Library OverviewSIPANEL.DLL Restrictions Use of SIPanel LibraryProgram for starting up the library RegistryLpctstr lpParam Siphide SipshowSample program to start up the SIPanel Lptstr HinstanceTchar ClassName = Text CallSip Sample program of application software for business useTchar ClassNameTSR = TEXTSipTsr HbCallText = CreateWindow TEXTbutton, TEXTText AreaLpCmdLine HWnd = CreateWindowClassName, ClassNameWsvisible Wsoverlapped Wssysmenu Find SipTsr Sw,h Options of Command LinePx,y Function O Bootup Library OverviewIOBOX1.DLL PortDword Infinite = No timeout294,967,295 msec. equals to Infinite Fail to call the functionUse of ioboxchk Sequential ModeMultiple-Thread Mode = Null Sample ProgramHwnd WINDOWWIDTH/2 WsoverlappedWINDOWHEIGHT/2 NullCase Wmpaint Wait for 5 seconds Registry of Libraries Disable the power on by alarmEnable the power on event notification IrDA 1.0 Interface File Transfer Utility OverviewRS-232C Interface List of Supported Commands Termination of Flce Use of FlceOperation Input ParameterRestrictions Options Communication CommandsTypes of Arguments OverwriteMethod of Describing Pathname Storage Card PC card My Documents Internal RAM ReferenceSpecifying Non-existing File Windows95 /Windows NT Required Error if omittedDOS Windows CESetting Up Items Setting Up RegistryHkey hKey1 Setting Up Registry with User ApplicationLong lReg1 Dword Disp1Return err Err=FALSE Else If err==TRUEShould take an action that is appropriate to each definition Termination CodesError Code Meaning Possible Cause Remedy Log File Name Log FileLocation of Log File Method of Creation12Precautions Details of Command and Option Destination directory pathname Transmission file pathnameFlce /S \casio\*.dat d\casiodat\ Flce /SR \casio\*.dat d\casiodat\Pathname of requested file Pathname\12\*.dat d\casio\*.* \casio data\ Flce /RR a\12\*.dat d\casio\*.* \casio data\Flce /A \MY\casio.dat b\your\master.dat Appended file pathnameTarget file pathname Pathname of file to be deleted Without the R option Destination pathname Source pathnameFlce /N a\ 12\kk.dat a\casio\ Flce /N a\12\kk.dat a\casio\sj.datFlce /SR \casio ap\*.* \casio ap\ /T Parameters None SetupExampleFlce casio.scr Session with PCFlce /Y=COM1, , casio.scr Session between PA-2400W-and-PA-2400WIdle notification Command and StatusRetry Method Retry Process When Downloading FilePreparation at PC \soft\Retry.scr RestrictionPreparation at PA-2400W File Check Utility Overview List of CommandsOperation Operation MethodDownloading file from PC to PA-2400W Copy PC card Copying file with PC card from PA-2400W to PA-2400WTransmission side PA-2400W Describing Method 1Pathname Examples of specification for command and option Details about Command and OptionExamples of Correct Startup Example of Incorrect Startup no /G or /C optionCommand of Fchkce 1Generation of List File Comparison by List File Format of List File \AP\MENU.EXE 12345 \CONFIG.SYS 1000 \AUTOEXEC.BAT 512Example FILENO=3Childproccmd = C Syntax Analysis of Script FileOption = Recursiveoption Updateoption Recursiveoption = R Error Messages/Codes Restriction Specification of recursive call Option /SCSpecification of a script file nameAO Append output File name list or Script file nameFCHK.LOG file output directory name Destination directory name\casio\ .dat \casio data\ \casio\ Fchkce /G /R \casio\ .dat \casio data\ \casio\Option Does not compare the update dataFCHK.LOG file pathname Fchkce /C \casio data\