CLOSE Button functionality overridden: SKIN |
Post Reply |
Author | |
prashant
Senior Member Joined: 19 February 2007 Location: India Status: Offline Points: 165 |
Post Options
Thanks(0)
Posted: 14 November 2008 at 4:39am |
I have small pop up window within my application having CLOSE button over it.
If I include following piece of code in my applications InitInstance() then I am unable to Click on Pop up windows Close button. CODE:- TCHAR szStylesPath[_MAX_PATH]; CString m_strStylesPath; VERIFY(::GetModuleFileName( AfxGetApp()->m_hInstance, szStylesPath, _MAX_PATH)); m_strStylesPath = szStylesPath; int nIndex = m_strStylesPath.ReverseFind(_T('\\')); if (nIndex > 0) { m_strStylesPath = m_strStylesPath.Left(nIndex); } else { m_strStylesPath.Empty(); } m_strStylesPath += _T("\\Styles\\"); XTPSkinManager()->SetApplyOptions(XTPSkinManager()->GetApplyOptions() | xtpSkinApplyMetrics ); BOOL bRes=XTPSkinManager()->LoadSkin(m_strStylesPath + _T("WinXP.Luna.cjstyles"), _T("NORMALBLUE.INI")); CALL STACK:- CXTPSkinManagerApiHook::CallWindowProcOrig(long (HWND__ *, unsigned int, unsigned int, long)* 0x5f492613 AfxWndProcBase(HWND__ *, unsigned int, unsigned int, long), HWND__ * 0x001a0862, unsigned int 273, unsigned int 33155, long 0) line 209 + 25 bytes CXTPSkinManager::DoCallWindowProc(long (HWND__ *, unsigned int, unsigned int, long)* 0x5f492613 AfxWndProcBase(HWND__ *, unsigned int, unsigned int, long), HWND__ * 0x001a0862, unsigned int 273, unsigned int 33155, long 0) line 637 CXTPSkinManager::HookWndProc(HWND__ * 0x001a0862, unsigned int 273, unsigned int 33155, long 0) line 690 + 25 bytes Please suggest me some solution. Thanks in advance. |
|
prashant
Senior Member Joined: 19 February 2007 Location: India Status: Offline Points: 165 |
Post Options
Thanks(0)
|
Window Creation Parameters as follows:
hWnd = ::CreateWindow(f_class, string, WS_CLIPSIBLINGS | WS_CHILD | WS_BORDER | WS_CAPTION | DS_LOCALEDIT | WS_SYSMENU , WNDX, WNDY, WNDWIDTH, WNDHEIGHT, m_hWnd, 0, hInstPim, NULL); Also I f I applied following line of code after CreateWindow() then CLOSE button working fine but now Skin is disabled for Pop up window. XTPSkinManager()->Remove(hWnd); |
|
prashant
Senior Member Joined: 19 February 2007 Location: India Status: Offline Points: 165 |
Post Options
Thanks(0)
|
Please find attached sample.uploads/20081117_080439_Test.zip
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
BUTTON with WS_CAPTION too difficult for SkinFramework. Create simple frame and add button as child.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
prashant
Senior Member Joined: 19 February 2007 Location: India Status: Offline Points: 165 |
Post Options
Thanks(0)
|
Please explain, I commented out WS_CAPTION without success.
Let me explain how I am creating this popup window. 1) I am creating CXTPCalendarControl 2) Inside Codejock Calendar control I am creating this popup window using following piece of code hWnd = ::CreateWindow(f_class, string, WS_CLIPSIBLINGS | WS_CHILD | WS_BORDER | WS_CAPTION | DS_LOCALEDIT | WS_SYSMENU , WNDX, WNDY, WNDWIDTH, WNDHEIGHT, m_hWnd, 0, hInstPim, NULL); Please send me modified sample application or explain the resolution in detail. Thanks for your valuable feedback. |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Add lines
::SetWindowPos(hwndG1B1, HWND_TOP, 0, 0, 100, 100, SWP_NOMOVE|SWP_NOSIZE);
GetCalendarCtrl().ModifyStyle(0, WS_CLIPSIBLINGS|WS_CLIPCHILDREN);
after you create popup.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
prashant
Senior Member Joined: 19 February 2007 Location: India Status: Offline Points: 165 |
Post Options
Thanks(0)
|
uploads/20081121_030501_Test.zip
Hi Oleg, Tried the above code with no success. Can you please provide any other alternative? Problem exists in attached sample project. Please send me modified project with the resolution. Thanks a lot. |
|
prashant
Senior Member Joined: 19 February 2007 Location: India Status: Offline Points: 165 |
Post Options
Thanks(0)
|
Hi Oleg,
Please suggest alternative. It's bit urgent. |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
I don't see suggested lines in attached sample.
Add lines
::SetWindowPos(hwndG1B1, HWND_TOP, 0, 0, 100, 100, SWP_NOMOVE|SWP_NOSIZE);
GetCalendarCtrl().ModifyStyle(0, WS_CLIPSIBLINGS|WS_CLIPCHILDREN);
in the end of CCalViewNew::OnCreate. |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
prashant
Senior Member Joined: 19 February 2007 Location: India Status: Offline Points: 165 |
Post Options
Thanks(0)
|
Thanks, Good news is working in attached sample.
But strangely enough, not working in my Project (Styles folder was not present when I tested this, problem still exists after applying 2 lines suggested by you.) |
|
prashant
Senior Member Joined: 19 February 2007 Location: India Status: Offline Points: 165 |
Post Options
Thanks(0)
|
uploads/20081126_044116_Test.zip
Hi Oleg, Added two lines of code suggested by you, still able to reproduce CLOSE button problem. 1) Please find attached sample (Code suggested by you is present) 2) Also while running please copy "Styles" folder in your application path. Please suggest me some solution as early as possible. Thanks. |
|
prashant
Senior Member Joined: 19 February 2007 Location: India Status: Offline Points: 165 |
Post Options
Thanks(0)
|
Hi Oleg,
Please suggest some solution. This is the last problem remained in my product and a show stopper too. ( For this release ) |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Now it works for me :(
What exactly doesn't work ? You can't click Close button in caption ? What SkinFramework version you have ?
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
prashant
Senior Member Joined: 19 February 2007 Location: India Status: Offline Points: 165 |
Post Options
Thanks(0)
|
Hi Oleg,
I can see "CLOSE" (X) button on caption bar but unable to click on the same. I am using CodeJock version 11.2.2 and Copied "Styles folder" from following path in the Debug folder of my App:- "C:\Program Files\Codejock Software\MFC\Xtreme ToolkitPro v11.2.2\Bin\vc60\Styles" Snapshot of Test Application: |
|
prashant
Senior Member Joined: 19 February 2007 Location: India Status: Offline Points: 165 |
Post Options
Thanks(0)
|
Hi Oleg,
Here is the snapshot of my application and also for your convenience attaching Styles folder that I am using. uploads/20081126_235101_Styles.zip |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Maybe problem in version you have:(
You have active subscription, so upgrade to 12.1 will be free.
Please upgrade.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
prashant
Senior Member Joined: 19 February 2007 Location: India Status: Offline Points: 165 |
Post Options
Thanks(0)
|
Thank God and Thanks to you Oleg :)
Problem resolved with 12.1 version, cheers |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Great! :) |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
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 |