Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - CLOSE Button functionality overridden: SKIN
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CLOSE Button functionality overridden: SKIN

 Post Reply Post Reply
Author
Message
prashant View Drop Down
Senior Member
Senior Member
Avatar

Joined: 19 February 2007
Location: India
Status: Offline
Points: 165
Post Options Post Options   Thanks (0) Thanks(0)   Quote prashant Quote  Post ReplyReply Direct Link To This Post Topic: CLOSE Button functionality overridden: SKIN
    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.

Back to Top
prashant View Drop Down
Senior Member
Senior Member
Avatar

Joined: 19 February 2007
Location: India
Status: Offline
Points: 165
Post Options Post Options   Thanks (0) Thanks(0)   Quote prashant Quote  Post ReplyReply Direct Link To This Post Posted: 14 November 2008 at 5:24am
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);  
Back to Top
prashant View Drop Down
Senior Member
Senior Member
Avatar

Joined: 19 February 2007
Location: India
Status: Offline
Points: 165
Post Options Post Options   Thanks (0) Thanks(0)   Quote prashant Quote  Post ReplyReply Direct Link To This Post Posted: 17 November 2008 at 8:05am
Please find attached sample.uploads/20081117_080439_Test.zip
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 17 November 2008 at 8:54am
Hi,
BUTTON with WS_CAPTION too difficult for SkinFramework. Create simple frame and add button as child.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
prashant View Drop Down
Senior Member
Senior Member
Avatar

Joined: 19 February 2007
Location: India
Status: Offline
Points: 165
Post Options Post Options   Thanks (0) Thanks(0)   Quote prashant Quote  Post ReplyReply Direct Link To This Post Posted: 17 November 2008 at 9:25am
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.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 17 November 2008 at 1:10pm
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
Back to Top
prashant View Drop Down
Senior Member
Senior Member
Avatar

Joined: 19 February 2007
Location: India
Status: Offline
Points: 165
Post Options Post Options   Thanks (0) Thanks(0)   Quote prashant Quote  Post ReplyReply Direct Link To This Post Posted: 21 November 2008 at 2:07am
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.
Back to Top
prashant View Drop Down
Senior Member
Senior Member
Avatar

Joined: 19 February 2007
Location: India
Status: Offline
Points: 165
Post Options Post Options   Thanks (0) Thanks(0)   Quote prashant Quote  Post ReplyReply Direct Link To This Post Posted: 24 November 2008 at 6:04am
Hi Oleg,

Please suggest alternative. It's bit urgent.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 24 November 2008 at 6:31am
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
Back to Top
prashant View Drop Down
Senior Member
Senior Member
Avatar

Joined: 19 February 2007
Location: India
Status: Offline
Points: 165
Post Options Post Options   Thanks (0) Thanks(0)   Quote prashant Quote  Post ReplyReply Direct Link To This Post Posted: 24 November 2008 at 8:21am
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.)
Back to Top
prashant View Drop Down
Senior Member
Senior Member
Avatar

Joined: 19 February 2007
Location: India
Status: Offline
Points: 165
Post Options Post Options   Thanks (0) Thanks(0)   Quote prashant Quote  Post ReplyReply Direct Link To This Post Posted: 26 November 2008 at 3:27am
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.
Back to Top
prashant View Drop Down
Senior Member
Senior Member
Avatar

Joined: 19 February 2007
Location: India
Status: Offline
Points: 165
Post Options Post Options   Thanks (0) Thanks(0)   Quote prashant Quote  Post ReplyReply Direct Link To This Post Posted: 26 November 2008 at 6:41am
Hi Oleg,

Please suggest some solution. This is the last problem remained in my product and a show stopper too. ( For this release )
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 26 November 2008 at 7:44am
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
Back to Top
prashant View Drop Down
Senior Member
Senior Member
Avatar

Joined: 19 February 2007
Location: India
Status: Offline
Points: 165
Post Options Post Options   Thanks (0) Thanks(0)   Quote prashant Quote  Post ReplyReply Direct Link To This Post Posted: 26 November 2008 at 11:38pm
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:





Back to Top
prashant View Drop Down
Senior Member
Senior Member
Avatar

Joined: 19 February 2007
Location: India
Status: Offline
Points: 165
Post Options Post Options   Thanks (0) Thanks(0)   Quote prashant Quote  Post ReplyReply Direct Link To This Post Posted: 26 November 2008 at 11:48pm
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



Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 27 November 2008 at 2:00am
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
Back to Top
prashant View Drop Down
Senior Member
Senior Member
Avatar

Joined: 19 February 2007
Location: India
Status: Offline
Points: 165
Post Options Post Options   Thanks (0) Thanks(0)   Quote prashant Quote  Post ReplyReply Direct Link To This Post Posted: 27 November 2008 at 8:39am
Thank God and Thanks to you Oleg :)
Problem resolved with 12.1 version,

cheers
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 27 November 2008 at 2:22pm

Great! :)

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.