本文整理汇总了C++中ModifyStyleEx函数的典型用法代码示例。如果您正苦于以下问题:C++ ModifyStyleEx函数的具体用法?C++ ModifyStyleEx怎么用?C++ ModifyStyleEx使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ModifyStyleEx函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ModifyStyleEx
BOOL CCSHPropertySheet::OnInitDialog()
{
CPropertySheet::OnInitDialog();
if(0==HelpID(IDOK)){
// Dynamically add/remove the question mark button to the title bar of the dialog box:
ModifyStyleEx(WS_EX_CONTEXTHELP,0,0);
} else {
ModifyStyleEx(0,WS_EX_CONTEXTHELP,0);
}
if(CSHFile().IsEmpty()){
// All of the following mess happens because Microsoft decided to show a help button by
// default to every Property sheet constructed by Visual C++ 6.In the following lines,
// I hide the help button and move the other three buttons to where they should be.
CWnd *pwndHelpButton=GetDlgItem(IDHELP);
if(pwndHelpButton){
static const int _afxPropSheetButtons[] = { IDOK, IDCANCEL, ID_APPLY_NOW, IDHELP };
for (int i = 0; i < sizeof _afxPropSheetButtons/sizeof _afxPropSheetButtons[0] - 1; i++){
// Shunt button
CRect rect;
GetDlgItem(_afxPropSheetButtons[i+1])->GetWindowRect(&rect);
ScreenToClient(&rect);
GetDlgItem(_afxPropSheetButtons[i])->MoveWindow(&rect);
}
pwndHelpButton->DestroyWindow();
}
}
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
示例2: ModifyStyleEx
CLabel& CLabel::SetSunken(BOOL bSet)
{
if (!bSet)
ModifyStyleEx(WS_EX_STATICEDGE,0,SWP_DRAWFRAME);
else
ModifyStyleEx(0,WS_EX_STATICEDGE,SWP_DRAWFRAME);
return *this;
}
示例3: ModifyStyleEx
void CButtonCx::SetDrawFrame(BOOL bDrawFrame)
{
if (bDrawFrame)
{
// スタティックエッジを有効
ModifyStyleEx(0, WS_EX_STATICEDGE, SWP_DRAWFRAME);
}
else
{
// スタティックエッジを無効
ModifyStyleEx(WS_EX_STATICEDGE, 0, SWP_DRAWFRAME);
}
}
示例4: ModifyStyleEx
BOOL CXColorStatic::SetPlainBorder(BOOL bSet)
{
if (bSet)
{
// This odd line is to force the NC area to be invalidated
ModifyStyleEx(0, WS_EX_STATICEDGE | WS_EX_CLIENTEDGE | WS_EX_WINDOWEDGE, 0);
ModifyStyle(0, WS_BORDER, 0);
ModifyStyleEx(WS_EX_STATICEDGE | WS_EX_CLIENTEDGE | WS_EX_WINDOWEDGE, 0, SWP_FRAMECHANGED);
}
else
ModifyStyle(WS_BORDER|WS_TABSTOP, 0, SWP_FRAMECHANGED);
RedrawWindow();
return TRUE;
}
示例5: ModifyStyleEx
BOOL CGCColorStatic::SetModalFrame(const BOOL bModal)
{
BOOL Result = FALSE;
if (bModal)
{
if (m_bColorFrameFlag) SetColorFrame(FALSE); // Color frame and modal frame mutually exclusive.
Result = ModifyStyleEx(0,WS_EX_DLGMODALFRAME,SWP_DRAWFRAME);
}
else
Result = ModifyStyleEx(WS_EX_DLGMODALFRAME,0,SWP_DRAWFRAME);
return Result;
}
示例6: ShowWindow
// http://www.codeguru.com/Cpp/frameworks/advancedui/article.php/c3227/
BOOL CMainFrame::ShowTaskBarButton(BOOL bVisible)
{
if (!m_bOwnerCreated) return FALSE;
ShowWindow(SW_HIDE);
if (bVisible)
ModifyStyleEx(0, WS_EX_APPWINDOW);
else
ModifyStyleEx(WS_EX_APPWINDOW, 0);
ShowWindow(SW_SHOW);
return TRUE;
}
示例7: ASSERT
BOOL CSplashDlg::Create( CWnd* pParentWnd, int nShowTime, LPCTSTR lpszUser,
LPCTSTR lpszRegCode, LPCTSTR lpszVersionString,
BOOL bAutoDelete, int nMin, int nMax )
{
if( ! CXFResDialog::Create( CSplashDlg::IDD, pParentWnd) )
{
ASSERT( FALSE );
return FALSE;
}
ModifyStyleEx( 0, WS_EX_TOOLWINDOW );
//ModifyStyleEx( 0, WS_EX_TRANSPARENT );
if( nShowTime > 0 )
SetTimer( 1, nShowTime, NULL );
CString strVersion = lpszVersionString;
if( strVersion.GetLength() > 0 )
m_staticVersion.SetWindowText( strVersion );
CString strUser;
if( NULL != lpszUser ) strUser = lpszUser;
if( strUser.IsEmpty() ) strUser = AfxModuleLoadString( IDS_XFAUTHORIZEDUSER_UNKNOWN );
m_staticUser.SetWindowText( strUser );
CString strRegCode;
if( NULL != lpszRegCode ) strRegCode = lpszRegCode;
if( strRegCode.IsEmpty() ) strRegCode = AfxModuleLoadString( IDS_XFREGCODE_UNPURCHASED );
m_staticRegCode.SetWindowText( strRegCode );
m_bAutoDelete = bAutoDelete;
SetProgressRange( nMin, nMax );
return TRUE;
}
示例8: SetAutoDelete
BOOL CxResLibImgList::OnInit( void )
{
//
SetAutoDelete(TRUE);
//图片模式
if ( !SetImageMode() ) return FALSE;
//背景色
// m_crCanvasBk = Color::LightGreen;
//图片尺寸、间距、透明色
InitImageLayout(90, 100, 1, 1, 42, 42);
SetFont(NULL);
//
COLORREF clr = RGB(m_crCanvasBk.GetR(), m_crCanvasBk.GetG(), m_crCanvasBk.GetB());
SetBkColor(clr);
OnLoadStateImage();
OnLoadTextFont();
ModifyStyle(DS_3DLOOK, WS_CLIPCHILDREN|WS_CLIPSIBLINGS);
ModifyStyleEx(WS_EX_CLIENTEDGE, 0);
m_ToolTip.Create (this);
m_RMenu.LoadMenu(IDR_RESLIB_LIST_POP);
CMenu * pPopup = m_RMenu.GetSubMenu(0);
m_wndDummy.Create(WS_CHILD, CRect(0,0,0,0),this, IDC_RESLIBIMGLIST_DUMMY);
return TRUE;
}
示例9: GetDeviceCaps
BOOL
CGlobalCWizardSheet::OnInitDialog()
{
CMenu *pSysMenu;
HDC hDC;
PGPBoolean loadedBitmap;
PGPUInt32 numBits;
CPropertySheet::OnInitDialog();
// Get screen depth.
hDC = ::GetDC(NULL); // DC for desktop
numBits = GetDeviceCaps(hDC, BITSPIXEL) * GetDeviceCaps(hDC, PLANES);
::ReleaseDC(NULL, hDC);
// Load the bitmap and create a palette for it.
if (numBits <= 1)
{
loadedBitmap = App->GetBitmapAndPalette(IDB_SIDEBAR1,
&mSidebarBitmap, &mSidebarPalette);
}
else if (numBits <= 4)
{
loadedBitmap = App->GetBitmapAndPalette(IDB_SIDEBAR4,
&mSidebarBitmap, &mSidebarPalette);
}
else
{
loadedBitmap = App->GetBitmapAndPalette(IDB_SIDEBAR8,
&mSidebarBitmap, &mSidebarPalette);
}
// Need to give the dialog a close box if we want a help box as well.
ModifyStyle(NULL, WS_SYSMENU, NULL);
// Show the context help button.
ModifyStyleEx(NULL, WS_EX_CONTEXTHELP, NULL);
// Alter the system menu.
pSysMenu = GetSystemMenu(FALSE);
pgpAssertAddrValid(pSysMenu, CMenu);
pSysMenu->DeleteMenu(SC_MINIMIZE, MF_BYCOMMAND);
pSysMenu->DeleteMenu(SC_MAXIMIZE, MF_BYCOMMAND);
pSysMenu->DeleteMenu(SC_RESTORE, MF_BYCOMMAND);
pSysMenu->DeleteMenu(SC_SIZE, MF_BYCOMMAND);
DrawMenuBar();
// Center on screen.
CenterWindow(GetDesktopWindow());
// Put us in front.
SetForegroundWindow();
// Put on top if necessary.
App->TweakOnTopAttribute(this);
return TRUE;
}
示例10: ModifyStyleEx
BOOL CFileTransDlg::OnInitDialog()
{
int fuLoad = LR_DEFAULTCOLOR;
if (fv->HideDialog) {
// Visible = False でもフォアグラウンドに来てしまうので、そうならない
// ように拡張スタイル WS_EX_NOACTIVATE を指定する。
// (Windows 2000 以上で有効)
// WS_EX_NOACTIVATE を指定すると表示されている時もタスクバーに現れない
// ので WS_EX_APPWINDOW も指定する。
ModifyStyleEx(0, WS_EX_NOACTIVATE | WS_EX_APPWINDOW);
}
SetWindowText(fv->DlgCaption);
SetDlgItemText(IDC_TRANSFNAME, &(fv->FullName[fv->DirLen]));
// ログファイルはフルパス表示にする(2004.8.6 yutaka)
SetDlgItemText(IDC_EDIT_FULLPATH, &(fv->FullName[0]));
if (is_NT4()) {
fuLoad = LR_VGACOLOR;
}
::PostMessage(GetSafeHwnd(),WM_SETICON,ICON_SMALL,
(LPARAM)LoadImage(AfxGetInstanceHandle(),
MAKEINTRESOURCE(IDI_TTERM),
IMAGE_ICON,16,16,fuLoad));
::PostMessage(GetSafeHwnd(),WM_SETICON,ICON_BIG,
(LPARAM)LoadImage(AfxGetInstanceHandle(),
MAKEINTRESOURCE(IDI_TTERM),
IMAGE_ICON, 0, 0, fuLoad));
return 1;
}
示例11: ASSERT
int CPaodaoBtnDlg::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CDialog::OnCreate(lpCreateStruct) == -1)
return -1;
// TODO: 在此添加您专用的创建代码
ASSERT(m_pSkinEngine != NULL);
if (NULL != m_pSkinEngine)
{
HRESULT hr = m_pSkinEngine->LoadSkin(GetSafeHwnd(),L"PaodaoBtnDlg");
ASSERT(hr == S_OK && __LINE__);
}
ModifyStyleEx( WS_EX_APPWINDOW , 0 ) ;
ModifyStyleEx( WS_EX_TOOLWINDOW , 0 ) ;
return 0;
}
示例12: ModifyStyleEx
BOOL OptionsDialog::OnInitDialog()
{
CPropertySheet::OnInitDialog();
// Enable context sensitive help
ModifyStyleEx(0,WS_EX_CONTEXTHELP);
// Create the font to use
m_font.CreateFontIndirect(&m_logFont);
// Set the font for the property pages
ChangeDialogFont(this,&m_font);
CPropertyPage* page = GetActivePage();
for (int i = 0; i < GetPageCount(); i++)
{
SetActivePage(i);
CPropertyPage* page = GetActivePage();
ChangeDialogFont(page,&m_font);
}
SetActivePage(page);
// Resize the property page
CTabCtrl* tab = GetTabControl();
tab->GetWindowRect(&m_page);
ScreenToClient(&m_page);
tab->AdjustRect(FALSE,&m_page);
page->MoveWindow(&m_page);
return TRUE;
}
示例13: ModifyStyleEx
BOOL CDrawerDlg::OnInitDialog()
{
CDlgBase::OnInitDialog();
//SetLayeredWindowAttributes(RGB(220,238,212),100,LWA_COLORKEY);
//设置透明
ModifyStyleEx(0,0x00080000);
HINSTANCE hInst = LoadLibrary(_T("User32.DLL"));
if(hInst)
{
typedef BOOL (WINAPI *MYFUNC)(HWND,COLORREF,BYTE,DWORD);
MYFUNC fun = NULL;
//取得SetLayeredWindowAttributes()函数指针
fun=(MYFUNC)GetProcAddress(hInst, "SetLayeredWindowAttributes");
if(fun)fun(this->GetSafeHwnd(),RGB(255,235,205),220,2);
FreeLibrary(hInst);
}
CRect tRect;
GetWindowRect(tRect);
tRect.right = tRect.left + 327;
tRect.bottom =tRect.top + 680;
SetWindowPos(&wndTopMost,tRect);
//界面和音效初始化
m_hBrush=CreateSolidBrush(RGB(255,235,205));
return TRUE; // return TRUE unless you set the focus to a control
// 异常: OCX 属性页应返回 FALSE
}
示例14: ModifyStyleEx
BOOL CWishSpeakerDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: 在此添加额外的初始化
ModifyStyleEx(0,WS_EX_TOOLWINDOW);
m_pSpeakerInputHtml = new COutInputHtmlEditImpl ;
m_pSpeakerInputHtml->SetHtmlEditLogic( &m_SpeakerInputLogic ) ;
m_pSpeakerInputHtml->Create( this ,IDC_HTML_WISHSPEAKER_INPUT , CRect(0,0,0,0) , WS_CHILD|WS_VISIBLE) ;
CComVariant var = (long)m_pSpeakerInputHtml->GetSafeHwnd() ;
m_pSkinEngine->SetSubSkinProp(GetSafeHwnd(),L"itemHtmlWishSpeaker",L"hwnd",var);
if (m_strInitContent == L"")
{
CString strContent;
strContent.Format(DEFAULT_WISH_WORDS, m_pParentDlg->GetRoomID());
SetInitContent(strContent);
}
SetTimer(CHECK_INPUT_LIMIT, 500, NULL);
return TRUE; // return TRUE unless you set the focus to a control
// 异常: OCX 属性页应返回 FALSE
}
示例15: memset
BOOL CTreeItemEdit::CreateFont(LONG lfHeight, LPCTSTR lpszFaceName)
{
// Create a font for the combobox
LOGFONT logFont;
memset(&logFont, 0, sizeof(logFont));
if (!::GetSystemMetrics(SM_DBCSENABLED))
{
// Since design guide says toolbars are fixed height so is the font.
logFont.lfHeight = lfHeight;
//logFont.lfWeight = 0;
CString strDefaultFont = lpszFaceName;
lstrcpy(logFont.lfFaceName, strDefaultFont);
if (!m_font.CreateFontIndirect(&logFont))
{
TRACE("Could Not create font for combo\n");
return FALSE;
}
}
else
{
m_font.Attach(::GetStockObject(SYSTEM_FONT));
}
SetFont(&m_font);
ModifyStyleEx(0, WS_EX_CLIENTEDGE|WS_EX_STATICEDGE, SWP_FRAMECHANGED);
return TRUE;
}