wince 拨号界面自定制

时间:2021-05-12 17:59:19
wince 拨号界面自定制wince 拨号界面自定制 /**********************************************************************
wince 拨号界面自定制THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
wince 拨号界面自定制ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
wince 拨号界面自定制THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
wince 拨号界面自定制PARTICULAR PURPOSE.
wince 拨号界面自定制
wince 拨号界面自定制Copyright (c) ppcat_001 Corporation. All Rights Reserved.
wince 拨号界面自定制
wince 拨号界面自定制This code is sample code and is included for illustrative purposes only.
wince 拨号界面自定制It may not have been designed by the core product team and has not been 
wince 拨号界面自定制tested to the same standards as product code.  
wince 拨号界面自定制
wince 拨号界面自定制MODULE:
wince 拨号界面自定制  custphone.cpp
wince 拨号界面自定制
wince 拨号界面自定制ABSTRACT:
wince 拨号界面自定制  Phone Canvas extension code to set skinning settings.
wince 拨号界面自定制*********************************************************************
*/

wince 拨号界面自定制
wince 拨号界面自定制#include 
" custphone.h "
wince 拨号界面自定制#include 
" phcanvas.h "
wince 拨号界面自定制#include 
" PhoneResources.h "
wince 拨号界面自定制#include 
< windows.h >
wince 拨号界面自定制#include 
< imgdecmp.h >
wince 拨号界面自定制#include 
" miscsvcs.h "
wince 拨号界面自定制#include 
" winsock2.h "
wince 拨号界面自定制
wince 拨号界面自定制
#define  IPPHONE                TEXT("IPPhone")
wince 拨号界面自定制
#define  DIALER_PORT    1         // 拨号界面
wince 拨号界面自定制HPHONELISTENER g_idlTapiState 
=  INVALID_HPHONELISTENER;
wince 拨号界面自定制
wince 拨号界面自定制
//  Phone behavior overriding functions
wince 拨号界面自定制
HRESULT PHExtInitialize( void   * pVoid);
wince 拨号界面自定制HRESULT PHExtShowPhoneMsg(PH_MSG phmsg, LPWSTR psz1, LPWSTR psz2, BOOL fRemove, DWORD dwSupSvcStatus, BOOL 
*  pfDial);
wince 拨号界面自定制HRESULT PHExtDoVerb(PH_VERB verb, BOOL fValidateOnly, VPARAM vp);
wince 拨号界面自定制HRESULT PHExtGetPhoneViewInfo(PH_VIEW view, HINSTANCE 
*  phInstance, PH_VIEWINFOFLAGS  *  pvif, LPPHONEVIEWHOOKPROC  *  plpfnHook, LPCTSTR  *  plpTemplateName);
wince 拨号界面自定制BOOL PHExtplpfnHook(HWND, UINT, WPARAM, LPARAM);
// 主界面的
wince 拨号界面自定制
BOOL PHExtplpfnHookPro(HWND, UINT, WPARAM, LPARAM); // 拨号界面的
wince 拨号界面自定制
BOOL PHExtplpfnHookIn(HWND, UINT, WPARAM, LPARAM); // 拨号界面的
wince 拨号界面自定制
void  Draw(HWND hWnd,DWORD IDC,BOOL Mark); // 在指定的位置画图(窗口句柄,画的控件ID,背景是FALSE,按界面之后是TRUE)
wince 拨号界面自定制
void  Draw_Talk(HWND hWnd,BOOL Mark); // 替换通话界面中的通话部分(换成结束)
wince 拨号界面自定制
void  Draw_In(HWND);
wince 拨号界面自定制
void  Draw_In_IDC(HWND,DWORD);
wince 拨号界面自定制
void  Draw_Button(HWND, RECT, RECT, HBITMAP);
wince 拨号界面自定制
wince 拨号界面自定制
#define  REG_SPEAKER    L"ITF_SPEAKER"
wince 拨号界面自定制
wince 拨号界面自定制// 这个没有用扬声器的api,各位可能要改
wince 拨号界面自定制
BOOL setRegSPEAKER(DWORD Speaker); // sP 是当前扬声器是否已经打开]
wince 拨号界面自定制
BOOL getRegSPEAKER(DWORD  * Speaker); // sP 是当前扬声器是否已经打开
wince 拨号界面自定制

wince 拨号界面自定制
wince 拨号界面自定制
void  Draw_Pro(HWND hWnd,DWORD dnum,BOOL Mark); // 同上,但是num为画第几张图
wince 拨号界面自定制
void  Draw_Pro_Talk(HWND hWnd,BOOL Mark);
wince 拨号界面自定制
void  Draw_Pro_Mute(HWND hWnd,DWORD Mark); // Mark = 1 // 菲静音亮,Mark = 2,菲静音暗,Mark = 3灰色不可点击
wince 拨号界面自定制
void  Draw_Pro_SP(HWND hWnd,DWORD Mark);
wince 拨号界面自定制
void  Draw_Pro_Held(HWND hWnd,DWORD Mark);
wince 拨号界面自定制
wince 拨号界面自定制
void  GetRect(HWND hWnd);
wince 拨号界面自定制DWORD InRect(DWORD x_pos,DWORD y_pos);
wince 拨号界面自定制
wince 拨号界面自定制
void  GetRect_Pro(HWND hWnd);
wince 拨号界面自定制DWORD InRect_Pro(DWORD x_pos,DWORD y_pos);
wince 拨号界面自定制
wince 拨号界面自定制BOOL RECT_Mark 
=  FALSE;
wince 拨号界面自定制
wince 拨号界面自定制wince 拨号界面自定制RECT  distRect[
16 =   {0} ;
wince 拨号界面自定制wince 拨号界面自定制RECT  WndPosRect[
16 =   {0} ;
wince 拨号界面自定制
wince 拨号界面自定制BOOL RECT_Mark_Pro 
=  FALSE;
wince 拨号界面自定制
wince 拨号界面自定制wince 拨号界面自定制RECT  disRect_Pro[
6 =   {0} ;
wince 拨号界面自定制wince 拨号界面自定制RECT  WndPosRect_Pro[
6 =   {0} ;
wince 拨号界面自定制
wince 拨号界面自定制BOOL RECT_Mark_In 
=  FALSE;
wince 拨号界面自定制wince 拨号界面自定制RECT WndPosRect_In[
11 =   {0} ;
wince 拨号界面自定制wince 拨号界面自定制RECT disRect_In[
10 =   {0} ;
wince 拨号界面自定制
wince 拨号界面自定制BOOL Mute 
=  TRUE;
wince 拨号界面自定制
wince 拨号界面自定制HINSTANCE g_hInst 
=  NULL;
wince 拨号界面自定制HWND g_hWnd;
wince 拨号界面自定制
wince 拨号界面自定制
wince 拨号界面自定制HBITMAP hBmp 
=  NULL;
wince 拨号界面自定制HBITMAP hBmp_Inv 
=  NULL;
wince 拨号界面自定制HBITMAP hBmp_Talk 
=  NULL;
wince 拨号界面自定制HBITMAP hBmp_Inv_Talk 
=  NULL;
wince 拨号界面自定制
wince 拨号界面自定制HBITMAP hBmp_Pro 
=  NULL;
wince 拨号界面自定制HBITMAP hBmp_Inv_Pro 
=  NULL;
wince 拨号界面自定制
wince 拨号界面自定制HBITMAP hBmp_Pro_Talk 
=  NULL;
wince 拨号界面自定制HBITMAP hBmp_Inv_Pro_Talk 
=  NULL;
wince 拨号界面自定制
wince 拨号界面自定制HBITMAP hBmp_Pro_Mute 
=  NULL;
wince 拨号界面自定制HBITMAP hBmp_Inv_Pro_Mute 
=  NULL;
wince 拨号界面自定制HBITMAP hBmp_Un_Pro_Mute 
=  NULL;
wince 拨号界面自定制
wince 拨号界面自定制HBITMAP hBmp_Pro_SP 
=  NULL;
wince 拨号界面自定制HBITMAP hBmp_Inv_Pro_SP 
=  NULL;
wince 拨号界面自定制HBITMAP hBmp_Pro_His 
=  NULL;
wince 拨号界面自定制HBITMAP hBmp_Inv_Pro_His 
=  NULL;
wince 拨号界面自定制
wince 拨号界面自定制HBITMAP hBmp_Pro_Held 
=  NULL;
wince 拨号界面自定制HBITMAP hBmp_Inv_Pro_Held 
=  NULL;
wince 拨号界面自定制HBITMAP hBmp_Pro_Swap 
=  NULL;
wince 拨号界面自定制HBITMAP hBmp_Inv_Pro_Swap 
=  NULL;
wince 拨号界面自定制HBITMAP hBmp_Un_Pro_Held 
=  NULL;
wince 拨号界面自定制
wince 拨号界面自定制HBITMAP hBmp_In 
=  NULL;
wince 拨号界面自定制
wince 拨号界面自定制
wince 拨号界面自定制
wince 拨号界面自定制
extern   " C "  BOOL WINAPI DllMain(HANDLE hinstDll, DWORD dwReason, LPVOID lpReserved)
wince 拨号界面自定制wince 拨号界面自定制
{    
wince 拨号界面自定制    
switch (dwReason)
wince 拨号界面自定制wince 拨号界面自定制    
{
wince 拨号界面自定制        
case DLL_PROCESS_ATTACH:
wince 拨号界面自定制            g_hInst 
= (HINSTANCE)hinstDll;
wince 拨号界面自定制            
break;
wince 拨号界面自定制    }

wince 拨号界面自定制
wince 拨号界面自定制    
return TRUE;
wince 拨号界面自定制}

wince 拨号界面自定制
wince 拨号界面自定制
wince 拨号界面自定制
wince 拨号界面自定制
wince 拨号界面自定制wince 拨号界面自定制
/*********************************************************************
wince 拨号界面自定制 PHExtInitialize
wince 拨号界面自定制  
wince 拨号界面自定制 Purpose:
wince 拨号界面自定制  Please see phcanvas.h for details
wince 拨号界面自定制    
wince 拨号界面自定制 Arguments:
wince 拨号界面自定制  Please see phcanvas.h
wince 拨号界面自定制 
wince 拨号界面自定制 Returns:
wince 拨号界面自定制  status
wince 拨号界面自定制  
wince 拨号界面自定制*********************************************************************
*/

wince 拨号界面自定制
extern   " C "  HRESULT PHExtInitialize( void   * pVoid)
wince 拨号界面自定制wince 拨号界面自定制
{
wince 拨号界面自定制    UNREFERENCED_PARAMETER(pVoid);
wince 拨号界面自定制    
wince 拨号界面自定制    
return S_OK;
wince 拨号界面自定制}

wince 拨号界面自定制
wince 拨号界面自定制wince 拨号界面自定制
/*********************************************************************
wince 拨号界面自定制 PHExtDoVerb
wince 拨号界面自定制 
wince 拨号界面自定制 Purpose:
wince 拨号界面自定制  Please see phcanvas.h for details
wince 拨号界面自定制   
wince 拨号界面自定制 Arguments:
wince 拨号界面自定制  Please see phcanvas.h
wince 拨号界面自定制
wince 拨号界面自定制 Returns:
wince 拨号界面自定制  status
wince 拨号界面自定制 
wince 拨号界面自定制*********************************************************************
*/

wince 拨号界面自定制
extern   " C "  HRESULT PHExtDoVerb(PH_VERB verb, BOOL fValidateOnly, VPARAM vp)
wince 拨号界面自定制wince 拨号界面自定制
{
wince 拨号界面自定制    HRESULT hr 
= E_NOTIMPL;
wince 拨号界面自定制    
return hr;
wince 拨号界面自定制}

wince 拨号界面自定制
wince 拨号界面自定制
wince 拨号界面自定制
wince 拨号界面自定制
wince 拨号界面自定制DWORD CALLBACK GetImageData(LPSTR szBuffer, DWORD dwBufferMax, LPARAM lParam )
wince 拨号界面自定制wince 拨号界面自定制
{
wince 拨号界面自定制    DWORD dwNumberOfBytesRead;
wince 拨号界面自定制
wince 拨号界面自定制    
if ( (HANDLE)lParam == INVALID_HANDLE_VALUE )
wince 拨号界面自定制        
return 0;
wince 拨号界面自定制
wince 拨号界面自定制    ReadFile( (HANDLE)lParam, szBuffer, dwBufferMax, 
&dwNumberOfBytesRead, NULL );
wince 拨号界面自定制
wince 拨号界面自定制    
// Return number of bytes read
wince 拨号界面自定制
    return dwNumberOfBytesRead;
wince 拨号界面自定制}

wince 拨号界面自定制
void  CALLBACK ImageProgress(IImageRender  * pRender, BOOL bComplete, LPARAM lParam )
wince 拨号界面自定制wince 拨号界面自定制
{
wince 拨号界面自定制    
if( bComplete )
wince 拨号界面自定制wince 拨号界面自定制    
{
wince 拨号界面自定制        
// (Optional) add code here for completion processing
wince 拨号界面自定制
    }

wince 拨号界面自定制}

wince 拨号界面自定制
wince 拨号界面自定制
wince 拨号界面自定制BOOL LoadImage(HBITMAP 
*  lpBmp, LPCWSTR lpPath)
wince 拨号界面自定制wince 拨号界面自定制
{
wince 拨号界面自定制    HRESULT hr 
= 0;
wince 拨号界面自定制    DecompressImageInfo    dii;
wince 拨号界面自定制wince 拨号界面自定制    BYTE    szBuffer[
4096= {0};
wince 拨号界面自定制    HDC        hCompDC, hDevDC;
wince 拨号界面自定制    HANDLE    hFile;
wince 拨号界面自定制    BOOL    bRet 
= FALSE;
wince 拨号界面自定制
wince 拨号界面自定制    hFile 
= CreateFile(lpPath, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL );
wince 拨号界面自定制    DWORD miao 
= GetLastError();
wince 拨号界面自定制    
if (hFile == INVALID_HANDLE_VALUE)
wince 拨号界面自定制wince 拨号界面自定制    
{
wince 拨号界面自定制        
goto error;
wince 拨号界面自定制    }

wince 拨号界面自定制
wince 拨号界面自定制    hDevDC 
= ::GetDC(NULL);
wince 拨号界面自定制    
if(!hDevDC)
wince 拨号界面自定制        
goto error;
wince 拨号界面自定制    hCompDC 
= CreateCompatibleDC(hDevDC);
wince 拨号界面自定制    
if(NULL == hCompDC)
wince 拨号界面自定制wince 拨号界面自定制    
{
wince 拨号界面自定制        
goto error;
wince 拨号界面自定制    }

wince 拨号界面自定制    
// Fill in the 'DecompressImageInfo' structure
wince 拨号界面自定制
    dii.dwSize = sizeof( DecompressImageInfo );        // Size of this structure
wince 拨号界面自定制
    dii.pbBuffer = szBuffer;                        // Pointer to the buffer to use for data
wince 拨号界面自定制
    dii.dwBufferMax = sizeof(szBuffer);                // Size of the buffer
wince 拨号界面自定制
    dii.dwBufferCurrent = 0;                        // The amount of data which is current in the buffer
wince 拨号界面自定制
    dii.phBM = lpBmp;                                // Pointer to the bitmap returned (can be NULL)
wince 拨号界面自定制
    dii.ppImageRender = NULL;                        // Pointer to an IImageRender object (can be NULL)
wince 拨号界面自定制
    dii.iBitDepth = GetDeviceCaps(hDevDC,BITSPIXEL);// Bit depth of the output image
wince 拨号界面自定制
    dii.lParam = ( LPARAM ) hFile;                    // User parameter for callback functions
wince 拨号界面自定制
    dii.hdc = hCompDC;                                // HDC to use for retrieving palettes
wince 拨号界面自定制
    dii.iScale = 100;                        // Scale factor (1 - 100)
wince 拨号界面自定制
    dii.iMaxWidth = 10000;//nWidth;                            // Maximum width of the output image
wince 拨号界面自定制
    dii.iMaxHeight = 10000;//nHeight;                        // Maxumum height of the output image
wince 拨号界面自定制
    dii.pfnGetData = GetImageData;                    // Callback function to get image data
wince 拨号界面自定制
    dii.pfnImageProgress = ImageProgress;            // Callback function to notify caller of progress decoding the image
wince 拨号界面自定制
    dii.crTransparentOverride = ( UINT ) -1;        // If this color is not (UINT)-1, it will override the
wince 拨号界面自定制                                                    
// transparent color in the image with this color. (GIF ONLY)
wince 拨号界面自定制
wince 拨号界面自定制    
// Process and decompress the image data
wince 拨号界面自定制
    hr = DecompressImageIndirect( &dii );
wince 拨号界面自定制    
wince 拨号界面自定制    
if(FAILED(hr))
wince 拨号界面自定制        
goto error;
wince 拨号界面自定制
wince 拨号界面自定制    
//m_gBGLoaded = TRUE;
wince 拨号界面自定制
    bRet = TRUE;
wince 拨号界面自定制    
goto error;
wince 拨号界面自定制error:
wince 拨号界面自定制    
// Clean up 
wince 拨号界面自定制
    if(INVALID_HANDLE_VALUE != hFile)
wince 拨号界面自定制        CloseHandle( hFile );
wince 拨号界面自定制    
if(NULL != hCompDC)
wince 拨号界面自定制        DeleteDC(hCompDC);
wince 拨号界面自定制    
if(NULL != hDevDC)
wince 拨号界面自定制        ::ReleaseDC(NULL, hDevDC);
wince 拨号界面自定制    
return bRet;
wince 拨号界面自定制
wince 拨号界面自定制}

wince 拨号界面自定制
wince 拨号界面自定制wince 拨号界面自定制 /*********************************************************************
wince 拨号界面自定制 PHExtShowPhoneMsg
wince 拨号界面自定制 
wince 拨号界面自定制 Purpose:
wince 拨号界面自定制  Please see phcanvas.h for details
wince 拨号界面自定制   
wince 拨号界面自定制 Arguments:
wince 拨号界面自定制  Please see phcanvas.h
wince 拨号界面自定制 
wince 拨号界面自定制 Returns:
wince 拨号界面自定制  status
wince 拨号界面自定制  
wince 拨号界面自定制*********************************************************************
*/

wince 拨号界面自定制
extern   " C "  HRESULT PHExtShowPhoneMsg(PH_MSG phmsg, LPCWSTR psz1, LPCWSTR psz2, BOOL fRemove, DWORD dwSupSvcStatus, BOOL *  pfDial)
wince 拨号界面自定制wince 拨号界面自定制
{
wince 拨号界面自定制    HRESULT hr 
= E_NOTIMPL;
wince 拨号界面自定制
wince 拨号界面自定制    
// To override behavior, return S_OK and insert code here.  If you wish 
wince 拨号界面自定制    
// to let default processing
wince 拨号界面自定制    
// still occur after having intercepted the message, return E_NOTIMPL.
wince 拨号界面自定制
    return hr;
wince 拨号界面自定制}

wince 拨号界面自定制
wince 拨号界面自定制
void  GetRect(HWND hWnd)
wince 拨号界面自定制wince 拨号界面自定制
{
wince 拨号界面自定制wince 拨号界面自定制    DWORD BUTTON[
16= {
wince 拨号界面自定制        IDC_DIALBUTTON_ZERO,
wince 拨号界面自定制        IDC_DIALBUTTON_ONE,
wince 拨号界面自定制        IDC_DIALBUTTON_TWO,
wince 拨号界面自定制        IDC_DIALBUTTON_THREE,
wince 拨号界面自定制        IDC_DIALBUTTON_FOUR,
wince 拨号界面自定制        IDC_DIALBUTTON_FIVE,
wince 拨号界面自定制        IDC_DIALBUTTON_SIX,
wince 拨号界面自定制        IDC_DIALBUTTON_SEVEN,
wince 拨号界面自定制        IDC_DIALBUTTON_EIGHT,
wince 拨号界面自定制        IDC_DIALBUTTON_NINE,
wince 拨号界面自定制        IDC_DIALBUTTON_STAR,
wince 拨号界面自定制        IDC_DIALBUTTON_POUND,
wince 拨号界面自定制        IDC_HISTORY,
wince 拨号界面自定制        IDC_TALKEND,
wince 拨号界面自定制        IDC_SPEED,
wince 拨号界面自定制        IDC_ERASE_BUTTON,
wince 拨号界面自定制    }
;
wince 拨号界面自定制        HWND hd 
= NULL;
wince 拨号界面自定制        
for(int i = 0; i <= 15; i++)
wince 拨号界面自定制wince 拨号界面自定制        
{
wince 拨号界面自定制            hd 
= GetDlgItem(hWnd,BUTTON[i]);
wince 拨号界面自定制            ::GetClientRect(hd,
&distRect[i]);
wince 拨号界面自定制            ::GetWindowRect(hd,
&WndPosRect[i]);
wince 拨号界面自定制        }

wince 拨号界面自定制        RECT_Mark 
= TRUE;
wince 拨号界面自定制}

wince 拨号界面自定制
// 指出点在那个控件上,x_pos横坐标,y_pos纵坐标
wince 拨号界面自定制
DWORD InRect(DWORD x_pos,DWORD y_pos)
wince 拨号界面自定制wince 拨号界面自定制
{
wince 拨号界面自定制wince 拨号界面自定制    POINT Point 
= {x_pos,y_pos};
wince 拨号界面自定制wince 拨号界面自定制    RECT Rect 
= {0};
wince 拨号界面自定制    
for(DWORD i = 0; i <= 15; i++)
wince 拨号界面自定制wince 拨号界面自定制    
{
wince 拨号界面自定制        Rect.bottom 
= WndPosRect[i].bottom - 26;
wince 拨号界面自定制        Rect.top 
= WndPosRect[i].top - 26;
wince 拨号界面自定制        Rect.left 
= WndPosRect[i].left;
wince 拨号界面自定制        Rect.right 
= WndPosRect[i].right;
wince 拨号界面自定制        
if(PtInRect(&Rect,Point))
wince 拨号界面自定制wince 拨号界面自定制        
{
wince 拨号界面自定制            
return i;
wince 拨号界面自定制        }

wince 拨号界面自定制    }

wince 拨号界面自定制    
return 100;
wince 拨号界面自定制}

wince 拨号界面自定制
wince 拨号界面自定制BOOL PHExtplpfnHook(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
wince 拨号界面自定制wince 拨号界面自定制
{
wince 拨号界面自定制    HWND hd 
= NULL;
wince 拨号界面自定制    BOOL breturn 
= FALSE;
wince 拨号界面自定制    
int x_pos;
wince 拨号界面自定制    
int y_pos;
wince 拨号界面自定制wince 拨号界面自定制    PHADDACCUMULATOR num 
= {0};
wince 拨号界面自定制    HRESULT hr 
= S_OK;
wince 拨号界面自定制    
int Talk = 0;
wince 拨号界面自定制    
int OutGo = 0;
wince 拨号界面自定制    
int Held = 0;
wince 拨号界面自定制    
int InCom = 0;
wince 拨号界面自定制    DWORD Acc 
= 1;
wince 拨号界面自定制    
int Connect = 0;
wince 拨号界面自定制    
wince 拨号界面自定制    DWORD dnum;
wince 拨号界面自定制
wince 拨号界面自定制    SHRGINFO    shrg;    
wince 拨号界面自定制    
wince 拨号界面自定制    
if(RECT_Mark == FALSE)
wince 拨号界面自定制wince 拨号界面自定制    
{
wince 拨号界面自定制        GetRect(hWnd);
wince 拨号界面自定制    }

wince 拨号界面自定制wince 拨号界面自定制    UINT vkKeyCode[
12= {'0','1','2','3','4','5','6','7','8','9','*','#'};
wince 拨号界面自定制             
switch(Msg)
wince 拨号界面自定制wince 拨号界面自定制                
{
wince 拨号界面自定制                
wince 拨号界面自定制                
case WM_PH_PAINTCHILDBACKGROUND:
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        
switch(GetDlgCtrlID((HWND)wParam))
wince 拨号界面自定制wince 拨号界面自定制                        
{
wince 拨号界面自定制                        
case IDC_DIALBUTTON_ONE:
wince 拨号界面自定制                        
case IDC_DIALBUTTON_TWO:
wince 拨号界面自定制                        
case IDC_DIALBUTTON_THREE:
wince 拨号界面自定制                        
case IDC_DIALBUTTON_FOUR:
wince 拨号界面自定制                        
case IDC_DIALBUTTON_FIVE:
wince 拨号界面自定制                        
case IDC_DIALBUTTON_SIX:
wince 拨号界面自定制                        
case IDC_DIALBUTTON_SEVEN:
wince 拨号界面自定制                        
case IDC_DIALBUTTON_EIGHT:
wince 拨号界面自定制                        
case IDC_DIALBUTTON_NINE:
wince 拨号界面自定制                        
case IDC_DIALBUTTON_STAR:
wince 拨号界面自定制                        
case IDC_DIALBUTTON_ZERO:
wince 拨号界面自定制                        
case IDC_DIALBUTTON_POUND:
wince 拨号界面自定制                        
case IDC_HISTORY:
wince 拨号界面自定制                        
case IDC_ERASE_BUTTON:
wince 拨号界面自定制                        
case IDC_SPEED:
wince 拨号界面自定制                        
case IDC_TALKEND:
wince 拨号界面自定制                            hd 
= (HWND)wParam;
wince 拨号界面自定制                            ShowWindow(hd,FALSE);
wince 拨号界面自定制                            breturn 
= TRUE;
wince 拨号界面自定制                            
break;
wince 拨号界面自定制                        
case IDC_BRANDING:
wince 拨号界面自定制                            PHGetInt(PH_ID_OUTGOING,
&Talk);
wince 拨号界面自定制                            PHGetInt(PH_ID_TALKING,
&OutGo);
wince 拨号界面自定制                            PHGetInt(PH_ID_HELD,
&Held);
wince 拨号界面自定制                            
if((Talk > 0)||(OutGo>0))
wince 拨号界面自定制wince 拨号界面自定制                            
{
wince 拨号界面自定制                                Draw_Talk(hWnd,TRUE);
wince 拨号界面自定制                            }

wince 拨号界面自定制                            
else if(Held > 0)
wince 拨号界面自定制wince 拨号界面自定制                            
{
wince 拨号界面自定制                                Draw_Talk(hWnd,TRUE);
wince 拨号界面自定制                            }

wince 拨号界面自定制                            
break;
wince 拨号界面自定制                        
case IDC_ACCUMULATOR:
wince 拨号界面自定制                            PHGetInt(PH_ID_HELD,
&Held);
wince 拨号界面自定制                            PHGetDWORD(PH_ID_ACCUMULATOR_EMPTY, 
&Acc);
wince 拨号界面自定制                            
if((Held > 0)&&(Acc == 1))
wince 拨号界面自定制wince 拨号界面自定制                            
{
wince 拨号界面自定制                                Draw_Talk(hWnd,TRUE);
wince 拨号界面自定制                            }

wince 拨号界面自定制                            
else if((Held > 0)&&(Acc == 0))
wince 拨号界面自定制wince 拨号界面自定制                            
{
wince 拨号界面自定制                                Draw(hWnd,BUTTON_TALKEND,FALSE);
wince 拨号界面自定制                            }

wince 拨号界面自定制                            
break;
wince 拨号界面自定制                        
case IDC_CALLSTATE:
wince 拨号界面自定制                            PHGetInt(PH_ID_OUTGOING,
&OutGo);
wince 拨号界面自定制                            PHGetInt(PH_ID_TALKING,
&Talk);
wince 拨号界面自定制                            PHGetInt(PH_ID_INCOMING,
&InCom);
wince 拨号界面自定制                            
if((OutGo == 0)&&(Talk == 0)&&(InCom == 0))
wince 拨号界面自定制wince 拨号界面自定制                            
{
wince 拨号界面自定制                                Draw(hWnd,BUTTON_TALKEND,FALSE);
wince 拨号界面自定制                            }

wince 拨号界面自定制                            
break;
wince 拨号界面自定制                        }

wince 拨号界面自定制                    }

wince 拨号界面自定制                    
break;
wince 拨号界面自定制                
case WM_LBUTTONDOWN:
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        x_pos 
= (((DWORD)lParam)&0xFFFF);
wince 拨号界面自定制                        y_pos 
= (((DWORD)lParam) >> 16);
wince 拨号界面自定制
wince 拨号界面自定制                        dnum 
= InRect(x_pos,y_pos);
wince 拨号界面自定制
wince 拨号界面自定制                        
switch(dnum)
wince 拨号界面自定制wince 拨号界面自定制                        
{
wince 拨号界面自定制                        
case BUTTON_ZERO:
wince 拨号界面自定制                        
case BUTTON_ONE:
wince 拨号界面自定制                        
case BUTTON_TWO:
wince 拨号界面自定制                        
case BUTTON_THREE:
wince 拨号界面自定制                        
case BUTTON_FOUR:
wince 拨号界面自定制                        
case BUTTON_FIVE:
wince 拨号界面自定制                        
case BUTTON_SIX:
wince 拨号界面自定制                        
case BUTTON_SEVEN:
wince 拨号界面自定制                        
case BUTTON_EIGHT:
wince 拨号界面自定制                        
case BUTTON_NINE:
wince 拨号界面自定制                        
case BUTTON_STAR:
wince 拨号界面自定制                        
case BUTTON_POUND:
wince 拨号界面自定制                            num.vkKeyCode 
= vkKeyCode[dnum];
wince 拨号界面自定制                            num.ksKeyState 
= PH_KEYSTATE_DOWN;
wince 拨号界面自定制                            PHDoVerb(PH_VERB_ADD_ACCUMULATOR ,FALSE,(VPARAM)(
&num));
wince 拨号界面自定制                            
wince 拨号界面自定制                            Draw(hWnd,dnum,TRUE);
wince 拨号界面自定制                            breturn 
= TRUE;
wince 拨号界面自定制                            
break;
wince 拨号界面自定制                        
case BUTTON_HISTORY:
wince 拨号界面自定制                            hd 
= GetDlgItem(hWnd,IDC_HISTORY);
wince 拨号界面自定制                            SendMessage(hd,WM_LBUTTONDOWN,
0,0);
wince 拨号界面自定制                            Draw(hWnd,dnum,TRUE);
wince 拨号界面自定制                            breturn 
= TRUE;
wince 拨号界面自定制                        
break;
wince 拨号界面自定制                        
case BUTTON_TALKEND:
wince 拨号界面自定制                            PHGetInt(PH_ID_TALKING,
&Talk);
wince 拨号界面自定制                            PHGetInt(PH_ID_HELD,
&Held);
wince 拨号界面自定制                            PHGetDWORD(PH_ID_ACCUMULATOR_EMPTY, 
&Acc);
wince 拨号界面自定制                            PHGetInt(PH_ID_OUTGOING,
&OutGo);
wince 拨号界面自定制                            PHGetInt(PH_ID_CONNECTED,
&Connect);
wince 拨号界面自定制                            
if(OutGo > 0)
wince 拨号界面自定制wince 拨号界面自定制                            
{
wince 拨号界面自定制                                PHDoVerb(PH_VERB_END ,FALSE,
0);
wince 拨号界面自定制                                Draw_Talk(hWnd,FALSE);
wince 拨号界面自定制                            }

wince 拨号界面自定制                            
else if((Held > 0)&&(Held < Connect))
wince 拨号界面自定制wince 拨号界面自定制                            
{
wince 拨号界面自定制                                PHDoVerb(PH_VERB_END ,FALSE,
0);
wince 拨号界面自定制                                Draw_Talk(hWnd,FALSE);
wince 拨号界面自定制                            }

wince 拨号界面自定制                            
else if((Held > 0)&&(Held == Connect)&&(Acc == 1))
wince 拨号界面自定制wince 拨号界面自定制                            
{
wince 拨号界面自定制                                PHDoVerb(PH_VERB_END ,FALSE,
0);
wince 拨号界面自定制                                Draw_Talk(hWnd,FALSE);
wince 拨号界面自定制                            }

wince 拨号界面自定制                            
else if((Held > 0)&&(Held == Connect)&&(Acc == 0))
wince 拨号界面自定制wince 拨号界面自定制                            
{
wince 拨号界面自定制                                PHDoVerb(PH_VERB_TALK ,FALSE,
0);
wince 拨号界面自定制                                Draw(hWnd,dnum,TRUE);                                
wince 拨号界面自定制                            }

wince 拨号界面自定制                            
else if((Held == 0)&&(Connect > 0))
wince 拨号界面自定制wince 拨号界面自定制                            
{
wince 拨号界面自定制                                PHDoVerb(PH_VERB_END ,FALSE,
0);
wince 拨号界面自定制                                Draw(hWnd,dnum,TRUE);
wince 拨号界面自定制                            }

wince 拨号界面自定制                            
else
wince 拨号界面自定制wince 拨号界面自定制                            
{
wince 拨号界面自定制                                PHDoVerb(PH_VERB_TALK ,FALSE,
0);
wince 拨号界面自定制                                Draw(hWnd,dnum,TRUE);
wince 拨号界面自定制                            }

wince 拨号界面自定制                            
wince 拨号界面自定制                            
wince 拨号界面自定制                            breturn 
= TRUE;
wince 拨号界面自定制                        
break;
wince 拨号界面自定制                        
case BUTTON_SPEED:
wince 拨号界面自定制                            hd 
= GetDlgItem(hWnd,IDC_SPEED);
wince 拨号界面自定制                            SendMessage(hd,WM_LBUTTONDOWN,
0,0);
wince 拨号界面自定制                            Draw(hWnd,dnum,TRUE);
wince 拨号界面自定制                            breturn 
= TRUE;
wince 拨号界面自定制                        
break;
wince 拨号界面自定制                        
case BUTTON_ERASE:
wince 拨号界面自定制                            Draw(hWnd,dnum,TRUE);
wince 拨号界面自定制                            shrg.cbSize 
= sizeof(shrg);
wince 拨号界面自定制                            shrg.hwndClient 
= hWnd;
wince 拨号界面自定制                            shrg.ptDown.x 
= LOWORD(lParam);
wince 拨号界面自定制                            shrg.ptDown.y 
= HIWORD(lParam);
wince 拨号界面自定制                            shrg.dwFlags 
= SHRG_RETURNCMD|
wince 拨号界面自定制                                           SHRG_NOANIMATION;
wince 拨号界面自定制                            
if (SHRecognizeGesture(&shrg) == GN_CONTEXTMENU)
wince 拨号界面自定制wince 拨号界面自定制                            
{
wince 拨号界面自定制                                hr 
= PHDoVerb(PH_VERB_REMOVE_ACCUMULATOR ,FALSE,TRUE);
wince 拨号界面自定制                            }

wince 拨号界面自定制                            
else
wince 拨号界面自定制wince 拨号界面自定制                            
{
wince 拨号界面自定制                                hr 
= PHDoVerb(PH_VERB_REMOVE_ACCUMULATOR ,FALSE,FALSE);
wince 拨号界面自定制                            }

wince 拨号界面自定制                            breturn 
= TRUE;
wince 拨号界面自定制                        
break;
wince 拨号界面自定制                        
default:
wince 拨号界面自定制                        
break;
wince 拨号界面自定制                        }

wince 拨号界面自定制                    }

wince 拨号界面自定制                    
break;
wince 拨号界面自定制                
case WM_LBUTTONUP:
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        x_pos 
= (((DWORD)lParam)&0xFFFF);
wince 拨号界面自定制                        y_pos 
= (((DWORD)lParam) >> 16);
wince 拨号界面自定制                        dnum 
= InRect(x_pos,y_pos);
wince 拨号界面自定制                        
wince 拨号界面自定制                        
switch(dnum)
wince 拨号界面自定制wince 拨号界面自定制                        
{
wince 拨号界面自定制                        
case BUTTON_ZERO:
wince 拨号界面自定制                        
case BUTTON_ONE:
wince 拨号界面自定制                        
case BUTTON_TWO:
wince 拨号界面自定制                        
case BUTTON_THREE:
wince 拨号界面自定制                        
case BUTTON_FOUR:
wince 拨号界面自定制                        
case BUTTON_FIVE:
wince 拨号界面自定制                        
case BUTTON_SIX:
wince 拨号界面自定制                        
case BUTTON_SEVEN:
wince 拨号界面自定制                        
case BUTTON_EIGHT:
wince 拨号界面自定制                        
case BUTTON_NINE:
wince 拨号界面自定制                        
case BUTTON_STAR:
wince 拨号界面自定制                        
case BUTTON_POUND:
wince 拨号界面自定制                        
case BUTTON_HISTORY:
wince 拨号界面自定制                        
case BUTTON_SPEED:
wince 拨号界面自定制                        
case BUTTON_ERASE:
wince 拨号界面自定制                                Draw(hWnd,dnum,FALSE);
wince 拨号界面自定制                                breturn 
= TRUE;
wince 拨号界面自定制                        
break;
wince 拨号界面自定制                        
case BUTTON_TALKEND:
wince 拨号界面自定制                            PHGetInt(PH_ID_TALKING,
&OutGo);
wince 拨号界面自定制                            PHGetInt(PH_ID_HELD,
&Held);
wince 拨号界面自定制                            PHGetDWORD(PH_ID_ACCUMULATOR_EMPTY, 
&Acc);
wince 拨号界面自定制                            PHGetInt(PH_ID_OUTGOING,
&Talk);
wince 拨号界面自定制                            PHGetInt(PH_ID_CONNECTED,
&Connect);
wince 拨号界面自定制                            
if(Held > 0)
wince 拨号界面自定制wince 拨号界面自定制                            
{
wince 拨号界面自定制                                Draw_Talk(hWnd,TRUE);
wince 拨号界面自定制                            }

wince 拨号界面自定制                            
else
wince 拨号界面自定制wince 拨号界面自定制                            
{
wince 拨号界面自定制                                Draw(hWnd,dnum,FALSE);
wince 拨号界面自定制                            }

wince 拨号界面自定制                            breturn 
= TRUE;
wince 拨号界面自定制                        
break;
wince 拨号界面自定制                        
default:
wince 拨号界面自定制                        
break;
wince 拨号界面自定制                        }

wince 拨号界面自定制                    }

wince 拨号界面自定制                    
break;
wince 拨号界面自定制                
default:
wince 拨号界面自定制                    
break;
wince 拨号界面自定制            }

wince 拨号界面自定制    
return breturn;
wince 拨号界面自定制}

wince 拨号界面自定制
wince 拨号界面自定制void  GetRect_Pro(HWND hWnd)
wince 拨号界面自定制wince 拨号界面自定制
{
wince 拨号界面自定制wince 拨号界面自定制    DWORD BUTTON[
6= {
wince 拨号界面自定制        IDC_HISTORY_SPEAKER,
wince 拨号界面自定制        IDC_MUTE,
wince 拨号界面自定制        IDC_HOLDSWAP,
wince 拨号界面自定制        IDC_TALKEND,
wince 拨号界面自定制        IDC_CONTACTS,
wince 拨号界面自定制        IDC_NOTEPAD,
wince 拨号界面自定制    }
;
wince 拨号界面自定制        HWND hd 
= NULL;
wince 拨号界面自定制        
for(int i = 0; i <= 5; i++)
wince 拨号界面自定制wince 拨号界面自定制        
{
wince 拨号界面自定制            hd 
= GetDlgItem(hWnd,BUTTON[i]);
wince 拨号界面自定制            ::GetClientRect(hd,
&disRect_Pro[i]);
wince 拨号界面自定制            ::GetWindowRect(hd,
&WndPosRect_Pro[i]);
wince 拨号界面自定制        }

wince 拨号界面自定制        RECT_Mark_Pro 
= TRUE;
wince 拨号界面自定制}

wince 拨号界面自定制
wince 拨号界面自定制DWORD InRect_Pro(DWORD x_pos,DWORD y_pos)
wince 拨号界面自定制wince 拨号界面自定制
{
wince 拨号界面自定制wince 拨号界面自定制    POINT Point 
= {0,0};
wince 拨号界面自定制    Point.x 
= x_pos;
wince 拨号界面自定制    Point.y 
= y_pos;
wince 拨号界面自定制wince 拨号界面自定制    RECT Rect 
= {0};
wince 拨号界面自定制    
for(DWORD i = 0; i <= 5; i++)
wince 拨号界面自定制wince 拨号界面自定制    
{
wince 拨号界面自定制        Rect.bottom 
= WndPosRect_Pro[i].bottom - 26;
wince 拨号界面自定制        Rect.top 
= WndPosRect_Pro[i].top - 26;
wince 拨号界面自定制        Rect.left 
= WndPosRect_Pro[i].left;
wince 拨号界面自定制        Rect.right 
= WndPosRect_Pro[i].right;
wince 拨号界面自定制        
if(PtInRect(&Rect,Point))
wince 拨号界面自定制wince 拨号界面自定制        
{
wince 拨号界面自定制            
return i;
wince 拨号界面自定制        }

wince 拨号界面自定制    }

wince 拨号界面自定制    
return 100;
wince 拨号界面自定制}

wince 拨号界面自定制
wince 拨号界面自定制BOOL PHExtplpfnHookPro(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
wince 拨号界面自定制wince 拨号界面自定制
{
wince 拨号界面自定制    HWND hd 
= NULL;
wince 拨号界面自定制    BOOL breturn 
= FALSE;
wince 拨号界面自定制    DWORD x_pos;
wince 拨号界面自定制    DWORD y_pos;
wince 拨号界面自定制
wince 拨号界面自定制    
int Outgo = 0;
wince 拨号界面自定制    
int Connect = 0;
wince 拨号界面自定制    DWORD Acc 
= 1;
wince 拨号界面自定制    DWORD dnum;
wince 拨号界面自定制
wince 拨号界面自定制    DWORD Speaker 
= 0;
wince 拨号界面自定制    
int Held = 0;
wince 拨号界面自定制    
int Talk = 0;
wince 拨号界面自定制
wince 拨号界面自定制    
if(RECT_Mark_Pro == FALSE)
wince 拨号界面自定制wince 拨号界面自定制    
{
wince 拨号界面自定制        GetRect_Pro(hWnd);
wince 拨号界面自定制    }

wince 拨号界面自定制
wince 拨号界面自定制    
switch(Msg)
wince 拨号界面自定制wince 拨号界面自定制    
{
wince 拨号界面自定制        
case WM_PH_PAINTCHILDBACKGROUND:
wince 拨号界面自定制wince 拨号界面自定制            
{
wince 拨号界面自定制                
switch(GetDlgCtrlID((HWND)wParam))
wince 拨号界面自定制wince 拨号界面自定制                
{
wince 拨号界面自定制                
case IDC_MUTE:
wince 拨号界面自定制                
case IDC_CONTACTS:
wince 拨号界面自定制                
case IDC_NOTEPAD:
wince 拨号界面自定制                    hd 
= (HWND)wParam;
wince 拨号界面自定制                    ShowWindow(hd,FALSE);
wince 拨号界面自定制                    breturn 
= TRUE;
wince 拨号界面自定制                    
break;
wince 拨号界面自定制                
case IDC_HISTORY_SPEAKER:
wince 拨号界面自定制                    PHGetInt(PH_ID_OUTGOING,
&Outgo);
wince 拨号界面自定制                    PHGetInt(PH_ID_CONNECTED,
&Connect);
wince 拨号界面自定制                    
wince 拨号界面自定制                    
if((Outgo > 0)||(Connect > 0))
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        getRegSPEAKER(
&Speaker);
wince 拨号界面自定制                        
if(Speaker == 0)
wince 拨号界面自定制wince 拨号界面自定制                        
{
wince 拨号界面自定制                            Draw_Pro(hWnd,
0,TRUE);
wince 拨号界面自定制                        }

wince 拨号界面自定制                        
else
wince 拨号界面自定制wince 拨号界面自定制                        
{
wince 拨号界面自定制                            Draw_Pro_SP(hWnd,SP_LIGHT);
wince 拨号界面自定制                        }

wince 拨号界面自定制                    }

wince 拨号界面自定制                    
else
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        Draw_Pro_SP(hWnd,SP_HIS_LIGHT);
wince 拨号界面自定制                    }

wince 拨号界面自定制                    hd 
= (HWND)wParam;
wince 拨号界面自定制                    ShowWindow(hd,FALSE);
wince 拨号界面自定制                    breturn 
= TRUE;
wince 拨号界面自定制                    
break;
wince 拨号界面自定制                
case IDC_TALKEND:
wince 拨号界面自定制                    hd 
= (HWND)wParam;
wince 拨号界面自定制                    ShowWindow(hd,FALSE);
wince 拨号界面自定制                    PHGetInt(PH_ID_OUTGOING,
&Outgo);
wince 拨号界面自定制                    PHGetInt(PH_ID_CONNECTED,
&Connect);
wince 拨号界面自定制                    
if((Outgo > 0)||(Connect > 0))
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                    }

wince 拨号界面自定制                    
else
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        Draw_Pro_Talk(hWnd,TALK_LIGHT);
wince 拨号界面自定制                    }

wince 拨号界面自定制                    breturn 
= TRUE;
wince 拨号界面自定制                    
break;
wince 拨号界面自定制                
case IDC_HOLDSWAP:
wince 拨号界面自定制                    hd 
= (HWND)wParam;
wince 拨号界面自定制                    ShowWindow(hd,FALSE);
wince 拨号界面自定制                    breturn 
= TRUE;
wince 拨号界面自定制                    PHGetInt(PH_ID_CONNECTED,
&Connect);
wince 拨号界面自定制                    PHGetInt(PH_ID_HELD,
&Held);
wince 拨号界面自定制                    
if((Held == 1)&&(Connect == Held))
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        Draw_Pro_Held(hWnd,HELD_RESUME_LIGHT);
wince 拨号界面自定制                    }

wince 拨号界面自定制                    
else if((Held == 1)&&(Connect > Held))
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        Draw_Pro_Held(hWnd,HELD_SWAP_LIGHT);
wince 拨号界面自定制                    }

wince 拨号界面自定制                    
else
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        Draw_Pro_Held(hWnd,HELD_ASH);
wince 拨号界面自定制                    }

wince 拨号界面自定制                    
break;
wince 拨号界面自定制                    
wince 拨号界面自定制                
case IDC_CALLSTATE:
wince 拨号界面自定制                    PHGetInt(PH_ID_TALKING,
&Talk);
wince 拨号界面自定制                    PHGetInt(PH_ID_HELD,
&Held);
wince 拨号界面自定制                    PHGetDWORD(PH_ID_ACCUMULATOR_EMPTY, 
&Acc);
wince 拨号界面自定制                    PHGetInt(PH_ID_OUTGOING,
&Outgo);
wince 拨号界面自定制                    PHGetInt(PH_ID_CONNECTED,
&Connect);
wince 拨号界面自定制                    getRegSPEAKER(
&Speaker);
wince 拨号界面自定制                    
if((Held == 1)&&(Connect == 1))
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        Draw_Pro_Held(hWnd,HELD_RESUME_LIGHT);
wince 拨号界面自定制                    }

wince 拨号界面自定制                    
else if((Held == 1)&&(Connect > Held))
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        Draw_Pro_Held(hWnd,HELD_SWAP_LIGHT);
wince 拨号界面自定制                    }

wince 拨号界面自定制                    
else if(Connect == 0)
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        Draw_Pro_Held(hWnd,HELD_ASH);
wince 拨号界面自定制                    }

wince 拨号界面自定制                    
if((Connect == 0)&&(Outgo == 0))
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        Draw_Pro_Mute(hWnd, MUTE_ASH);
wince 拨号界面自定制                    }

wince 拨号界面自定制                    
wince 拨号界面自定制                    
else if(Mute == TRUE)
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        Draw_Pro(hWnd,BUTTON_MUTE_PRO,TRUE);
wince 拨号界面自定制                    }

wince 拨号界面自定制                    
else
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        Draw_Pro_Mute(hWnd,MUTE_LIGHT);
wince 拨号界面自定制                    }

wince 拨号界面自定制                    
if((Connect == 0)&&(Outgo == 0))
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        Draw_Pro_SP(hWnd,SP_HIS_LIGHT);
wince 拨号界面自定制                    }

wince 拨号界面自定制                    
else if(Speaker == 1)
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        Draw_Pro_SP(hWnd,SP_LIGHT);
wince 拨号界面自定制                    }

wince 拨号界面自定制                    
else
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        Draw_Pro(hWnd,BUTTON_SPEAKER_PRO,TRUE);
wince 拨号界面自定制                    }

wince 拨号界面自定制                    
if((Outgo == 0)&&(Connect == 0))
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        Draw_Pro_Talk(hWnd,TALK_LIGHT);
wince 拨号界面自定制                    }

wince 拨号界面自定制                    
else if((Acc == 0)&&(Held == Connect)&&(Outgo == 0))
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        Draw_Pro_Talk(hWnd, TALK_LIGHT);
wince 拨号界面自定制                    }

wince 拨号界面自定制                    
break;
wince 拨号界面自定制                
case IDC_BRANDING:
wince 拨号界面自定制                    PHGetInt(PH_ID_TALKING,
&Talk);
wince 拨号界面自定制                    PHGetInt(PH_ID_HELD,
&Held);
wince 拨号界面自定制                    PHGetDWORD(PH_ID_ACCUMULATOR_EMPTY, 
&Acc);
wince 拨号界面自定制                    PHGetInt(PH_ID_OUTGOING,
&Outgo);
wince 拨号界面自定制                    PHGetInt(PH_ID_CONNECTED,
&Connect);
wince 拨号界面自定制                    getRegSPEAKER(
&Speaker);
wince 拨号界面自定制                    
if((Held == 1)&&(Connect == 1))
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        Draw_Pro_Held(hWnd,HELD_RESUME_LIGHT);
wince 拨号界面自定制                    }

wince 拨号界面自定制                    
else if((Held == 1)&&(Connect > Held))
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        Draw_Pro_Held(hWnd,HELD_SWAP_LIGHT);
wince 拨号界面自定制                    }

wince 拨号界面自定制                    
else if(Connect == 0)
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        Draw_Pro_Held(hWnd,HELD_ASH);
wince 拨号界面自定制                    }

wince 拨号界面自定制                    
if((Connect == 0)&&(Outgo == 0))
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        Draw_Pro_Mute(hWnd, MUTE_ASH);
wince 拨号界面自定制                    }

wince 拨号界面自定制                    
else if(Mute == TRUE)
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        Draw_Pro(hWnd,BUTTON_MUTE_PRO,TRUE);
wince 拨号界面自定制                    }

wince 拨号界面自定制                    
else
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        Draw_Pro_Mute(hWnd,MUTE_LIGHT);
wince 拨号界面自定制                    }

wince 拨号界面自定制                    
if((Connect == 0)&&(Outgo == 0))
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        Draw_Pro_SP(hWnd,SP_HIS_LIGHT);
wince 拨号界面自定制                    }

wince 拨号界面自定制                    
else if(Speaker == 1)
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        Draw_Pro_SP(hWnd,SP_LIGHT);
wince 拨号界面自定制                    }

wince 拨号界面自定制                    
else
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        Draw_Pro(hWnd,BUTTON_SPEAKER_PRO,TRUE);
wince 拨号界面自定制                    }

wince 拨号界面自定制
wince 拨号界面自定制                    
if((Outgo == 0)&&(Connect == 0))
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        Draw_Pro_Talk(hWnd,TALK_LIGHT);
wince 拨号界面自定制                    }

wince 拨号界面自定制                    
else if((Acc == 0)&&(Held == Connect)&&(Outgo == 0))
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        Draw_Pro_Talk(hWnd, TALK_LIGHT);
wince 拨号界面自定制                    }

wince 拨号界面自定制                    
break;
wince 拨号界面自定制
wince 拨号界面自定制                
case IDC_STATUSAREA:
wince 拨号界面自定制                    PHGetInt(PH_ID_HELD,
&Held);
wince 拨号界面自定制                    PHGetInt(PH_ID_CONNECTED,
&Connect);
wince 拨号界面自定制                    
if((Connect == 1)&&(Held == 0))
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        Draw_Pro(hWnd,BUTTON_HOLDSWAP_PRO,TRUE);
wince 拨号界面自定制                    }

wince 拨号界面自定制                    
break;
wince 拨号界面自定制                }

wince 拨号界面自定制            }

wince 拨号界面自定制            
break;
wince 拨号界面自定制        
case WM_LBUTTONDOWN:
wince 拨号界面自定制wince 拨号界面自定制            
{
wince 拨号界面自定制                x_pos 
= (((DWORD)lParam)&0xFFFF);
wince 拨号界面自定制                y_pos 
= (((DWORD)lParam) >> 16);
wince 拨号界面自定制
wince 拨号界面自定制                dnum 
= InRect_Pro(x_pos,y_pos);
wince 拨号界面自定制                
switch(dnum)
wince 拨号界面自定制wince 拨号界面自定制                
{
wince 拨号界面自定制                
case BUTTON_SPEAKER_PRO:
wince 拨号界面自定制                    PHGetInt(PH_ID_OUTGOING,
&Outgo);
wince 拨号界面自定制                    PHGetInt(PH_ID_CONNECTED,
&Connect);
wince 拨号界面自定制                    
if((Outgo > 0)||(Connect > 0))
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        getRegSPEAKER(
&Speaker);
wince 拨号界面自定制                        
if(Speaker)
wince 拨号界面自定制wince 拨号界面自定制                        
{
wince 拨号界面自定制                            Draw_Pro_SP(hWnd,SP_DARK);
wince 拨号界面自定制                            PHDoVerb(PH_VERB_SPEAKERPHONEOFF,FALSE,FALSE);
wince 拨号界面自定制                            setRegSPEAKER(
0);
wince 拨号界面自定制                        }

wince 拨号界面自定制                        
else
wince 拨号界面自定制wince 拨号界面自定制                        
{
wince 拨号界面自定制                            Draw_Pro(hWnd,dnum,FALSE);
wince 拨号界面自定制                            PHDoVerb(PH_VERB_SPEAKERPHONEON,FALSE,FALSE);
wince 拨号界面自定制                            setRegSPEAKER(
1);
wince 拨号界面自定制                        }

wince 拨号界面自定制                        
wince 拨号界面自定制                    }

wince 拨号界面自定制                    
else
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        Draw_Pro_SP(hWnd,SP_HIS_DARK);
wince 拨号界面自定制                        hd 
= GetDlgItem(hWnd,IDC_HISTORY_SPEAKER);
wince 拨号界面自定制                        SendMessage(hd,WM_LBUTTONDOWN,
0,0); 
wince 拨号界面自定制                    }

wince 拨号界面自定制                    
wince 拨号界面自定制                    
break;
wince 拨号界面自定制                
case BUTTON_MUTE_PRO:
wince 拨号界面自定制                    PHGetInt(PH_ID_OUTGOING,
&Outgo);
wince 拨号界面自定制                    PHGetInt(PH_ID_CONNECTED,
&Connect);
wince 拨号界面自定制                    
if((Outgo > 0)||(Connect > 0))
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        
if(Mute)
wince 拨号界面自定制wince 拨号界面自定制                        
{
wince 拨号界面自定制                            Draw_Pro(hWnd,dnum,FALSE);
wince 拨号界面自定制                            PHDoVerb(PH_VERB_MUTE,FALSE,FALSE);
wince 拨号界面自定制                        }

wince 拨号界面自定制                        
else
wince 拨号界面自定制wince 拨号界面自定制                        
{
wince 拨号界面自定制                            Draw_Pro(hWnd,BUTTON_MUTE_PRO,FALSE);
wince 拨号界面自定制                            PHDoVerb(PH_VERB_UNMUTE,FALSE,FALSE);
wince 拨号界面自定制                        }

wince 拨号界面自定制                    }

wince 拨号界面自定制                    
break;
wince 拨号界面自定制                
case BUTTON_HOLDSWAP_PRO:
wince 拨号界面自定制                    PHGetInt(PH_ID_CONNECTED,
&Connect);
wince 拨号界面自定制                    PHGetInt(PH_ID_HELD,
&Held);
wince 拨号界面自定制                    
if((Connect == 1)&&(Held == 0))
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        Draw_Pro(hWnd,dnum,FALSE);
wince 拨号界面自定制                        PHDoVerb(PH_VERB_HOLD,FALSE,FALSE);
wince 拨号界面自定制                    }

wince 拨号界面自定制                    
else if((Connect == 1)&&(Held == 1))
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        Draw_Pro_Held(hWnd,HELD_RESUME_DARK);
wince 拨号界面自定制                        PHDoVerb(PH_VERB_UNHOLD,FALSE,FALSE);
wince 拨号界面自定制                    }

wince 拨号界面自定制                    
else if(Connect >= 2)
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        Draw_Pro_Held(hWnd,HELD_SWAP_DARK);
wince 拨号界面自定制                        PHDoVerb(PH_VERB_SWAP,FALSE,FALSE);
wince 拨号界面自定制                    }

wince 拨号界面自定制                    
break;
wince 拨号界面自定制                
case BUTTON_TALKEND_PRO:
wince 拨号界面自定制                    PHGetInt(PH_ID_OUTGOING,
&Outgo);
wince 拨号界面自定制                    PHGetInt(PH_ID_CONNECTED,
&Connect);
wince 拨号界面自定制                    
if((Outgo > 0)||(Connect > 0))
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        Draw_Pro(hWnd,dnum,FALSE);
wince 拨号界面自定制                        PHDoVerb(PH_VERB_END ,FALSE,FALSE);
wince 拨号界面自定制                        Mute 
= TRUE;
wince 拨号界面自定制                    }

wince 拨号界面自定制                    
else
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        Draw_Pro_Talk(hWnd,TALK_DARK);
wince 拨号界面自定制                        PHDoVerb(PH_VERB_TALK ,FALSE,FALSE);
wince 拨号界面自定制                    }

wince 拨号界面自定制                    
break;
wince 拨号界面自定制                
case BUTTON_CONTACTS_PRO:
wince 拨号界面自定制                    hd 
= GetDlgItem(hWnd,IDC_CONTACTS);
wince 拨号界面自定制                    SendMessage(hd,WM_LBUTTONDOWN,
0,0);
wince 拨号界面自定制                    Draw_Pro(hWnd,dnum,FALSE);
wince 拨号界面自定制                    
break;
wince 拨号界面自定制                
case BUTTON_NOTEPAD_PRO:
wince 拨号界面自定制                    hd 
= GetDlgItem(hWnd,IDC_NOTEPAD);
wince 拨号界面自定制                    SendMessage(hd,WM_LBUTTONDOWN,
0,0);
wince 拨号界面自定制                    Draw_Pro(hWnd,dnum,FALSE);
wince 拨号界面自定制                    
break;
wince 拨号界面自定制                }

wince 拨号界面自定制            }

wince 拨号界面自定制            
break;
wince 拨号界面自定制        
case WM_LBUTTONUP:
wince 拨号界面自定制wince 拨号界面自定制            
{
wince 拨号界面自定制                x_pos 
= (((DWORD)lParam)&0xFFFF);
wince 拨号界面自定制                y_pos 
= (((DWORD)lParam) >> 16);
wince 拨号界面自定制                dnum 
= InRect_Pro(x_pos,y_pos);
wince 拨号界面自定制                
switch(dnum)
wince 拨号界面自定制wince 拨号界面自定制                
{
wince 拨号界面自定制                
case BUTTON_SPEAKER_PRO:
wince 拨号界面自定制                    PHGetInt(PH_ID_OUTGOING,
&Outgo);
wince 拨号界面自定制                    PHGetInt(PH_ID_CONNECTED,
&Connect);
wince 拨号界面自定制                    
if((Outgo > 0)||(Connect > 0))
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        getRegSPEAKER(
&Speaker);
wince 拨号界面自定制                        
if(Speaker)
wince 拨号界面自定制wince 拨号界面自定制                        
{
wince 拨号界面自定制                            Draw_Pro_SP(hWnd,SP_LIGHT);
wince 拨号界面自定制                        }

wince 拨号界面自定制                        
else
wince 拨号界面自定制wince 拨号界面自定制                        
{
wince 拨号界面自定制                            Draw_Pro(hWnd,dnum,TRUE);
wince 拨号界面自定制                        }

wince 拨号界面自定制                    }

wince 拨号界面自定制                    
else
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        Draw_Pro_SP(hWnd,SP_HIS_LIGHT);
wince 拨号界面自定制                    }

wince 拨号界面自定制                    
break;
wince 拨号界面自定制                
case BUTTON_MUTE_PRO:
wince 拨号界面自定制                    PHGetInt(PH_ID_OUTGOING,
&Outgo);
wince 拨号界面自定制                    PHGetInt(PH_ID_CONNECTED,
&Connect);
wince 拨号界面自定制                    
if((Outgo > 0)||(Connect > 0))
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        
if(Mute)
wince 拨号界面自定制wince 拨号界面自定制                        
{
wince 拨号界面自定制                            Draw_Pro_Mute(hWnd,MUTE_LIGHT);
wince 拨号界面自定制                            Mute 
= FALSE;
wince 拨号界面自定制                        }

wince 拨号界面自定制                        
else
wince 拨号界面自定制wince 拨号界面自定制                        
{
wince 拨号界面自定制                            Draw_Pro(hWnd,dnum,TRUE);
wince 拨号界面自定制                            Mute 
= TRUE;
wince 拨号界面自定制                        }

wince 拨号界面自定制                    }

wince 拨号界面自定制                    
break;
wince 拨号界面自定制                
case BUTTON_HOLDSWAP_PRO:
wince 拨号界面自定制                    PHGetInt(PH_ID_CONNECTED,
&Connect);
wince 拨号界面自定制                    PHGetInt(PH_ID_HELD,
&Held);
wince 拨号界面自定制                    
if((Connect == 1)&&(Held == 0))
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        Draw_Pro_Held(hWnd,HELD_RESUME_LIGHT);
wince 拨号界面自定制                    }

wince 拨号界面自定制                    
else if((Connect == 1)&&(Held == 1))
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        Draw_Pro(hWnd,dnum,TRUE);
wince 拨号界面自定制                    }

wince 拨号界面自定制                    
else if(Connect >= 2)
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        Draw_Pro_Held(hWnd,HELD_SWAP_LIGHT);
wince 拨号界面自定制                    }

wince 拨号界面自定制                    
break;
wince 拨号界面自定制                
case BUTTON_TALKEND_PRO:
wince 拨号界面自定制                    PHGetInt(PH_ID_OUTGOING,
&Outgo);
wince 拨号界面自定制                    PHGetInt(PH_ID_CONNECTED,
&Connect);
wince 拨号界面自定制                    
if((Outgo > 0)||(Connect > 0))
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        Draw_Pro(hWnd,dnum,TRUE);
wince 拨号界面自定制                    }

wince 拨号界面自定制                    
else
wince 拨号界面自定制wince 拨号界面自定制                    
{
wince 拨号界面自定制                        Draw_Pro_Talk(hWnd,TALK_LIGHT);
wince 拨号界面自定制                    }

wince 拨号界面自定制                    
break;
wince 拨号界面自定制                
case BUTTON_CONTACTS_PRO:
wince 拨号界面自定制                    Draw_Pro(hWnd,dnum,TRUE);
wince 拨号界面自定制                    
break;
wince 拨号界面自定制                
case BUTTON_NOTEPAD_PRO:
wince 拨号界面自定制                    Draw_Pro(hWnd,dnum,TRUE);
wince 拨号界面自定制                    
break;
wince 拨号界面自定制                }

wince 拨号界面自定制            }

wince 拨号界面自定制            
break;            
wince 拨号界面自定制    }

wince 拨号界面自定制    
return breturn;
wince 拨号界面自定制}

wince 拨号界面自定制
wince 拨号界面自定制
wince 拨号界面自定制
void  GetRect_In(HWND hWnd)
wince 拨号界面自定制wince 拨号界面自定制
{
wince 拨号界面自定制        ::GetWindowRect(hWnd,
&WndPosRect_In[10]);
wince 拨号界面自定制
wince 拨号界面自定制        HWND hd 
= NULL;
wince 拨号界面自定制        hd 
= GetDlgItem(hWnd,IDC_BRANDING);
wince 拨号界面自定制        ::GetClientRect(hd,
&disRect_In[0]);
wince 拨号界面自定制        ::GetWindowRect(hd,
&WndPosRect_In[0]);
wince 拨号界面自定制
wince 拨号界面自定制        hd 
= GetDlgItem(hWnd,IDC_STATUSICONS);
wince 拨号界面自定制        ::GetClientRect(hd,
&disRect_In[1]);
wince 拨号界面自定制        ::GetWindowRect(hd,
&WndPosRect_In[1]);
wince 拨号界面自定制
wince 拨号界面自定制        hd 
= GetDlgItem(hWnd,IDC_LINEUI);
wince 拨号界面自定制        ::GetClientRect(hd,
&disRect_In[2]);
wince 拨号界面自定制        ::GetWindowRect(hd,
&WndPosRect_In[2]);
wince 拨号界面自定制
wince 拨号界面自定制        hd 
= GetDlgItem(hWnd,IDC_INCOMINGCALL_TEXT);
wince 拨号界面自定制        ::GetClientRect(hd,
&disRect_In[3]);
wince 拨号界面自定制        ::GetWindowRect(hd,
&WndPosRect_In[3]);
wince 拨号界面自定制
wince 拨号界面自定制        hd 
= GetDlgItem(hWnd,IDC_CALERTCONTACT);
wince 拨号界面自定制        ::GetClientRect(hd,
&disRect_In[4]);
wince 拨号界面自定制        ::GetWindowRect(hd,
&WndPosRect_In[4]);
wince 拨号界面自定制
wince 拨号界面自定制        hd 
= GetDlgItem(hWnd,IDC_CALERTLAYOUTHELPER);
wince 拨号界面自定制        ::GetClientRect(hd,
&disRect_In[5]);
wince 拨号界面自定制        ::GetWindowRect(hd,
&WndPosRect_In[5]);
wince 拨号界面自定制
wince 拨号界面自定制        hd 
= GetDlgItem(hWnd,IDC_CALERTCONTACTPICTURE);
wince 拨号界面自定制        ::GetClientRect(hd,
&disRect_In[6]);
wince 拨号界面自定制        ::GetWindowRect(hd,
&WndPosRect_In[6]);
wince 拨号界面自定制
wince 拨号界面自定制        hd 
= GetDlgItem(hWnd,IDC_GSM);
wince 拨号界面自定制        ::GetClientRect(hd,
&disRect_In[7]);
wince 拨号界面自定制        ::GetWindowRect(hd,
&WndPosRect_In[7]);
wince 拨号界面自定制
wince 拨号界面自定制        hd 
= GetDlgItem(hWnd,IDC_COMIN);
wince 拨号界面自定制        ::GetClientRect(hd,
&disRect_In[8]);
wince 拨号界面自定制        ::GetWindowRect(hd,
&WndPosRect_In[8]);
wince 拨号界面自定制
wince 拨号界面自定制        hd 
= GetDlgItem(hWnd,IDC_NUM);
wince 拨号界面自定制        ::GetClientRect(hd,
&disRect_In[9]);
wince 拨号界面自定制        ::GetWindowRect(hd,
&WndPosRect_In[9]);
wince 拨号界面自定制
wince 拨号界面自定制
wince 拨号界面自定制    RECT_Mark_In 
= TRUE;
wince 拨号界面自定制}

wince 拨号界面自定制
wince 拨号界面自定制BOOL PHExtplpfnHookIn(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
wince 拨号界面自定制wince 拨号界面自定制
{
wince 拨号界面自定制    BOOL miao 
= FALSE;
wince 拨号界面自定制    
if(RECT_Mark_In == FALSE)
wince 拨号界面自定制wince 拨号界面自定制    
{
wince 拨号界面自定制        GetRect_In(hWnd);
wince 拨号界面自定制    }

wince 拨号界面自定制    HWND hd 
= NULL;
wince 拨号界面自定制    HDC   hDC  
= NULL;
wince 拨号界面自定制    
//HWND HWND = NULL;
wince 拨号界面自定制wince 拨号界面自定制
    TCHAR text[MAX_PATH]={0};
wince 拨号界面自定制    
switch(Msg)
wince 拨号界面自定制wince 拨号界面自定制    
{
wince 拨号界面自定制        
wince 拨号界面自定制        
case WM_PH_PAINTCHILDBACKGROUND:
wince 拨号界面自定制wince 拨号界面自定制            
{
wince 拨号界面自定制                
switch(GetDlgCtrlID((HWND)wParam))
wince 拨号界面自定制wince 拨号界面自定制                
{
wince 拨号界面自定制                
case IDC_BRANDING:
wince 拨号界面自定制                    hd 
= (HWND)wParam;
wince 拨号界面自定制                    ShowWindow(hd,FALSE);
wince 拨号界面自定制                    
break;
wince 拨号界面自定制                
case IDC_STATUSICONS:
wince 拨号界面自定制                    hd 
= (HWND)wParam;
wince 拨号界面自定制                    ShowWindow(hd,FALSE);
wince 拨号界面自定制                    
break;
wince 拨号界面自定制                
case IDC_LINEUI:
wince 拨号界面自定制                    
break;
wince 拨号界面自定制                
case IDC_INCOMINGCALL_TEXT:
wince 拨号界面自定制                    hd 
= (HWND)wParam;
wince 拨号界面自定制                    ShowWindow(hd,FALSE);
wince 拨号界面自定制                    
break;
wince 拨号界面自定制                
case IDC_CALERTCONTACT:
wince 拨号界面自定制                    hd 
= (HWND)wParam;
wince 拨号界面自定制                    ShowWindow(hd,FALSE);
wince 拨号界面自定制                    
break;
wince 拨号界面自定制                
case IDC_CALERTLAYOUTHELPER:
wince 拨号界面自定制                    hd 
= (HWND)wParam;
wince 拨号界面自定制                    ShowWindow(hd,FALSE);
wince 拨号界面自定制                    
break;
wince 拨号界面自定制                
case IDC_CALERTCONTACTPICTURE:
wince 拨号界面自定制                    hd 
= (HWND)wParam;
wince 拨号界面自定制                    ShowWindow(hd,FALSE);
wince 拨号界面自定制                    
break;
wince 拨号界面自定制                
default:
wince 拨号界面自定制                    
break;
wince 拨号界面自定制                }

wince 拨号界面自定制            }

wince 拨号界面自定制            
break;
wince 拨号界面自定制        
wince 拨号界面自定制    
case WM_ERASEBKGND:
wince 拨号界面自定制        Draw_In(hWnd);
wince 拨号界面自定制        miao 
= TRUE;
wince 拨号界面自定制        
break;
wince 拨号界面自定制
wince 拨号界面自定制    
case WM_CTLCOLORSTATIC:
wince 拨号界面自定制        
switch(GetDlgCtrlID((HWND)lParam))
wince 拨号界面自定制wince 拨号界面自定制        
{
wince 拨号界面自定制        
case IDC_GSM:
wince 拨号界面自定制            hd 
= GetDlgItem(hWnd, IDC_BRANDING);
wince 拨号界面自定制            SendMessage(hd,WM_GETTEXT,MAX_PATH,(LPARAM)(LPCTSTR)text);
wince 拨号界面自定制            
//SetBkMode((HDC)wParam, TRANSPARENT);
wince 拨号界面自定制
            SetBkColor((HDC)wParam,RGB(255,0,0));
wince 拨号界面自定制            ExtTextOut((HDC)wParam,
0,0,ETO_OPAQUE,&disRect_In[7],text,wcslen(text),0);
wince 拨号界面自定制            miao 
= TRUE;
wince 拨号界面自定制            
break;
wince 拨号界面自定制        
case IDC_COMIN:
wince 拨号界面自定制            hd 
= GetDlgItem(hWnd, IDC_INCOMINGCALL_TEXT);
wince 拨号界面自定制            
//SetBkMode((HDC)wParam, TRANSPARENT);
wince 拨号界面自定制
            SendMessage(hd,WM_GETTEXT,MAX_PATH,(LPARAM)(LPCTSTR)text);
wince 拨号界面自定制            SetBkColor((HDC)wParam,RGB(
255,0,0));
wince 拨号界面自定制            ExtTextOut((HDC)wParam,
0,0,ETO_OPAQUE,&disRect_In[8],text,wcslen(text),0);
wince 拨号界面自定制            miao 
= TRUE;
wince 拨号界面自定制            
break;
wince 拨号界面自定制        
case IDC_NUM:
wince 拨号界面自定制            hd 
= GetDlgItem(hWnd, IDC_CALERTCONTACT);
wince 拨号界面自定制            SendMessage(hd,WM_GETTEXT,MAX_PATH,(LPARAM)(LPCTSTR)text);
wince 拨号界面自定制            
//SetBkMode((HDC)wParam, TRANSPARENT);
wince 拨号界面自定制
            SetBkColor((HDC)wParam,RGB(255,0,0));
wince 拨号界面自定制            ExtTextOut((HDC)wParam,
0,0,ETO_OPAQUE,&disRect_In[9],text,wcslen(text),0);
wince 拨号界面自定制            miao 
= TRUE;
wince 拨号界面自定制            
break;
wince 拨号界面自定制        }

wince 拨号界面自定制        
break;
wince 拨号界面自定制    }

wince 拨号界面自定制    
return miao;
wince 拨号界面自定制}

wince 拨号界面自定制
wince 拨号界面自定制
void  Draw_In(HWND hWnd)
wince 拨号界面自定制wince 拨号界面自定制
{
wince 拨号界面自定制    HBITMAP hBmpOwn 
= NULL;
wince 拨号界面自定制    HDC   hDC  
= NULL;
wince 拨号界面自定制    HDC   hCompDC 
= NULL;
wince 拨号界面自定制    HDC   hScreenDC 
= NULL;
wince 拨号界面自定制    RECT  distRect_draw;
wince 拨号界面自定制    
//RECT  WndPosRect_draw;
wince 拨号界面自定制
    BOOL  nResult = TRUE;
wince 拨号界面自定制    HWND  hd 
= NULL;
wince 拨号界面自定制
wince 拨号界面自定制    hDC 
= ::GetDC(hWnd);
wince 拨号界面自定制    hCompDC 
= CreateCompatibleDC(hDC);
wince 拨号界面自定制    hScreenDC 
= CreateCompatibleDC(::GetDC(NULL));
wince 拨号界面自定制
wince 拨号界面自定制    distRect_draw 
= WndPosRect_In[10];
wince 拨号界面自定制
wince 拨号界面自定制    SelectObject(hScreenDC, hBmp_In);
wince 拨号界面自定制
wince 拨号界面自定制    hBmpOwn 
= CreateBitmap (distRect_draw.right-distRect_draw.left,
wince 拨号界面自定制                            distRect_draw.bottom
-distRect_draw.top,
wince 拨号界面自定制                            
1,
wince 拨号界面自定制                            
32,
wince 拨号界面自定制                            NULL);    
wince 拨号界面自定制                            
wince 拨号界面自定制    SelectObject(hCompDC,hBmpOwn);
wince 拨号界面自定制
wince 拨号界面自定制    nResult 
= BitBlt(hDC,
wince 拨号界面自定制                     
0,
wince 拨号界面自定制                     
0,
wince 拨号界面自定制                     distRect_draw.right
-distRect_draw.left,
wince 拨号界面自定制                     distRect_draw.bottom
-distRect_draw.top,
wince 拨号界面自定制                     hScreenDC,
wince 拨号界面自定制                     
0,
wince 拨号界面自定制                     
0,
wince 拨号界面自定制                     SRCCOPY);
wince 拨号界面自定制
wince 拨号界面自定制    DeleteDC(hCompDC);
wince 拨号界面自定制    DeleteDC(hScreenDC);
wince 拨号界面自定制}

wince 拨号界面自定制
wince 拨号界面自定制
void  Draw_In_IDC(HWND hWnd,DWORD dnum)
wince 拨号界面自定制wince 拨号界面自定制
{
wince 拨号界面自定制    HBITMAP hBmpOwn 
= NULL;
wince 拨号界面自定制    HDC   hDC  
= NULL;
wince 拨号界面自定制    HDC   hCompDC 
= NULL;
wince 拨号界面自定制    HDC   hScreenDC 
= NULL;
wince 拨号界面自定制    RECT  distRect_draw;
wince 拨号界面自定制    RECT  WndPosRect_draw;
wince 拨号界面自定制    BOOL  nResult 
= TRUE;
wince 拨号界面自定制    HWND  hd 
= NULL;
wince 拨号界面自定制
wince 拨号界面自定制    hDC 
= ::GetDC(hWnd);
wince 拨号界面自定制    hCompDC 
= CreateCompatibleDC(hDC);
wince 拨号界面自定制    hScreenDC 
= CreateCompatibleDC(::GetDC(NULL));
wince 拨号界面自定制
wince 拨号界面自定制    distRect_draw 
= disRect_In[dnum];
wince 拨号界面自定制    distRect_draw.top 
= distRect_draw.top + WndPosRect_In[dnum].top-165;
wince 拨号界面自定制    distRect_draw.bottom 
= distRect_draw.bottom + WndPosRect_In[dnum].top-165;
wince 拨号界面自定制    distRect_draw.left 
= distRect_draw.left + WndPosRect_In[dnum].left;
wince 拨号界面自定制    distRect_draw.right 
= distRect_draw.right + WndPosRect_In[dnum].left;
wince 拨号界面自定制
wince 拨号界面自定制    WndPosRect_draw 
= WndPosRect_In[dnum];
wince 拨号界面自定制    WndPosRect_draw.top 
= WndPosRect_draw.top-165;
wince 拨号界面自定制
wince 拨号界面自定制    SelectObject(hScreenDC, hBmp_In);
wince 拨号界面自定制    hBmpOwn 
= CreateBitmap (distRect_draw.right-distRect_draw.left,
wince 拨号界面自定制                            distRect_draw.bottom
-distRect_draw.top,
wince 拨号界面自定制                            
1,
wince 拨号界面自定制                            
32,
wince 拨号界面自定制                            NULL);            
wince 拨号界面自定制    SelectObject(hCompDC,hBmpOwn);
wince 拨号界面自定制
wince 拨号界面自定制    nResult 
= BitBlt(hDC,
wince 拨号界面自定制                     
0,
wince 拨号界面自定制                     
0,
wince 拨号界面自定制                     distRect_draw.right
-distRect_draw.left,
wince 拨号界面自定制                     distRect_draw.bottom
-distRect_draw.top,
wince 拨号界面自定制                     hScreenDC,
wince 拨号界面自定制                     WndPosRect_draw.left,
wince 拨号界面自定制                     WndPosRect_draw.top,
//-220,
wince 拨号界面自定制
                     SRCCOPY);
wince 拨号界面自定制    DeleteDC(hCompDC);
wince 拨号界面自定制    DeleteDC(hScreenDC);
wince 拨号界面自定制}

wince 拨号界面自定制
wince 拨号界面自定制
void  Draw(HWND hWnd,DWORD dnum,BOOL Mark)
wince 拨号界面自定制wince 拨号界面自定制

wince 拨号界面自定制    HBITMAP hBmpOwn 
= NULL;
wince 拨号界面自定制    HDC   hDC  
= NULL;
wince 拨号界面自定制    HDC   hCompDC 
= NULL;
wince 拨号界面自定制    HDC   hScreenDC 
= NULL;
wince 拨号界面自定制    RECT  distRect_draw;
wince 拨号界面自定制    RECT  WndPosRect_draw;
wince 拨号界面自定制    BOOL  nResult 
= TRUE;
wince 拨号界面自定制    HWND  hd 
= NULL;
wince 拨号界面自定制
wince 拨号界面自定制    hDC 
= ::GetDC(hWnd);
wince 拨号界面自定制    hCompDC 
= CreateCompatibleDC(hDC);
wince 拨号界面自定制    hScreenDC 
= CreateCompatibleDC(::GetDC(NULL));
wince 拨号界面自定制
wince 拨号界面自定制    distRect_draw 
= distRect[dnum];
wince 拨号界面自定制    distRect_draw.top 
= distRect_draw.top + WndPosRect[dnum].top - 26;
wince 拨号界面自定制    distRect_draw.bottom 
= distRect_draw.bottom + WndPosRect[dnum].top - 26;
wince 拨号界面自定制    distRect_draw.left 
= distRect_draw.left + WndPosRect[dnum].left;
wince 拨号界面自定制    distRect_draw.right 
= distRect_draw.right + WndPosRect[dnum].left;
wince 拨号界面自定制
wince 拨号界面自定制    WndPosRect_draw 
= WndPosRect[dnum];
wince 拨号界面自定制    WndPosRect_draw.top 
= WndPosRect_draw.top-26;
wince 拨号界面自定制
wince 拨号界面自定制    
if(Mark)
wince 拨号界面自定制wince 拨号界面自定制    
{
wince 拨号界面自定制        SelectObject(hScreenDC, hBmp);
wince 拨号界面自定制    }

wince 拨号界面自定制    
else
wince 拨号界面自定制wince 拨号界面自定制    
{
wince 拨号界面自定制        SelectObject(hScreenDC, hBmp_Inv);
wince 拨号界面自定制    }

wince 拨号界面自定制    hBmpOwn 
= CreateBitmap (distRect_draw.right-distRect_draw.left,
wince 拨号界面自定制                            distRect_draw.bottom
-distRect_draw.top,
wince 拨号界面自定制                            
1,
wince 拨号界面自定制                            
32,
wince 拨号界面自定制                            NULL);    
wince 拨号界面自定制                            
wince 拨号界面自定制    SelectObject(hCompDC,hBmpOwn);
wince 拨号界面自定制    nResult 
= BitBlt(hDC,
wince 拨号界面自定制                     distRect_draw.left,
wince 拨号界面自定制                     distRect_draw.top,
wince 拨号界面自定制                     distRect_draw.right
-distRect_draw.left,
wince 拨号界面自定制                     distRect_draw.bottom
-distRect_draw.top,
wince 拨号界面自定制                     hScreenDC,
wince 拨号界面自定制                     WndPosRect_draw.left,
wince 拨号界面自定制                     WndPosRect_draw.top,
wince 拨号界面自定制                     SRCCOPY);
wince 拨号界面自定制    DeleteDC(hCompDC);
wince 拨号界面自定制    DeleteDC(hScreenDC);
wince 拨号界面自定制}

wince 拨号界面自定制
wince 拨号界面自定制
void  Draw_Pro(HWND hWnd,DWORD dnum,BOOL Mark)
wince 拨号界面自定制wince 拨号界面自定制

wince 拨号界面自定制    HBITMAP hBmpOwn 
= NULL;
wince 拨号界面自定制    HDC   hDC  
= NULL;
wince 拨号界面自定制    HDC   hCompDC 
= NULL;
wince 拨号界面自定制    HDC   hScreenDC 
= NULL;
wince 拨号界面自定制    RECT  distRect_draw;
wince 拨号界面自定制    RECT  WndPosRect_draw;
wince 拨号界面自定制    BOOL  nResult 
= TRUE;
wince 拨号界面自定制    HWND  hd 
= NULL;
wince 拨号界面自定制
wince 拨号界面自定制    hDC 
= ::GetDC(hWnd);
wince 拨号界面自定制    hCompDC 
= CreateCompatibleDC(hDC);
wince 拨号界面自定制    hScreenDC 
= CreateCompatibleDC(::GetDC(NULL));
wince 拨号界面自定制
wince 拨号界面自定制    distRect_draw 
= disRect_Pro[dnum];
wince 拨号界面自定制    distRect_draw.top 
= distRect_draw.top + WndPosRect_Pro[dnum].top - 26;
wince 拨号界面自定制    distRect_draw.bottom 
= distRect_draw.bottom + WndPosRect_Pro[dnum].top - 26;
wince 拨号界面自定制    distRect_draw.left 
= distRect_draw.left + WndPosRect_Pro[dnum].left;
wince 拨号界面自定制    distRect_draw.right 
= distRect_draw.right + WndPosRect_Pro[dnum].left;
wince 拨号界面自定制
wince 拨号界面自定制    WndPosRect_draw 
= WndPosRect_Pro[dnum];
wince 拨号界面自定制    WndPosRect_draw.top 
= WndPosRect_draw.top-26;
wince 拨号界面自定制    
if(Mark)
wince 拨号界面自定制wince 拨号界面自定制    
{    
wince 拨号界面自定制        SelectObject(hScreenDC, hBmp_Pro);
wince 拨号界面自定制    }

wince 拨号界面自定制    
else
wince 拨号界面自定制wince 拨号界面自定制    
{
wince 拨号界面自定制        SelectObject(hScreenDC, hBmp_Inv_Pro);
wince 拨号界面自定制    }

wince 拨号界面自定制    
wince 拨号界面自定制    hBmpOwn 
= CreateBitmap (distRect_draw.right-distRect_draw.left,
wince 拨号界面自定制                            distRect_draw.bottom
-distRect_draw.top,
wince 拨号界面自定制                            
1,
wince 拨号界面自定制                            
32,
wince 拨号界面自定制                            NULL);    
wince 拨号界面自定制                            
wince 拨号界面自定制    SelectObject(hCompDC,hBmpOwn);
wince 拨号界面自定制
wince 拨号界面自定制    nResult 
= BitBlt(hDC,
wince 拨号界面自定制                     distRect_draw.left,
wince 拨号界面自定制                     distRect_draw.top,
wince 拨号界面自定制                     distRect_draw.right
-distRect_draw.left,
wince 拨号界面自定制                     distRect_draw.bottom
-distRect_draw.top,
wince 拨号界面自定制                     hScreenDC,
wince 拨号界面自定制                     WndPosRect_draw.left,
wince 拨号界面自定制                     WndPosRect_draw.top,
wince 拨号界面自定制                     SRCCOPY);
wince 拨号界面自定制    DeleteDC(hCompDC);
wince 拨号界面自定制    DeleteDC(hScreenDC);
wince 拨号界面自定制}

wince 拨号界面自定制
wince 拨号界面自定制
wince 拨号界面自定制
// 替换通话的界面(TRUE是亮的,FALSE是暗的)
wince 拨号界面自定制
void  Draw_Talk(HWND hWnd,BOOL Mark)
wince 拨号界面自定制wince 拨号界面自定制
{
wince 拨号界面自定制    HBITMAP hButton 
= NULL;
wince 拨号界面自定制
wince 拨号界面自定制    RECT distRect_button 
= distRect[BUTTON_TALKEND];
wince 拨号界面自定制    RECT WndPosRec_button 
= WndPosRect[BUTTON_TALKEND];
wince 拨号界面自定制
wince 拨号界面自定制    
if(Mark)
wince 拨号界面自定制wince 拨号界面自定制    
{
wince 拨号界面自定制        hButton 
= hBmp_Talk;
wince 拨号界面自定制    }

wince 拨号界面自定制    
else
wince 拨号界面自定制wince 拨号界面自定制    
{
wince 拨号界面自定制        hButton 
= hBmp_Inv_Talk;
wince 拨号界面自定制    }

wince 拨号界面自定制    Draw_Button(hWnd,distRect_button,WndPosRec_button,hButton);
wince 拨号界面自定制}

wince 拨号界面自定制
wince 拨号界面自定制
wince 拨号界面自定制
// 替换通话的界面(TRUE是亮的,FALSE是暗的)
wince 拨号界面自定制
void  Draw_Pro_Talk(HWND hWnd,BOOL Mark)
wince 拨号界面自定制wince 拨号界面自定制
{
wince 拨号界面自定制    HBITMAP hButton 
= NULL;
wince 拨号界面自定制
wince 拨号界面自定制    RECT distRect_button 
= disRect_Pro[BUTTON_TALKEND_PRO];
wince 拨号界面自定制    RECT WndPosRec_button 
= WndPosRect_Pro[BUTTON_TALKEND_PRO];
wince 拨号界面自定制
wince 拨号界面自定制    
if(Mark)
wince 拨号界面自定制wince 拨号界面自定制    
{
wince 拨号界面自定制        hButton 
= hBmp_Pro_Talk;
wince 拨号界面自定制    }

wince 拨号界面自定制    
else
wince 拨号界面自定制wince 拨号界面自定制    
{
wince 拨号界面自定制        hButton 
= hBmp_Inv_Pro_Talk;
wince 拨号界面自定制    }

wince 拨号界面自定制    Draw_Button(hWnd,distRect_button,WndPosRec_button,hButton);
wince 拨号界面自定制}

wince 拨号界面自定制
wince 拨号界面自定制
void  Draw_Pro_Mute(HWND hWnd, DWORD Mark)
wince 拨号界面自定制wince 拨号界面自定制
{
wince 拨号界面自定制    HBITMAP hButton 
= NULL;
wince 拨号界面自定制
wince 拨号界面自定制    RECT distRect_button 
= disRect_Pro[BUTTON_MUTE_PRO];
wince 拨号界面自定制    RECT WndPosRec_button 
= WndPosRect_Pro[BUTTON_MUTE_PRO];
wince 拨号界面自定制
wince 拨号界面自定制    
if(Mark == 1)
wince 拨号界面自定制wince 拨号界面自定制    
{
wince 拨号界面自定制        hButton 
= hBmp_Pro_Mute;
wince 拨号界面自定制    }

wince 拨号界面自定制    
else if(Mark == 2)
wince 拨号界面自定制wince 拨号界面自定制    
{
wince 拨号界面自定制        hButton 
= hBmp_Inv_Pro_Mute;
wince 拨号界面自定制    }

wince 拨号界面自定制    
else
wince 拨号界面自定制wince 拨号界面自定制    
{
wince 拨号界面自定制        hButton 
= hBmp_Un_Pro_Mute;
wince 拨号界面自定制    }

wince 拨号界面自定制    Draw_Button(hWnd,distRect_button,WndPosRec_button,hButton);
wince 拨号界面自定制}

wince 拨号界面自定制
wince 拨号界面自定制
// 扬声器按钮
wince 拨号界面自定制
void  Draw_Pro_SP(HWND hWnd, DWORD Mark)
wince 拨号界面自定制wince 拨号界面自定制
{
wince 拨号界面自定制    HBITMAP hButton 
= NULL;
wince 拨号界面自定制
wince 拨号界面自定制    RECT distRect_button 
= disRect_Pro[BUTTON_SPEAKER_PRO];
wince 拨号界面自定制    RECT WndPosRec_button 
= WndPosRect_Pro[BUTTON_SPEAKER_PRO];
wince 拨号界面自定制
wince 拨号界面自定制    
if(Mark == 1)
wince 拨号界面自定制wince 拨号界面自定制    
{
wince 拨号界面自定制        hButton 
= hBmp_Pro_SP;
wince 拨号界面自定制    }

wince 拨号界面自定制    
else if(Mark == 2)
wince 拨号界面自定制wince 拨号界面自定制    
{
wince 拨号界面自定制        hButton 
= hBmp_Inv_Pro_SP;
wince 拨号界面自定制    }

wince 拨号界面自定制    
else if(Mark == 3)
wince 拨号界面自定制wince 拨号界面自定制    
{
wince 拨号界面自定制        hButton 
= hBmp_Pro_His;
wince 拨号界面自定制    }

wince 拨号界面自定制    
else
wince 拨号界面自定制wince 拨号界面自定制    
{
wince 拨号界面自定制        hButton 
= hBmp_Inv_Pro_His;
wince 拨号界面自定制    }

wince 拨号界面自定制    Draw_Button(hWnd,distRect_button,WndPosRec_button,hButton);
wince 拨号界面自定制}

wince 拨号界面自定制 
wince 拨号界面自定制
void  Draw_Pro_Held(HWND hWnd, DWORD Mark)
wince 拨号界面自定制wince 拨号界面自定制
{
wince 拨号界面自定制    HBITMAP hButton;
wince 拨号界面自定制    RECT distRect_button 
= disRect_Pro[BUTTON_HOLDSWAP_PRO];
wince 拨号界面自定制    RECT WndPosRec_button 
= WndPosRect_Pro[BUTTON_HOLDSWAP_PRO];
wince 拨号界面自定制
wince 拨号界面自定制    
if(Mark == 1)
wince 拨号界面自定制wince 拨号界面自定制    
{
wince 拨号界面自定制        hButton 
= hBmp_Pro_Held;
wince 拨号界面自定制    }

wince 拨号界面自定制    
else if(Mark == 2)
wince 拨号界面自定制wince 拨号界面自定制    
{
wince 拨号界面自定制        hButton 
= hBmp_Inv_Pro_Held;
wince 拨号界面自定制    }

wince 拨号界面自定制    
else if(Mark == 3)
wince 拨号界面自定制wince 拨号界面自定制    
{
wince 拨号界面自定制        hButton 
= hBmp_Pro_Swap;
wince 拨号界面自定制    }

wince 拨号界面自定制    
else if(Mark == 4)
wince 拨号界面自定制wince 拨号界面自定制    
{
wince 拨号界面自定制        hButton 
= hBmp_Inv_Pro_Swap;
wince 拨号界面自定制    }

wince 拨号界面自定制    
else
wince 拨号界面自定制wince 拨号界面自定制    
{
wince 拨号界面自定制        hButton 
= hBmp_Un_Pro_Held;
wince 拨号界面自定制    }

wince 拨号界面自定制
wince 拨号界面自定制    Draw_Button(hWnd,distRect_button,WndPosRec_button,hButton);
wince 拨号界面自定制}

wince 拨号界面自定制
wince 拨号界面自定制
void  Draw_Button(HWND hWnd, RECT distRect_button, RECT WndPosRec_button, HBITMAP hButton)
wince 拨号界面自定制wince 拨号界面自定制
{
wince 拨号界面自定制    HBITMAP hBmpOwn 
= NULL;
wince 拨号界面自定制    HDC   hDC  
= NULL;
wince 拨号界面自定制    HDC   hCompDC 
= NULL;
wince 拨号界面自定制    HDC   hScreenDC 
= NULL;
wince 拨号界面自定制    BOOL  nResult 
= TRUE;
wince 拨号界面自定制    HWND  hd 
= NULL;
wince 拨号界面自定制
wince 拨号界面自定制    hDC 
= ::GetDC(hWnd);
wince 拨号界面自定制    hCompDC 
= CreateCompatibleDC(hDC);
wince 拨号界面自定制    hScreenDC 
= CreateCompatibleDC(::GetDC(NULL));
wince 拨号界面自定制
wince 拨号界面自定制    SelectObject(hScreenDC, hButton);
wince 拨号界面自定制
wince 拨号界面自定制    hBmpOwn 
= CreateBitmap (distRect_button.right-distRect_button.left,
wince 拨号界面自定制                            distRect_button.bottom
-distRect_button.top,
wince 拨号界面自定制                            
1,
wince 拨号界面自定制                            
32,
wince 拨号界面自定制                            NULL);    
wince 拨号界面自定制                            
wince 拨号界面自定制    SelectObject(hCompDC,hBmpOwn);
wince 拨号界面自定制    distRect_button.top 
= distRect_button.top + WndPosRec_button.top - 26;
wince 拨号界面自定制    distRect_button.bottom 
= distRect_button.bottom + WndPosRec_button.top - 26;
wince 拨号界面自定制    distRect_button.left 
= distRect_button.left + WndPosRec_button.left;
wince 拨号界面自定制    distRect_button.right 
= distRect_button.right + WndPosRec_button.left;
wince 拨号界面自定制
wince 拨号界面自定制    nResult 
= BitBlt(hDC,
wince 拨号界面自定制                     distRect_button.left,
wince 拨号界面自定制                     distRect_button.top,
wince 拨号界面自定制                     distRect_button.right
-distRect_button.left,
wince 拨号界面自定制                     distRect_button.bottom
-distRect_button.top,
wince 拨号界面自定制                     hScreenDC,
wince 拨号界面自定制                     
0,
wince 拨号界面自定制                     
0,
wince 拨号界面自定制                     SRCCOPY);
wince 拨号界面自定制    DeleteDC(hCompDC);
wince 拨号界面自定制    DeleteDC(hScreenDC);
wince 拨号界面自定制}

wince 拨号界面自定制
wince 拨号界面自定制
wince 拨号界面自定制BOOL setRegSPEAKER(DWORD Speaker)
//
wince 拨号界面自定制wince 拨号界面自定制
{
wince 拨号界面自定制    LONG lRet 
= 0;
wince 拨号界面自定制    HKEY hkey 
= NULL;
wince 拨号界面自定制    LPDWORD lpDword 
= NULL;
wince 拨号界面自定制    LPWSTR lpszSubKey 
= REG_SPEAKER;
wince 拨号界面自定制    DWORD tValue 
= Speaker;
wince 拨号界面自定制    lRet 
= RegOpenKeyEx(HKEY_LOCAL_MACHINE,REG_SPEAKER,0,0,&hkey);
wince 拨号界面自定制wince 拨号界面自定制    
if(lRet != ERROR_SUCCESS)     {
wince 拨号界面自定制        lRet 
= RegCreateKeyEx(HKEY_LOCAL_MACHINE,lpszSubKey,0,lpszSubKey,REG_OPTION_NON_VOLATILE,0,NULL,&hkey,lpDword);
wince 拨号界面自定制        
if(lRet != ERROR_SUCCESS)
wince 拨号界面自定制wince 拨号界面自定制        
{
wince 拨号界面自定制            MessageBox(NULL,_T(
"Error"),_T("注册表不可写!"),MB_OK);
wince 拨号界面自定制            
return FALSE;
wince 拨号界面自定制        }

wince 拨号界面自定制    }

wince 拨号界面自定制    lRet 
= RegSetValueEx(hkey,lpszSubKey,0,REG_DWORD,(LPBYTE)(&tValue),sizeof(DWORD));
wince 拨号界面自定制    
if(lRet != ERROR_SUCCESS)
wince 拨号界面自定制wince 拨号界面自定制    
{
wince 拨号界面自定制        RegCloseKey(hkey);
wince 拨号界面自定制        MessageBox(NULL,_T(
"Error"),_T("注册表不可写!"),MB_OK);
wince 拨号界面自定制        
return FALSE;
wince 拨号界面自定制    }

wince 拨号界面自定制    RegCloseKey(hkey);
wince 拨号界面自定制    
return TRUE;
wince 拨号界面自定制}

wince 拨号界面自定制BOOL getRegSPEAKER(DWORD 
* Speaker)
wince 拨号界面自定制wince 拨号界面自定制
{
wince 拨号界面自定制    LONG lRet 
= 0;
wince 拨号界面自定制    HKEY hkey 
= NULL;
wince 拨号界面自定制    DWORD dwType 
= 0;
wince 拨号界面自定制    DWORD tValue 
= 0;
wince 拨号界面自定制    DWORD cbData 
= sizeof(DWORD);
wince 拨号界面自定制    DWORD temp 
= 1;
wince 拨号界面自定制    
wince 拨号界面自定制    
//取模式,动作
wince 拨号界面自定制
    lRet = RegOpenKeyEx(HKEY_LOCAL_MACHINE,REG_SPEAKER,0,0,&hkey);
wince 拨号界面自定制    
if(lRet != ERROR_SUCCESS)
wince 拨号界面自定制wince 拨号界面自定制    
{
wince 拨号界面自定制        temp 
= 1;
wince 拨号界面自定制        
*Speaker = temp;
wince 拨号界面自定制        
return TRUE;
wince 拨号界面自定制    }

wince 拨号界面自定制    lRet 
= RegQueryValueEx(hkey,REG_SPEAKER,NULL,&dwType,(LPBYTE)(&tValue),&cbData);
wince 拨号界面自定制    
if(lRet == ERROR_SUCCESS)
wince 拨号界面自定制wince 拨号界面自定制    
{
wince 拨号界面自定制        
*Speaker = tValue;
wince 拨号界面自定制        RegCloseKey(hkey);
wince 拨号界面自定制        
return TRUE;
wince 拨号界面自定制    }

wince 拨号界面自定制    
else
wince 拨号界面自定制wince 拨号界面自定制    
{
wince 拨号界面自定制        RegCloseKey(hkey);
wince 拨号界面自定制        
return FALSE;
wince 拨号界面自定制    }

wince 拨号界面自定制}

wince 拨号界面自定制
wince 拨号界面自定制extern   " C "  HRESULT PHExtGetPhoneViewInfo(PH_VIEW view, HINSTANCE *  phInstance, PH_VIEWINFOFLAGS *  pvif, LPPHONEVIEWHOOKPROC *   plpfnHook, LPCTSTR *  plpTemplateName)
wince 拨号界面自定制wince 拨号界面自定制
{
wince 拨号界面自定制    HRESULT hr 
= E_NOTIMPL;
wince 拨号界面自定制    
//win = 0;
wince 拨号界面自定制
    if(PH_VIEW_DIALER == view)
wince 拨号界面自定制wince 拨号界面自定制    
{
wince 拨号界面自定制        
switch(*pvif)
wince 拨号界面自定制wince 拨号界面自定制        
{
wince 拨号界面自定制            
case PH_VIF_PORTRAIT:
wince 拨号界面自定制                
// Specify a dialer portrait view dialog template
wince 拨号界面自定制
                *phInstance = g_hInst;
wince 拨号界面自定制                
//enable PHExtplpfnHook
wince 拨号界面自定制
                *pvif = (PH_VIEWINFOFLAGS) (*pvif | PH_VIF_ENABLEHOOK);
wince 拨号界面自定制                
*plpTemplateName = MAKEINTRESOURCE(IDD_CDIALER_PORT);
wince 拨号界面自定制                
*plpfnHook = (LPPHONEVIEWHOOKPROC)PHExtplpfnHook;
wince 拨号界面自定制                LoadImage(
&hBmp,L"/Windows/PcvDialerBkP_Inv.bmp");
wince 拨号界面自定制                LoadImage(
&hBmp_Inv,L"/Windows/PcvDialerBkP.bmp");
wince 拨号界面自定制                LoadImage(
&hBmp_Talk,L"/Windows/PcvDialerEndL.bmp");
wince 拨号界面自定制                LoadImage(
&hBmp_Inv_Talk,L"/Windows/PcvDialerEndL_At.bmp");
wince 拨号界面自定制                hr 
= S_OK;
wince 拨号界面自定制                
break;
wince 拨号界面自定制        }

wince 拨号界面自定制    }

wince 拨号界面自定制    
if(PH_VIEW_PROGRESS == view)
wince 拨号界面自定制wince 拨号界面自定制    
{
wince 拨号界面自定制        
switch(*pvif)
wince 拨号界面自定制wince 拨号界面自定制        
{
wince 拨号界面自定制            
case PH_VIF_PORTRAIT:
wince 拨号界面自定制                
// Specify a dialer portrait view dialog template
wince 拨号界面自定制
                *phInstance = g_hInst;
wince 拨号界面自定制                
//enable PHExtplpfnHook
wince 拨号界面自定制
                *pvif = (PH_VIEWINFOFLAGS) (*pvif | PH_VIF_ENABLEHOOK);
wince 拨号界面自定制                
*plpTemplateName = MAKEINTRESOURCE(IDD_CPROG_PORT);
wince 拨号界面自定制                
*plpfnHook = (LPPHONEVIEWHOOKPROC)PHExtplpfnHookPro;
wince 拨号界面自定制                LoadImage(
&hBmp_Pro,L"/Windows/PcvProgBkP.bmp");
wince 拨号界面自定制                LoadImage(
&hBmp_Inv_Pro,L"/Windows/PcvProgBkP_Inv.bmp");
wince 拨号界面自定制                
wince 拨号界面自定制                LoadImage(
&hBmp_Pro_Talk,L"/Windows/PcvProgTalk.bmp");
wince 拨号界面自定制                LoadImage(
&hBmp_Inv_Pro_Talk,L"/Windows/PcvProgTalk_At.bmp");
wince 拨号界面自定制
wince 拨号界面自定制                LoadImage(
&hBmp_Pro_Mute,L"/Windows/PcvProgUnmute.bmp");
wince 拨号界面自定制                LoadImage(
&hBmp_Inv_Pro_Mute,L"/Windows/PcvProgUnmute_At.bmp");
wince 拨号界面自定制                LoadImage(
&hBmp_Un_Pro_Mute,L"/Windows/VbBtnUp_Port.bmp");
wince 拨号界面自定制
wince 拨号界面自定制                LoadImage(
&hBmp_Pro_SP,L"/Windows/PcvProgSpeakeroff.bmp");
wince 拨号界面自定制                LoadImage(
&hBmp_Inv_Pro_SP,L"/Windows/PcvProgSpeakeroff_At.bmp");
wince 拨号界面自定制                LoadImage(
&hBmp_Pro_His,L"/Windows/PcvProgCallhistory.bmp");
wince 拨号界面自定制                LoadImage(
&hBmp_Inv_Pro_His,L"/Windows/PcvProgCallhistory_At.bmp");
wince 拨号界面自定制
wince 拨号界面自定制                LoadImage(
&hBmp_Pro_Held,L"/Windows/PcvProgUnhold.bmp");
wince 拨号界面自定制                LoadImage(
&hBmp_Inv_Pro_Held,L"/Windows/PcvProgUnhold_At.bmp");
wince 拨号界面自定制                LoadImage(
&hBmp_Pro_Swap,L"/Windows/PcvProgSwap.bmp");
wince 拨号界面自定制                LoadImage(
&hBmp_Inv_Pro_Swap,L"/Windows/PcvProgSwap_At.bmp");
wince 拨号界面自定制                LoadImage(
&hBmp_Un_Pro_Held,L"/Windows/VbBtnUp_Port_Held.bmp");
wince 拨号界面自定制
wince 拨号界面自定制
wince 拨号界面自定制                hr 
= S_OK;
wince 拨号界面自定制                
break;
wince 拨号界面自定制        }

wince 拨号界面自定制    }

wince 拨号界面自定制    
//只有整个背景换掉了,还有控件的背景没有换掉,所以没有用
wince 拨号界面自定制
    if(PH_VIEW_INCOMING == view)
wince 拨号界面自定制wince 拨号界面自定制    
{
wince 拨号界面自定制wince 拨号界面自定制        
/*
wince 拨号界面自定制        switch(*pvif)
wince 拨号界面自定制        {
wince 拨号界面自定制            case PH_VIF_PORTRAIT:
wince 拨号界面自定制                *phInstance = g_hInst;
wince 拨号界面自定制                //enable PHExtplpfnHook
wince 拨号界面自定制                *pvif = (PH_VIEWINFOFLAGS) (*pvif | PH_VIF_ENABLEHOOK);
wince 拨号界面自定制                *plpTemplateName = MAKEINTRESOURCE(IDD_CALERT);
wince 拨号界面自定制                *plpfnHook = (LPPHONEVIEWHOOKPROC)PHExtplpfnHookIn;
wince 拨号界面自定制                LoadImage(&hBmp_In,L"/Windows/PcvIn.bmp");//亮的
wince 拨号界面自定制                hr = S_OK;
wince 拨号界面自定制                break;
wince 拨号界面自定制        }
wince 拨号界面自定制        
*/

wince 拨号界面自定制    }

wince 拨号界面自定制    
return hr;
wince 拨号界面自定制}

wince 拨号界面自定制
wince 拨号界面自定制
wince 拨号界面自定制
wince 拨号界面自定制
wince 拨号界面自定制

实在太长了,一次贴不完

可以实现每个按钮的图片大小,位置自定义,背景也可以自定义,支持横屏

改天发对应的inf和图片定义,source和makefile

发表于 @ 2006年12月06日 19:15:00 | 评论( 8 ) | 编辑| 举报| 收藏

旧一篇:wince 通话记录的自动删除实现 | 新一篇:wince 来电防火墙静音实现的几种办法

moonsunearth 发表于2007年12月17日 19:53:37   IP: 举报 回复
wince 拨号界面自定制
你好,能把对应的inf和图片定义,source和makefile发给我看看吗,谢谢!我的邮件moon197907@hotmail.com
zzq_gates 发表于2008年5月13日 11:20:07   IP: 举报 回复
wince 拨号界面自定制
能否给我一份,我在做拦截来电需要参考下,你也是做防火墙的吧,我们交流一下,我的邮箱,zzq_168_168@163.com
Topfortune 发表于2009年8月17日 11:05:48   IP: 举报 回复
wince 拨号界面自定制
您好!能否也给我一份。我目前也在做类似的功能。谢谢!我的邮箱: wojunjun@gmail.com
beautymind2008 发表于2009年8月17日 17:33:11   IP: 举报 回复
wince 拨号界面自定制
LZ也给我一份吧 谢谢 love_lah@163.com
yul_20001 发表于2009年8月25日 14:44:09   IP: 举报 回复
wince 拨号界面自定制
您好!能否也给我一份。我目前正开发一个双卡双待的项目,遇到一些问题,希望参考一下。谢谢!我的邮箱: yul_20001@sina.com
cqjkwqj 发表于2009年12月17日 23:39:19   IP: 举报 回复
wince 拨号界面自定制
您好!找不到相应的头文件,能否帮忙把所需要的这些相对应的头文件及库文件发给我一下吗?谢谢cq110@cqwztech.com
stanleylou 发表于2009年12月24日 09:36:19   IP: 举报 回复
wince 拨号界面自定制
windows mobile 6 下如果要定制自己的拨号界面,该怎么办?上述方法可以套用么? 如果可以的话,能否给发一份头文件和库。 非常感谢
匿名用户 发表于2010年3月16日 16:58:34   IP: 举报 回复
wince 拨号界面自定制
同求代码一份,谢谢 wince 拨号界面自定制yuanfen668888@163.com