Jump to content

GUICtrlCreateDate: make items bold


Achilles
 Share

Recommended Posts

  • 1 year later...

I'm stuggeling with the same problem...

I know there is a function 'GUICtrlMonthCal_SetDayState()' , but I can't get it to work...

If I use the exStyle '$MCS_DAYSTATE', which is needed, random days are bold.

According to the help docs it should be done this way :

Local $aMasks[_GUICtrlMonthCal_GetMonthRangeSpan($ctrl_DateSelector, True)]
$aMasks[0] = ""
$aMasks[1] = "2"
$aMasks[2] = ""
_GUICtrlMonthCal_SetDayState($ctrl_DateSelector, $aMasks)

Above code makes day 2 bold, for every month...

Don't know how to make multiple days bold, or only set for a certain month...

Help file uses binary numbers to specify multiple date, fe '0x8081' , but I don't know how to add multiple binary numbers...

Pls help... After a few forum searches, it seems not many use the calendar functions...

Link to comment
Share on other sites

..

Help file uses binary numbers to specify multiple date, fe '0x8081' , but I don't know how to add multiple binary numbers...

You can use BitShift. Remember to shift left using a negative shift parameter. Or you can just calculate 2^(daynumber - 1)

The example in the help has days 1, 8 and 16

So using those days

$val = BitShift(0x0001,-(1-1)) + BitShift(0x0001,-(8-1)) + BitShift(0x0001,-(16-1))
ConsoleWrite(hex($val) & @CRLF)

;or you could just calculate like this
$val2 = 2^0 + 2^7 + 2^15
ConsoleWrite(Hex($val2) & @CRLF)

$Mask[1] = $val;or $val2
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...