Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Win API / June 2008



Tip: Looking for answers? Try searching our database.

DTPicker and bold dates

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dean Earley - 13 Jun 2008 17:04 GMT
Hi all.

The MonthView Common control has the ability to send notifications to
the app to get a list of dates to show bolded.

Does anyone know if it possible to hook into this for the DTPickers
dropdown control?
I've tried picking up the wm_notify messages and they don't seem to be sent.

I'm not 100% sure whether it's a reimplementation of the monthview
control or it creates a "real" one.

(I'm also using the versions built into the VB6 common controls 2
library rather than the native windows one but they seem to use the same
messages and branched at V5.something)

Thanks

Signature

Dean Earley (dean.earley@icode.co.uk)
i-Catcher Development Team

iCode Systems

MikeD - 14 Jun 2008 12:28 GMT
> Hi all.
>
[quoted text clipped - 8 lines]
> I'm not 100% sure whether it's a reimplementation of the monthview control
> or it creates a "real" one.

No, it creates an actual MonthView. You have to be sure you're subclassing
the MonthView when it's displayed. That's the only time it exists and
therefore has an hWnd. To get the MonthView's hWnd, you have to send the
DTPicker a message (DTM_GETMONTHCAL) and you must do this in the DTPicker's
DropDown event.  You must also be careful not to use that hWnd once the
DTPicker's CloseUp event has occurred. Each time the MonthView is
re-created, it could have a different hWnd.

Signature

Mike
Microsoft MVP Visual Basic

Benoit - 14 Jun 2008 13:27 GMT
> No, it creates an actual MonthView. You have to be sure you're subclassing
> the MonthView when it's displayed.

No, totally useless.
MikeD - 14 Jun 2008 14:03 GMT
>> No, it creates an actual MonthView. You have to be sure you're
>> subclassing the MonthView when it's displayed.
>
> No, totally useless.

No, what's useless is your reply.

Signature

Mike
Microsoft MVP Visual Basic

Marc - 14 Jun 2008 16:28 GMT
>>>No, it creates an actual MonthView. You have to be sure you're
>>>subclassing the MonthView when it's displayed.
>>
>>No, totally useless.

> No, what's useless is your reply.

No, he's right.
Read MSDN to learn what is the WM_NOTIFY message...
MikeD - 14 Jun 2008 23:29 GMT
>>>>No, it creates an actual MonthView. You have to be sure you're
>>>>subclassing the MonthView when it's displayed.
[quoted text clipped - 5 lines]
> No, he's right.
> Read MSDN to learn what is the WM_NOTIFY message...

His reply was useless because he didn't provide any details. If I'm wrong
about something, I can accept that and would hope someone corrects me. I WAS
incorrect because WM_NOTIFY is sent to the parent window of the control. If
Benoit has stated that fact instead of just saying my reply was useless, I'd
have thanked him for the correction. At least your reply did prompt me to
review the WM_NOTIFY message and realize my mistake, so thank you for that
(but you also could have stated what my error was).

Signature

Mike
Microsoft MVP Visual Basic

Dean Earley - 16 Jun 2008 09:11 GMT
>>>>> No, it creates an actual MonthView. You have to be sure you're
>>>>> subclassing the MonthView when it's displayed.
[quoted text clipped - 10 lines]
> review the WM_NOTIFY message and realize my mistake, so thank you for that
> (but you also could have stated what my error was).

Anyone care to elaborate?
What does WM_NOTIFY have to do with this?

I have subclassed the parent, and it doesn;t appear to be getting the
notifications, but this could be the VB wrapper.

I do know that you can get wm_notify messages by subclassing the control
itself using the WM_REFLECT or something similar. I'll need to dig into
my other code.
This does however assume that it sends the messages I'm interested in.

Signature

Dean Earley (dean.earley@icode.co.uk)
i-Catcher Development Team

iCode Systems

kilt - 18 Jun 2008 07:12 GMT
> Anyone care to elaborate?
> What does WM_NOTIFY have to do with this?
[quoted text clipped - 6 lines]
> my other code.
> This does however assume that it sends the messages I'm interested in.

see specialized api ng (comp.os.ms-windows.programmer.win32)
to understand why it can't work (classic problem for years...)
Dean Earley - 18 Jun 2008 12:31 GMT
>> Anyone care to elaborate?
>> What does WM_NOTIFY have to do with this?
[quoted text clipped - 9 lines]
> see specialized api ng (comp.os.ms-windows.programmer.win32)
> to understand why it can't work (classic problem for years...)

Google finds absolutely nothing relevant in that group and nor can my
news reader.
I have posted there so someone can explain this "classic problem" that
no one else has asked about...

Bizarrely, a "fred100" also told me about this by email (but also
neglected to include any further details)
Try picking one name/email and sticking to it.

Signature

Dean Earley (dean.earley@icode.co.uk)
i-Catcher Development Team

iCode Systems

Dean Earley - 24 Jun 2008 10:10 GMT
> Hi all.
>
[quoted text clipped - 12 lines]
> library rather than the native windows one but they seem to use the same
> messages and branched at V5.something)

For anyone else that wants to try this, I gave it up as there seems no
(practical) way to set the right style on the monthview to make it ask
for the bold dates. I also can't seem to get the notifications from the
monthview making it futile.

This was with the VB6 common control wrapper so the story may be
different for the real common controls.

I ended up using my own date picker control that shows a "dropdown" form
containing a monthview control.

Thanks for any help and suggestions,.

Signature

Dean Earley (dean.earley@icode.co.uk)
i-Catcher Development Team

iCode Systems

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.