Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How can I know when the screen rotates?

How can I know when the screen rotates?

Scheduled Pinned Locked Moved C / C++ / MFC
questionlounge
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    ilavl
    wrote on last edited by
    #1

    Now I need to response to the rotating of my screen. that is , an application made by third-party rotates the screen in a random time, when the screen rotates, I need to do sth.(like pop up a message box). I think I can use a work thread to monitor the changes on screen. but how can I know whether the screen rotated? thanks.

    D 1 Reply Last reply
    0
    • I ilavl

      Now I need to response to the rotating of my screen. that is , an application made by third-party rotates the screen in a random time, when the screen rotates, I need to do sth.(like pop up a message box). I think I can use a work thread to monitor the changes on screen. but how can I know whether the screen rotated? thanks.

      D Offline
      D Offline
      darkbyte
      wrote on last edited by
      #2

      Hummm .. a possible way is to check for the screens Dimensions (if that applies) at time x .. 1024 x 768 at time y .. 768 x 1024 think it could apply ?

      I 1 Reply Last reply
      0
      • D darkbyte

        Hummm .. a possible way is to check for the screens Dimensions (if that applies) at time x .. 1024 x 768 at time y .. 768 x 1024 think it could apply ?

        I Offline
        I Offline
        ilavl
        wrote on last edited by
        #3

        darkbyte: Thanks for your reply. To check if the dimemsion changes can work when the screen rotates 90 degree or 270 degree(and it's hard to know whether 90 degree or 270 degree).But when I rotates 180 degree, I dont know what to do. like: 1024 x 768 ------ 0 degree or 180 degree 768 x 1024 ------ 90 degree or 270 degree How to deffer them if they are the same dimension?

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups