|
-
Jan 24th, 2002, 06:06 PM
#1
Thread Starter
Hyperactive Member
SendMessage messages - Datepicker control
Does anyone know the values of the Datepicker controls messages?
eg
Sendmessage(dtpicker1.hwnd,DTM_SETTEXTCOLOR,0,color)
I want to know what the value for DTM_SETTEXTCOLOR is? Or even if it exists. I know the DTM prefix exists, but i can't find out what suffixes it takes.
Basically i want to change the forecolor or the back color of the datepicker control. I don't want to change the calendar, just the control, that you can see when you load the puppy up.
Anyone know the value or how to change the color??
-
Jan 25th, 2002, 05:13 AM
#2
Member
DTM_SETMCCOLOR = &H1006
I think this is what you need the lparam determines what you are
setting and wparam determines the color. i couldn't find anything
on microsoft except for one page the dealt with windows ce
and it stated that
MSCC_BACKGROUND - background between months
MSCC_MONTHBK - background in month
MSCC_TEXT - text within month
MSCC_TITLEBK - title background
MSCC_TITLETEXT - title text
MSCC_TRAILINGTEXT - header and trailing day text
i couldn't find values for these constants though.
-
Jan 25th, 2002, 05:20 AM
#3
Frenzied Member
The constanst are all defined in CommCtrl.h
e.g.
Code:
Public Enum CalendarControlColourIndexes
MCSC_BACKGROUND = 0
MCSC_TEXT = 1
MCSC_TITLEBK = 2
MCSC_TITLETEXT = 3
MCSC_MONTHBK = 4
MCSC_TRAILINGTEXT = 5
End Enum
There is also a macro exported by the comctl32.dll called DateTime_SetMonthCalColor that does this.
HTH,
Duncan
-
Jan 25th, 2002, 05:22 AM
#4
Member
MCSC_BACKGROUND=0
MCSC_TEXT=1
MCSC_TITLEBK=2
MCSC_TITLETEXT=3
MCSC_MONTHBK=4
MCSC_TRAILINGTEXT=5
-
Jan 25th, 2002, 09:21 AM
#5
New Member
Public Const DTM_FIRST = &H1000
Public Const DTM_GETSYSTEMTIME = (DTM_FIRST + 1)
Public Const DTM_SETSYSTEMTIME = (DTM_FIRST + 2)
Public Const DTM_GETRANGE = (DTM_FIRST + 3)
Public Const DTM_SETRANGE = (DTM_FIRST + 4)
Public Const DTM_SETFORMAT = (DTM_FIRST + 5)
Public Const DTM_SETMCCOLOR = (DTM_FIRST + 6)
Public Const DTM_GETMCCOLOR = (DTM_FIRST + 7)
Public Const DTM_GETMONTHCAL = (DTM_FIRST + 8)
Public Const DTM_SETMCFONT = (DTM_FIRST + 9)
Public Const DTM_GETMCFONT = (DTM_FIRST + 10)
-
Jan 25th, 2002, 01:56 PM
#6
Thread Starter
Hyperactive Member
Thanks ppl!! greatly appreciated.. Some of those constants i think are for changing the Calendar part of it, but a couple look like they might be just what i was after.
But i have just found something else. If you set the CustomFormat to Chr(32) (space) then it will make the Datepicker show a blank box!! this is what i was hoping for!
Thanks again!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|