Click to See Complete Forum and Search --> : Is it possible to rotate windows?


Damir
June 30th, 1999, 01:28 PM
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

June 30th, 1999, 03:33 PM
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 christophe.ganivet@seee-sa.fr
Good luck !
Christophe

Paul McKenzie
June 30th, 1999, 03:42 PM
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

Damir
June 30th, 1999, 06:35 PM
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

Gomez Addams
June 30th, 1999, 07:45 PM
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

herbieII
June 30th, 1999, 10:07 PM
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

chris law
July 1st, 1999, 01:15 AM
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

Paul McKenzie
July 1st, 1999, 10:15 AM
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

Damir
July 1st, 1999, 12:07 PM
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