INPUTBAR.CPP
上传用户:zhang8947
上传日期:2007-01-08
资源大小:1910k
文件大小:21k
- // InputBar.cpp : implementation file
- //
- #include "stdafx.h"
- #include "resource.h"
- #include "cspublic.h"
- #include "cskernel.h"
- #include "basicwin.h"
- #include "inputbar.h"
- #include "iniinput.h"
- #include "csinput.h"
- extern CInputInit OInputInit ; //输入菜单初始化对象
- extern HINSTANCE hInstance ;
- #ifdef _DEBUG
- #undef THIS_FILE
- static char BASED_CODE THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CInputBar
- //初始化输入板
- void CInputBar::InitInputBar( void )
- {
- //宽度与高度
- m_nMainWidth =300 ;
- m_nMainHeight =38 ;
- //设置输入窗口的初始位置
- m_OLeftTopPos.x =GetPrivateProfileInt( "输入板参数" ,
- "左上角x值" , 300 , INI_FILE_NAME ) ;
- if( m_OLeftTopPos.x<0 ||
- m_OLeftTopPos.x>GetSystemMetrics(SM_CXSCREEN)-m_nMainWidth )
- m_OLeftTopPos.x =300 ;
- m_OLeftTopPos.y =GetPrivateProfileInt( "输入板参数" ,
- "左上角y值" , 400 , INI_FILE_NAME ) ;
- if( m_OLeftTopPos.y<0 ||
- m_OLeftTopPos.y>GetSystemMetrics(SM_CYSCREEN)-m_nMainHeight )
- m_OLeftTopPos.x =400 ;
-
- m_bIsDown =0 ; //初始表示鼠标没有按下
- m_nScrollButtonStatus =4 ; //初始没有翻页按钮
-
- //初始化按钮子窗口
- m_nButtonNum =MAX_BUTTON ; //按钮数
- CPoint tempPoint( 225 , 4 ) ;
- //功能菜单
- tempPoint.x =m_nMainWidth-4-4*(12-2)/2 ;
- m_OButton[3] =CInButton( tempPoint ,
- "设置" , IDR_MENU2 ) ;
- m_OButton[3].SetHint( "设置输入法" ,
- "砞竚块