Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Making WM_TIMECHANGE independent on top-level Window?

Posted on 2001-08-15
5
Medium Priority
?
387 Views
Last Modified: 2013-11-20
0
Comment
Question by:TYB
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 32

Expert Comment

by:jhance
ID: 6387762
no comment
0
 

Author Comment

by:TYB
ID: 6387785
Sorry about that there is no question.

I want to map the WM_TIMECHANGE-message in a class other than a CWnd-class, how do I do that ?
The WM_TIMECHANGE is sent to all top-level windows but if I do not have a window then the message wont
be caught, so I want the message to be mapped in a class other than a CWnd-class so that I can do necessary
stuff when the time switches from Daylight to Standard and the other way around.
Is there a way around this or can the above be done ?
0
 
LVL 86

Expert Comment

by:jkr
ID: 6387907
>>The WM_TIMECHANGE is sent to all top-level windows but
>>if I do not have a window then the message wont be caught

All (well, almost) MFC GUI elements are based on CWnd. And, even more important, to process a message, you need to have a window (where should the system send the message to?). Why don't you simply create an invisible window that can receive the message?
0
 
LVL 2

Accepted Solution

by:
SamratAshok earned 600 total points
ID: 6388206

You are writing a MFC application without creating any window!?

How are you doing that in first place?
Invisible window approach has been done to death and it is generally the most
efficient, so unless you have reason not to use it. you're fine.

If you cannot create your own window, try writing hook procedure that hooks onto
main desktop window and traps the messages from there. I believe there is
sample somewhere in MSDN about Hook procs.



0
 

Author Comment

by:TYB
ID: 6405852
I use the solution with the invisible Wnd... tnx for contribution.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question