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): | |
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