Click here to Skip to main content
15,890,506 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CDateTimeCtrl Pin
sschilachi16-Jun-04 11:16
sschilachi16-Jun-04 11:16 
GeneralRe: CDateTimeCtrl Pin
palbano16-Jun-04 11:31
palbano16-Jun-04 11:31 
GeneralRe: CDateTimeCtrl Pin
sschilachi16-Jun-04 11:34
sschilachi16-Jun-04 11:34 
GeneralRe: CDateTimeCtrl Pin
sschilachi17-Jun-04 0:38
sschilachi17-Jun-04 0:38 
GeneralRe: CDateTimeCtrl Pin
DRHuff25-Aug-04 11:25
DRHuff25-Aug-04 11:25 
GeneralRe: CDateTimeCtrl Pin
sschilachi25-Aug-04 11:51
sschilachi25-Aug-04 11:51 
GeneralRe: CDateTimeCtrl Pin
DRHuff25-Aug-04 16:45
DRHuff25-Aug-04 16:45 
GeneralRe: CDateTimeCtrl Pin
DRHuff25-Aug-04 18:47
DRHuff25-Aug-04 18:47 
Well I worked around it so that I can use it the way I want!Big Grin | :-D Big Grin | :-D Big Grin | :-D

Basically I added an invisible Month Calendar control which I then set to the same space as the DateTimePickers rect in the DropDown handler. I also set a flag for bMonthShowing.

In the OnPaint method I use the bMonthShowing flag to let me know to reposition the windows

m_pMonth->SetWindowPos(&wndNoTopMost, 0, 0, 1, 1, SWP_NOMOVE | SWP_SHOWWINDOW);
m_ctlMonth.SetWindowPos(&wndTopMost, 0, 0, 1, 1, SWP_NOMOVE | SWP_SHOWWINDOW);


In the CloseUp handler I set the MonthCalendar invisible.

For the month calendar I handle the GetDayStates to set which days I want bold.
In the OnSelect for the month calendar I do the following:

COleDateTime t;
SYSTEMTIME tt;
BOOL ret = m_ctlMonth.GetCurSel(&tt);
t.SetDate(tt.wYear, tt.wMonth, tt.wDay);
m_ctlDatePicker.SetTime(t);


(If I did the GetCurSel directly into a COleDateTime it comes back with an invalid status Confused | :confused: )

And everything works! <edit> All right I missed one or two (or more) things. oops
What a kludge!

If you want I can send you the whole dialog project. Let me know.

Dave
GeneralRe: CDateTimeCtrl Pin
sschilachi16-Jun-04 10:58
sschilachi16-Jun-04 10:58 
GeneralRe: CDateTimeCtrl Pin
sschilachi16-Jun-04 10:59
sschilachi16-Jun-04 10:59 
GeneralRe: CDateTimeCtrl Pin
Ravi Bhavnani16-Jun-04 9:55
professionalRavi Bhavnani16-Jun-04 9:55 
GeneralRe: CDateTimeCtrl Pin
palbano16-Jun-04 10:02
palbano16-Jun-04 10:02 
GeneralRe: CDateTimeCtrl Pin
Ravi Bhavnani16-Jun-04 10:05
professionalRavi Bhavnani16-Jun-04 10:05 
GeneralRe: CDateTimeCtrl Pin
palbano16-Jun-04 10:22
palbano16-Jun-04 10:22 
GeneralRe: CDateTimeCtrl Pin
Ravi Bhavnani16-Jun-04 10:33
professionalRavi Bhavnani16-Jun-04 10:33 
GeneralBitmap Background for CDialog Pin
DanYELL16-Jun-04 9:02
DanYELL16-Jun-04 9:02 
GeneralRe: Bitmap Background for CDialog Pin
palbano16-Jun-04 10:47
palbano16-Jun-04 10:47 
Generalbegginner needing help Pin
bmatty16-Jun-04 9:01
bmatty16-Jun-04 9:01 
GeneralRe: begginner needing help Pin
toxcct16-Jun-04 9:57
toxcct16-Jun-04 9:57 
GeneralRe: begginner needing help Pin
gamitech16-Jun-04 10:48
gamitech16-Jun-04 10:48 
Questionchkesp, _chkesp, and ESP ??? Pin
john john mackey16-Jun-04 8:50
john john mackey16-Jun-04 8:50 
AnswerRe: chkesp, _chkesp, and ESP ??? Pin
palbano16-Jun-04 10:38
palbano16-Jun-04 10:38 
GeneralRe: chkesp, _chkesp, and ESP ??? Pin
john john mackey16-Jun-04 11:45
john john mackey16-Jun-04 11:45 
GeneralConvertion to tiff files Pin
Sergio Batarce16-Jun-04 7:49
Sergio Batarce16-Jun-04 7:49 
GeneralRe: Convertion to tiff files Pin
David Crow16-Jun-04 7:52
David Crow16-Jun-04 7:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.