locked
Windows Message?

    Question

  • How to Send/Receive Windows Message in Metro App?
    Thursday, October 13, 2011 7:30 AM

Answers

All replies

  • Metro apps don't (and can't) use window messages.  They don't have any concept of HWNDs and PostMessage and SendMessage are not available in the Metro profile.

    If you can tell us what you're trying to achieve we can help you find a better way to get that behavior.

    --Rob

    Thursday, October 13, 2011 3:27 PM
    Owner
  •    errr....For example, without windows message, how to know system power management status in Metro app? In desktop mode, we can receive WM_POWERBROADCAST message. Another, How to communicate data between two Metro app?

    Friday, October 14, 2011 6:27 AM
  • Hi Jones,

    Metro apps communicate via contracts designed for the specific type of communication (sharing, search, etc.)  There is no arbitrary data communication between Metro apps (unless they're in the same package).  Likewise, they shouldn't need to know low level power management status.  That is all handled for them via the lifetime management.

    If your application relies on these sorts of features then it would need to be a Desktop app rather than a Metro style app.

    You should take a look at the overview documentation and //build/ sessions for a better understanding of how Metro style apps work and what sorts of applications they are appropriate for. 

    http://msdn.microsoft.com/en-us/library/windows/apps/

    http://msdn.microsoft.com/en-us/library/windows/apps/hh452671(v=VS.85).aspx

    http://channel9.msdn.com/events/BUILD/BUILD2011

    Friday, October 14, 2011 3:52 PM
    Owner