刚做完,把这些东西记录一下,以后方便找,免得每次都上网搜
1、对话框右上角的图标,x或者ok。好像变换图标不改变响应函数。当时把默认的ok改成x后响应OnCancel无效
2、m5做菜单要写.rc2,m6不用了,直接创建
3、自绘按钮
打开Own|Draw属性,添加变量,CBitmapButton.LoadBitmaps( IDB_BITMAP10, IDB_BITMAP11, NULL, NULL ),不过点击图片没反应,以后再改
4、联系人
5、软键盘
6、横竖屏
uFlags:
before:250
behind:12290
1、对话框右上角的图标,x或者ok。好像变换图标不改变响应函数。当时把默认的ok改成x后响应OnCancel无效
SHINITDLGINFO dlginfo
=
{0}
;
dlginfo.dwMask = SHIDIM_FLAGS;
dlginfo.hDlg = m_hWnd;
dlginfo.dwFlags = SHIDIF_CANCELBUTTON;
::SHInitDialog( & dlginfo );
dlginfo.dwMask = SHIDIM_FLAGS;
dlginfo.hDlg = m_hWnd;
dlginfo.dwFlags = SHIDIF_CANCELBUTTON;
::SHInitDialog( & dlginfo );
2、m5做菜单要写.rc2,m6不用了,直接创建
SHMENUBARINFO mbi;
mbi.cbSize = sizeof (mbi);
mbi.hwndParent = m_hWnd;
mbi.dwFlags = SHCMBF_HMENU;
mbi.nToolBarId = IDR_MENUBAR;
mbi.hInstRes = ::AfxGetInstanceHandle();
mbi.nBmpId = 0 ;
mbi.cBmpImages = 0 ;
::SHCreateMenuBar( & mbi);
mbi.cbSize = sizeof (mbi);
mbi.hwndParent = m_hWnd;
mbi.dwFlags = SHCMBF_HMENU;
mbi.nToolBarId = IDR_MENUBAR;
mbi.hInstRes = ::AfxGetInstanceHandle();
mbi.nBmpId = 0 ;
mbi.cBmpImages = 0 ;
::SHCreateMenuBar( & mbi);
3、自绘按钮
打开Own|Draw属性,添加变量,CBitmapButton.LoadBitmaps( IDB_BITMAP10, IDB_BITMAP11, NULL, NULL ),不过点击图片没反应,以后再改
4、联系人
HRESULT hr
=
E_FAIL;
const CEPROPID c_propidAllEmail = PIMPR_ALL_PHONE_AND_SIM; // sim卡的联系人
CHOOSECONTACT cc = {0} ; // 清空
cc.cbSize = sizeof (cc);
cc.dwFlags = CCF_RETURNCONTACTNAME | CCF_RETURNPROPERTYVALUE | CCF_HIDENEW; // CCF_CHOOSECONTACTONLY;
cc.rgpropidRequiredProperties = & c_propidAllEmail;
// Number of properties specified in the c_propidAllEmail array.
cc.cRequiredProperties = 1 ;
cc.hwndOwner = NULL;
// Display the Contact Chooser control and prompt the user to choose a contact.
hr = ChooseContact( & cc);
const CEPROPID c_propidAllEmail = PIMPR_ALL_PHONE_AND_SIM; // sim卡的联系人
CHOOSECONTACT cc = {0} ; // 清空
cc.cbSize = sizeof (cc);
cc.dwFlags = CCF_RETURNCONTACTNAME | CCF_RETURNPROPERTYVALUE | CCF_HIDENEW; // CCF_CHOOSECONTACTONLY;
cc.rgpropidRequiredProperties = & c_propidAllEmail;
// Number of properties specified in the c_propidAllEmail array.
cc.cRequiredProperties = 1 ;
cc.hwndOwner = NULL;
// Display the Contact Chooser control and prompt the user to choose a contact.
hr = ChooseContact( & cc);
5、软键盘
SHSipPreference(
this
->
m_hWnd, SIP_DOWN );
SHSipPreference( this -> m_hWnd, SIP_UP );
SHSipPreference( this -> m_hWnd, SIP_UP );
void
Csos2005uiDlg::OnSettingChange(UINT uFlags, LPCTSTR lpszSection)
{
CDialog::OnSettingChange(uFlags, lpszSection);
// TODO: Add your message handler code here
//sip status
if ( uFlags == SPI_SETSIPINFO ) //224
{
......
}
}
{
CDialog::OnSettingChange(uFlags, lpszSection);
// TODO: Add your message handler code here
//sip status
if ( uFlags == SPI_SETSIPINFO ) //224
{
......
}
}
6、横竖屏
uFlags:
before:250
behind:12290