'Is it possible to set DateTimePicker to dropdown the monthCalendar by default?

To avoid a duplicate control to CreateWindowEx(0,MONTHCAL_CLASS,...), it is expected to have DateTimePick_Class control showing DropDown Calendar defaultly.

HWND hwndDP = CreateWindowEx(
                             0,
                             DATETIMEPICK_CLASS,
                             TEXT("DateTime"),
                             WS_BORDER | WS_CHILD | WS_VISIBLE | DTS_SHOWNONE,
                             50, 20,200,25,
                             hWnd,
                             (HMENU)ID_DATETIME_PICKer,
                             hInst,
                             NULL);

But it seems that one has to know the control of dropdown arrow button say "ARROW_BTN", like this

  SendMessage(hwndDP,WM_NOTIFY,(int)ARROW_BTN,(NMHDR)DTN_DROPDOWN);

or

  SendMessage(hwndDP,DTN_DROPDOWN,0,0);

what is the command to retrieve the control ID or some other tricks behind?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source