本文整理汇总了C++中ModifyStyleEx函数的典型用法代码示例。如果您正苦于以下问题:C++ ModifyStyleEx函数的具体用法?C++ ModifyStyleEx怎么用?C++ ModifyStyleEx使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ModifyStyleEx函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
}
开发者ID:axonim,项目名称:ecos-ax-som-bf609,代码行数:31,代码来源:CSHPropertySheet.cpp
示例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;
}
开发者ID:iceberry,项目名称:flyffsf,代码行数:9,代码来源:Label.cpp
示例3: ModifyStyleEx
void CButtonCx::SetDrawFrame(BOOL bDrawFrame)
{
if (bDrawFrame)
{
// スタティックエッジを有効
ModifyStyleEx(0, WS_EX_STATICEDGE, SWP_DRAWFRAME);
}
else
{
// スタティックエッジを無効
ModifyStyleEx(WS_EX_STATICEDGE, 0, SWP_DRAWFRAME);
}
}
开发者ID:skyformat99,项目名称:CrystalDiskInfo,代码行数:13,代码来源:ButtonCx.cpp
示例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;
}
开发者ID:open2cerp,项目名称:Open2C-ERP,代码行数:15,代码来源:XColorStatic.cpp
示例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;
}
开发者ID:rogerlsmith,项目名称:PineWood-DerbyTimer,代码行数:15,代码来源:GCColorStatic.cpp
示例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;
}
开发者ID:m-ober,项目名称:ServerChecker,代码行数:16,代码来源:MainFrm.cpp
示例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;
}
开发者ID:darwinbeing,项目名称:trade,代码行数:35,代码来源:SplashDlg.cpp
示例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;
}
开发者ID:cugxiangzhenwei,项目名称:WorkPlatForm,代码行数:29,代码来源:CxResLibImgList.cpp
示例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;
}
开发者ID:ysangkok,项目名称:pgp-win32-6.5.8,代码行数:60,代码来源:CGlobalCWizardSheet.cpp
示例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;
}
开发者ID:lifangbo,项目名称:teraterm,代码行数:33,代码来源:ftdlg.cpp
示例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;
}
开发者ID:mengskysama,项目名称:V8,代码行数:16,代码来源:PaodaoBtnDlg.cpp
示例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;
}
开发者ID:DavidKinder,项目名称:Windows-Frotz,代码行数:30,代码来源:FrotzDialogs.cpp
示例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
}
开发者ID:ElvisJazz,项目名称:DesktopCalendar,代码行数:29,代码来源:DrawerDlg.cpp
示例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
}
开发者ID:mengskysama,项目名称:V8,代码行数:25,代码来源:WishSpeakerDlg.cpp
示例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;
}
开发者ID:AnthonyNystrom,项目名称:GenXSource,代码行数:27,代码来源:BirchCtrl.cpp
示例16: ModifyStyleEx
int AccountDlg::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (langPack.rtl) {
ModifyStyleEx(0,WS_EX_LAYOUTRTL);
}
return 0;
}
开发者ID:iostrovs,项目名称:microsip-modified,代码行数:7,代码来源:AccountDlg.cpp
示例17: GetClientRect
BOOL CFaceSelDlg::OnInitDialog(CWindow wndFocus, LPARAM lInitParam)
{
CRect rcClient;
GetClientRect(&rcClient);
m_FaceCtrl.SetBgColor(RGB(255, 255, 255));
m_FaceCtrl.SetLineColor(RGB(223, 230, 246));
m_FaceCtrl.SetFocusBorderColor(RGB(0, 0, 255));
m_FaceCtrl.SetZoomBorderColor(RGB(0, 138, 255));
m_FaceCtrl.SetRowAndCol(8, 15);
m_FaceCtrl.SetItemSize(28, 28);
m_FaceCtrl.SetZoomSize(84, 84);
m_FaceCtrl.SetFaceList(m_lpFaceList);
m_FaceCtrl.SetCurPage(0);
CRect rcFaceCtrl(rcClient);
rcFaceCtrl.left += 6;
rcFaceCtrl.right = rcFaceCtrl.left + 420;
rcFaceCtrl.top += 6;
rcFaceCtrl.bottom = rcFaceCtrl.top + 224;
m_FaceCtrl.Create(m_hWnd, rcFaceCtrl, NULL, WS_CHILD | WS_VISIBLE,
NULL, ID_FACE_CTRL, NULL);
m_nSelFaceId = -1;
m_nSelFaceIndex = -1;
m_strSelFaceFileName = _T("");
ModifyStyleEx(WS_EX_APPWINDOW, WS_EX_TOOLWINDOW);
return TRUE;
}
开发者ID:janseM3319,项目名称:mingqq,代码行数:31,代码来源:FaceSelDlg.cpp
示例18: ModifyStyleEx
BOOL CSysHtmlNotifyDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: 在此添加额外的初始化
ModifyStyleEx( WS_EX_APPWINDOW , WS_EX_TOOLWINDOW) ;
int cx = GetSystemMetrics(SM_CXSCREEN); //屏幕宽度
int cy = GetSystemMetrics(SM_CYSCREEN); //屏幕高度
// pSysNotifyDlg->SetWindowPos(NULL,cx - 250,cy - 170,250,170,SWP_SHOWWINDOW);
RECT rect;
::SystemParametersInfo(SPI_GETWORKAREA,sizeof(RECT),&rect,0); //工作区域大小
RECT deskRect;
::GetWindowRect(::GetDesktopWindow(),&deskRect); //桌面窗口大小
int startHight = deskRect.bottom - rect.bottom; //系统状态栏高度
CRect clientRect(0,0,0,0);
clientRect.left = cx - SYS_HTML_NOTIFY_WIDTH;
clientRect.top = cy - startHight - SYS_HTML_NOTIFY_HIGHT;
clientRect.right = clientRect.left + SYS_HTML_NOTIFY_WIDTH;
clientRect.bottom = clientRect.top + SYS_HTML_NOTIFY_HIGHT;
MoveWindow(&clientRect);
CComVariant var;
m_htmlSysNotify.CreateFromStatic(IDC_HTML_SYSNOTIFY, this);
var = (LONG)m_htmlSysNotify.GetSafeHwnd();
m_pSkinEngine->SetSubSkinProp(GetSafeHwnd(),L"itemHtmlSysNotify",L"hwnd",var);
InitTheHtml();
return FALSE;//处理抢焦点问题
//return TRUE; // return TRUE unless you set the focus to a control
// 异常: OCX 属性页应返回 FALSE
}
开发者ID:mengskysama,项目名称:V8,代码行数:34,代码来源:SysHtmlNotifyDlg.cpp
示例19: GetClientRect
BOOL CDlgResLib::OnInitDialog()
{
CDialogEx::OnInitDialog();
CRect rcClient;
GetClientRect(&rcClient);
//m_wndSplitter.SubclassWindow(m_wndSplitter.GetSafeHwnd());
//m_pFrameWnd->ModifyStyle(0, WS_CLIPSIBLINGS|WS_CLIPCHILDREN);
m_pFrameWnd->MoveWindow(&rcClient);
m_pFrameWnd->ShowWindow(SW_SHOW);
//m_wndSplitter.ModifyStyle(WS_CLIPCHILDREN, 0); //Splitter 不能有 WS_CLIPCHILDREN 属性
m_wndSplitter.MoveWindow(0,0, rcClient.Width(), rcClient.Height());
m_wndSplitter.ShowWindow(SW_SHOW);
m_wndSplitter.SetColumnInfo(0, rcClient.Width() / 4, 1);
m_wndSplitter.SetColumnInfo(1, rcClient.Width() * 3 / 4, 1);
m_wndSplitter.RecalcLayout();
ModifyStyle(DS_3DLOOK, 0);
ModifyStyleEx(WS_EX_CLIENTEDGE, 0);
return TRUE; // return TRUE unless you set the focus to a control
// 异常: OCX 属性页应返回 FALSE
}
开发者ID:cugxiangzhenwei,项目名称:MySrcCode,代码行数:26,代码来源:DlgResLib.cpp
示例20: GetWindowLong
BOOL CDlgOpentools::InitPaint()
{
//////////////////////////////////////////////////////////////////////////
m_dwStyle = GetWindowLong(m_hWnd, GWL_STYLE);
m_dwExStyle = GetWindowLong(m_hWnd, GWL_EXSTYLE);
ModifyStyle(WS_CAPTION|WS_BORDER|WS_DLGFRAME|WS_THICKFRAME, NULL);
ModifyStyleEx(WS_EX_WINDOWEDGE|WS_EX_OVERLAPPEDWINDOW|WS_EX_PALETTEWINDOW, NULL);
DWORD dwExStyle=GetWindowLong(m_hWnd,GWL_EXSTYLE);
if((dwExStyle & WS_EX_LAYERED) != WS_EX_LAYERED)
SetWindowLong(m_hWnd, GWL_EXSTYLE, dwExStyle^WS_EX_LAYERED);
ImageFromIDResource(IDB_PNG_ANIMATE, "PNG", m_pImage);
m_nSrcWidth = m_pImage->GetWidth();
m_nSrcHeight = m_pImage->GetHeight();
m_nDstWidth = 70;
m_nDstHeight = 70;
m_nFrameCount = 12;
m_nFrameDelay = 90;
m_Blend.BlendOp=0; //theonlyBlendOpdefinedinWindows2000
m_Blend.BlendFlags=0; //nothingelseisspecial...
m_Blend.AlphaFormat=1; //...
m_Blend.SourceConstantAlpha=255;//AC_SRC_ALPHA
SetTimer(TIMER_ANIMATE,m_nFrameDelay,NULL);
//////////////////////////////////////////////////////////////////////////
return TRUE;
}
开发者ID:cugxiangzhenwei,项目名称:WorkPlatForm,代码行数:33,代码来源:DlgOpentools.cpp
注:本文中的ModifyStyleEx函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论