[solved] DatePickerDemo. Notification doesn't work |
Post Reply |
Author | |||
jmarcosf
Groupie Joined: 22 June 2006 Status: Offline Points: 27 |
Post Options
Thanks(0)
Posted: 03 September 2016 at 8:29am |
||
Why in the sample DatePickerDemo Dialog does not receive XTP_NC_DATEPICKER_BUTTON_CLICK messages when coming from Combo CDatePickerCombo class?
Is it a bug? Thanks! |
|||
olebed
Admin Group Joined: 01 July 2014 Location: Ukraine Status: Offline Points: 841 |
Post Options
Thanks(0)
|
||
Hello jmarcosf,
Thank you for bringing this to our attention. There is really error in file Samples\Calendar\DatePickerDemo\DatePickerDemoDlg.cpp line ~196
File Resource.h has two the same IDs 1000
So IDC_CUSTOM1 hides IDC_DATEPICKER and CDatePickerDemoDlg::OnButtonPressed doesn't get XTP_NC_DATEPICKER_BUTTON_CLICK notification. Solution is removing IDC_CUSTOM1 from Resource.h and change ON_NOTIFY() declaration to
I have fixed this in sample application. Regards, Oleksandr Lebed
|
|||
jmarcosf
Groupie Joined: 22 June 2006 Status: Offline Points: 27 |
Post Options
Thanks(0)
|
||
Making that modifications doesn't really solve the problem.
It still continues without printing any TRACE as the blue buttons from the main DatePickerControl does. Besides, IDC_DATEPICKER is the resource id of this main DatePickerControl but, on the fly generated controls when yo click popup controls do not have this ID. I think that is the real problem. According to the source, popup controls are always created with resource id 0. By adding the next line, the messages from first popup control is showed but not the ones coming from the combo box. ON_NOTIFY(XTP_NC_DATEPICKER_BUTTON_CLICK, 0, OnButtonPressed) |
|||
olebed
Admin Group Joined: 01 July 2014 Location: Ukraine Status: Offline Points: 841 |
Post Options
Thanks(0)
|
||
Sorry, I forgot that you ask about CDatePickerCombo class
|
|||
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 |