Title bar Examples |
Post Reply |
Author | |
dedvalson
Groupie Joined: 10 April 2008 Status: Offline Points: 21 |
Post Options
Thanks(0)
Posted: 09 June 2008 at 5:04pm |
Hi,
I would like to modify one of the supplied skins to change the App Main Title Bar colors and also the color of the title bar text.
Are there any examples for this or could you at least point to where to start.
Thanks,
Don
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
See SkinBuilder tool in 12.0 releasee.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
dedvalson
Groupie Joined: 10 April 2008 Status: Offline Points: 21 |
Post Options
Thanks(0)
|
Thanks,
That should have been obvious (DUH)
Could you answer one more question for me though.
I am using the Vista Skin supplied with the app on a Windows XP system. The color of the title bar (caption) is still being controlled by the desktop, not by my application. What do I need to do to make the Skin take precedence over the desktop theme?
Thanks,
Don
|
|
Smucker
Senior Member Joined: 02 February 2008 Status: Offline Points: 156 |
Post Options
Thanks(0)
|
Here's the code I execute during startup or when the skin changes:
// Exclude a couple of MS DLLs that cause problems XTPSkinManager()->ExcludeModule(_T("msctf.dll")); XTPSkinManager()->ExcludeModule(_T("mshtml.dll")); // Load the skin XTPSkinManager()->LoadSkin(skinfile, skinini); // Apply skin, including metrics, coloring and frame XTPSkinManager()->SetApplyOptions(xtpSkinApplyMetrics|xtpSkinApplyColors|xtpSkinApplyFrame); // Apply skin to all new windows and threads XTPSkinManager()->SetAutoApplyNewWindows(TRUE); XTPSkinManager()->SetAutoApplyNewThreads(TRUE); // Apply skin to current thread and window XTPSkinManager()->EnableCurrentThread(); XTPSkinManager()->ApplyWindow(this->GetSafeHwnd()); // Redraw everything XTPSkinManager()->RedrawAllControls(); |
|
dedvalson
Groupie Joined: 10 April 2008 Status: Offline Points: 21 |
Post Options
Thanks(0)
|
Thanks!
|
|
Pariksh*t
Groupie Joined: 26 June 2008 Location: India Status: Offline Points: 77 |
Post Options
Thanks(0)
|
hello smucker, this is pariksh*t. i am trying to change titlebars color of CColorDialog , i have written this code, but its not working. Please tell me what i am missing? or what i need to write or change? This includes your code also written above.... void CSampleDlgXDlg::OnBnClickedXButton(){ // Exclude a couple of MS DLLs that cause problems XTPSkinManager()->ExcludeModule(_T("msctf.dll")); XTPSkinManager()->ExcludeModule(_T("mshtml.dll")); // Load the skin CString str1 = _T("C:\\Program Files\\Codejock Software\\MFC\\Xtreme ToolkitPro v12.0.0\\Bin\vc71\\styles"); XTPSkinManager()->LoadSkin(str1 + _T("Vista.cjstyles"), _T("NormalBlack2.INI"));
// Apply skin, including metrics, coloring and frame XTPSkinManager()->SetApplyOptions(xtpSkinApplyMetrics|xtpSkinApplyColors|xtpSkinApplyFrame); // Apply skin to all new windows and threads XTPSkinManager()->SetAutoApplyNewWindows(TRUE); XTPSkinManager()->SetAutoApplyNewThreads(TRUE); // Apply skin to current thread and window XTPSkinManager()->EnableCurrentThread(); XTPSkinManager()->ApplyWindow(this->GetSafeHwnd()); // Redraw everything XTPSkinManager()->RedrawAllControls(); //'/AfxMessageBox(_T("CXTPButton")); CColorDialog cd; cd.DoModal(); } |
|
Smucker
Senior Member Joined: 02 February 2008 Status: Offline Points: 156 |
Post Options
Thanks(0)
|
The parent of the color dialog may not be skinned.
Try cd.m_cc.hwndOwner = GetSafeHwnd(); |
|
Product: Xtreme Toolkit Pro version 13.2 (Unicode, static build)
Platform: Windows 200x/XP/Vista/Win7 (32/64 bit) Language: Visual C++ 9.0 (Studio 2008) |
|
Pariksh*t
Groupie Joined: 26 June 2008 Location: India Status: Offline Points: 77 |
Post Options
Thanks(0)
|
hi
now my function looks like this but it is still not working
void CSampleDlgXDlg::OnBnClickedXButton(){ // Exclude a couple of MS DLLs that cause problems XTPSkinManager()->ExcludeModule(_T("msctf.dll")); XTPSkinManager()->ExcludeModule(_T("mshtml.dll")); // Load the skin CString str1 = _T("C:\\Program Files\\Codejock Software\\MFC\\Xtreme ToolkitPro v12.0.0\\Bin\vc71\\styles"); XTPSkinManager()->LoadSkin(str1 + _T("Vista.cjstyles"), _T("NormalBlack2.INI"));
// Apply skin, including metrics, coloring and frame XTPSkinManager()->SetApplyOptions(xtpSkinApplyMetrics|xtpSkinApplyColors|xtpSkinApplyFrame); // Apply skin to all new windows and threads XTPSkinManager()->SetAutoApplyNewWindows(TRUE); XTPSkinManager()->SetAutoApplyNewThreads(TRUE); // Apply skin to current thread and window XTPSkinManager()->EnableCurrentThread(); CWnd *ptr = GetDlgItem(IDC_BUTTON2); HWND hwnd = ptr->GetSafeHwnd(); XTPSkinManager()->ApplyWindow(hwnd); // Redraw everything XTPSkinManager()->RedrawAllControls(); //'/AfxMessageBox(_T("CXTPButton")); CColorDialog cd; cd.m_cc.hwndOwner = GetSafeHwnd(); XTPSkinManager()->ApplyWindow( cd.m_cc.hwndOwner); cd.DoModal(); } what is wrong in this? do reply....
|
|
Smucker
Senior Member Joined: 02 February 2008 Status: Offline Points: 156 |
Post Options
Thanks(0)
|
I don't know. I enable skinning early in application startup (before my main window is created), rather than when a button is pressed. Is there a reason you're doing it where you are? Do you want to only skin the color dialog?
|
|
Product: Xtreme Toolkit Pro version 13.2 (Unicode, static build)
Platform: Windows 200x/XP/Vista/Win7 (32/64 bit) Language: Visual C++ 9.0 (Studio 2008) |
|
Pariksh*t
Groupie Joined: 26 June 2008 Location: India Status: Offline Points: 77 |
Post Options
Thanks(0)
|
Actually in our application we using Office2007Black style. The systems messageboxes or the Dialogboxes like CColorDialog CFileDialog's tittle bar color is not changing. We want uniformity in our application.....thats why we want this....right now i am trying on sample application.....
can you send me your application?
do reply
|
|
Smucker
Senior Member Joined: 02 February 2008 Status: Offline Points: 156 |
Post Options
Thanks(0)
|
I did not have to do anything special in my application to skin the color and file dialogs. The code above that you used is what I execute during startup (and whenever the skin changes).
Sorry, I can't send you my application because it is about 1 million lines of code in many projects, and is my company's property. |
|
Product: Xtreme Toolkit Pro version 13.2 (Unicode, static build)
Platform: Windows 200x/XP/Vista/Win7 (32/64 bit) Language: Visual C++ 9.0 (Studio 2008) |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |