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. diagonal controls

diagonal controls

Scheduled Pinned Locked Moved C / C++ / MFC
helpworkspace
4 Posts 3 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.
  • R Offline
    R Offline
    r i s h a b h s
    wrote on last edited by
    #1

    dear all, this may seem as a weird problem but still i think its worth askin' in this forum of TOPGUN programmers. is there any way to create controls diagonally or at any given angle. Eg a button inclined at say 45 degrees wrt to the dialog. i just wondered if this can be done in windows or any other programming environment. :omg: regards, rIsHaBh

    H J 2 Replies Last reply
    0
    • R r i s h a b h s

      dear all, this may seem as a weird problem but still i think its worth askin' in this forum of TOPGUN programmers. is there any way to create controls diagonally or at any given angle. Eg a button inclined at say 45 degrees wrt to the dialog. i just wondered if this can be done in windows or any other programming environment. :omg: regards, rIsHaBh

      H Offline
      H Offline
      Hosam Aly Mahmoud
      wrote on last edited by
      #2

      I have never tried it, but may be using regions will solve your problem.

      Hosam Aly Mahmoud

      1 Reply Last reply
      0
      • R r i s h a b h s

        dear all, this may seem as a weird problem but still i think its worth askin' in this forum of TOPGUN programmers. is there any way to create controls diagonally or at any given angle. Eg a button inclined at say 45 degrees wrt to the dialog. i just wondered if this can be done in windows or any other programming environment. :omg: regards, rIsHaBh

        J Offline
        J Offline
        Joey Bloggs
        wrote on last edited by
        #3

        It is possible to output text at any angle. None of the existing win32 controls will allow you to edit text at an angle. look thru MSDN for Rotating Lines of Text You can rotate TrueType fonts at any angle. This is useful for labeling charts and other illustrations. The following example rotates a string in 10-degree increments around the center of the client area by changing the value of the lfEscapement and lfOrientation members of the LOGFONT structure used to create the font. On top of this you would need to draw a rotated control on a transparent window and deal with hit testing etc and passing mouse events to underlying controls 'shadowed' by the transparent window (which would still have normal horizontal and vertical orientation). All in all not work the effort :)

        R 1 Reply Last reply
        0
        • J Joey Bloggs

          It is possible to output text at any angle. None of the existing win32 controls will allow you to edit text at an angle. look thru MSDN for Rotating Lines of Text You can rotate TrueType fonts at any angle. This is useful for labeling charts and other illustrations. The following example rotates a string in 10-degree increments around the center of the client area by changing the value of the lfEscapement and lfOrientation members of the LOGFONT structure used to create the font. On top of this you would need to draw a rotated control on a transparent window and deal with hit testing etc and passing mouse events to underlying controls 'shadowed' by the transparent window (which would still have normal horizontal and vertical orientation). All in all not work the effort :)

          R Offline
          R Offline
          r i s h a b h s
          wrote on last edited by
          #4

          it comes around to the same question....how do i create rotated control? rIsHaBh

          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