CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9
  1. #1
    Join Date
    Jun 1999
    Posts
    6

    Is it possible to rotate windows?


    Application that I am working on, displays things on monitor rotated for 90 degrees. I have to write a GUI for it. Anybody has any ideas?

    Damir


  2. #2
    Guest

    Re: Is it possible to rotate windows?

    Hi,
    I posted the same question 3 weeks ago and I never had any answer.
    I've resolved some problem using control like ButtonMaker and Mabry Rotext for button and label rotation but my biggest problem is how to rotate a simple CListBox. I never succeeded and I'm still trying to create my own Listbox with a CView window and using font rotation (LOGFONT struct). But scrolling, item selection, ... are a huge problem for me !
    I tried to find some manufactuer providing video rotation drivers but no result (I only found one under windows 3.11).
    If you have some information, PLEASE, send it to me !
    If you have any question, mail me to [email protected]
    Good luck !
    Christophe



  3. #3
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Is it possible to rotate windows?

    Doesn't the monitor come with a video driver for Windows? I would hope that it did, since *no* software company would have the time, money, and resources to rewrite their apps for this monitor. If it didn't come with a driver, I bet that monitor company is out of business (or has discontinued the model).

    Regards,

    Paul McKenzie




  4. #4
    Join Date
    Jun 1999
    Posts
    6

    Re: Is it possible to rotate windows?

    Well, that monitor has drivers and it works fine, but that is not the question. My problem is that I have
    to rotate the monitor for 90 degs because my application needs 'portrait' page. Now I have somehow to
    rotate everything I am displaying there, which means windows.

    Damir


  5. #5
    Join Date
    May 1999
    Location
    Oregon, USA
    Posts
    302

    Re: Is it possible to rotate windows?

    If I were in your position I would search more for a hardware-oriented solution to
    this problem. You are going to end up spending an immense amount of time
    developing and debugging the software required to display everything rotated
    by ninety degrees.

    Aren't there monitors that can swivel to portrait and landscape positions ?
    There are probably monitors that have portrait-type dimensions also.

    Best Of Luck



  6. #6
    Join Date
    May 1999
    Location
    WA
    Posts
    236

    Re: Is it possible to rotate windows?

    Look at DualViewMDI in the Codeguru C++ & MFC Source Files for June, 19, 1999 DVMView2.cpp OnDraw Method displays the text upside down.

    Roger L. McElfresh

  7. #7
    Join Date
    May 1999
    Posts
    69

    Re: Is it possible to rotate windows?

    I am no expert in this but some time ago i stumbled over world transformations which define a correlation between two dc's. There is a (i think) global dc too which corresponds to screen output. The world transformtion routines are capable of rotation, so I would try to change the highest (in the hierarchy) possible transformation and see what is changed on display...

    would be nice if you tell me whether works or not...

    chrislaw

  8. #8
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Is it possible to rotate windows?

    As Gomez has stated, if your application is a serious one, think about getting yourself a monitor that is made for this type of display that can swivel from portrait to landscape. This is what I thought you were referring to, since there are such monitors (and I've seen a few of them). You wouldn't need to rewrite software for landscape/portrait displays, since the drivers for those monitors handle everything automatically.

    Regards,

    Paul McKenzie


  9. #9
    Join Date
    Jun 1999
    Posts
    6

    It is possible to rotate windows!


    My application is serious one, but since it is made for a portable trainer, which has fixed LCD monitor,
    I don't think that swivel monitor could help.

    But, I solved it in the easiest possible way, by changing only one function call. There is a gui toolkit
    called FLTK, which uses windows GDI calls to draw its own widgets. So I found one class, variation
    of window class, which draws window content to memory DC first and then bitblt it to the screen. Only
    thing I did was that I changed BitBlt call to PlgBlt and made content rotates. According to windows doc,
    PlgBlt is implemented only on NT.
    I still have work to do on events coordinates transformation, so I want post any code for now.

    Damir Cosic


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured