Paar Fragen

Started by Norbert Spoerl, January 26, 2012, 10:15:40 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Norbert Spoerl

Hi Theo,

mal 2 Fragen, um deren Beantwortung ich Dich bitte.

1. Was war der Anlaß für Dich, einen Thread mit einer Wunschliste für PBWin 11 aufzumachen?

2. Was hat es mit CWindow von Jose auf sich.

Gruß
Norbert
  •  

Theo Gottwald

Hallo Norbert,

zu 1. Ich wollte einfach mal hören ob die Leute was dazu zu sagen haben, oder ob ich "der Einzige bin" den das Thema interessiert.

zu. 2

CWindows ist eine Sammlung von Unterprogrammen, die es ermöglichen professionelle dpi-unabhängige GUI's mit PB zu programmieren. Da diese von PB Win unabhängig sind, kann man damit auch wenn man nur PBCC hat GUI's machen.
Der Einfachste Einstieg (den ich empfehle) ist der mit Firefly 3.5, das intern diese CWindows Class verwendet.

Norbert Spoerl

Hallo Theo,

Danke!

zu 1.
Okay, Wünsche gibt es ja immer. Ich dachte, daß es evtl. eine Aufforderung dazu von PB gab.
Rechnest Du mit einer neuen Version in naher Zukunft?

zu 2.
Was meinst Du mit dpi? -> Dots per inch?


  •  

José Roca

CWindow allows to write High DPI aware applications easily, but as it looks that most PBer's don't have a clear idea of what High DPI is, they doesn't use it properly.

This is a good article about the subject:
http://msdn.microsoft.com/en-us/library/windows/desktop/dd464660%28v=vs.85%29.aspx

It is in English and I guess that a Google translation to German will make it incrompehensible, but before attempting to solve a problem, you have to understand what the problem is.

Sorry, but I can't write in German.

  •  

Theo Gottwald

Hallo Norbert

verstehst du die Antwort von Jose?
Oder soll ich es dir übersetzen?

Norbert Spoerl

Thanx Jose, I understand your reply.

Theo, ist das so richtig?
1. Bei Displays mit einer hohen Auslösung (high dpi) gibt es Probleme mit der Darstellung von
    Oberflächenelementen (Schrift, Controls, usw.), wenn ganz normal programmiert wird (und
    das bei einer geringeren Auflösung).
2. Ich muß als Programmierer bestimmte Techniken anwenden, um das Problem zu vermeiden.
3. Trotzdem kann ich weiterhin die Möglichkeiten der GUI-Gestaltung der Win32-API nutzen.

Bei WPF von MS wird angegeben, daß die Controls nicht mehr mit Pixeln, sondern mit Teilen von
Inch (auf mm umrechenbar) definiert werden. Mein erster Gedanke war, daß CWindows andere
Controls unw. bereitstellt, die auch so definiert werden. Wenn dem nicht so ist, was macht
CWindow von Jose konkret?

Gruß

Norbert
  •  

José Roca

People are buying high resolution monitors today. As more resolution, smaller pixels. With high resolutions, the text becomes unreadable because it's very small, so you go to the control panel and increase the DPI (the number of dots per inch), and Windows scales the GUI elements of the operating system. You have to do the same in your programs that are High DPI aware. So, in a High DPI aware application, you're in reality working with dots per inch, not with absolute pixel values. If your program is not High DPI aware, Windows will run it virtualized, doing the scaling and letting you to believe that you're working with absolute pixel values, although you aren't. However, virtualization is a workaround that has a number of problems.

  •  

Norbert Spoerl

Jose, I understand the problem. What I do not know are this points.
- How I have to define the size of the elements of GUI?
- Which controls I can use for this new technic?

WPF uses divice independent units of 1/96 inch. The controls are based of vectors with DirectX. Has it something to do with it?
  •  

José Roca

If you use CWindow, you will use pixels and CWindow will take care of scaling to get resolution independence. You can use all the Wndows Common Controls and all Windows Custom Controls. For the Windows Common Controls there are appropriate methods: AddButton, AddTextBox, etc.; for Windows Custom Controls, you will use the AddControl method. You can't use DDT controls and statements.
  •  

Norbert Spoerl

Now it is more clear. But I have a problem with your comment "AddButton, AddTextBox, etc ... AddControl". Do you mean functions from .NET or ControlExtensions Class or what?

May I use CreateWindowEx further?



  •  

José Roca

These are methods of the CWindow class. I thought we were talking about it.
  •  

Norbert Spoerl

Hola Jose. Disculpa por favor mi falta de comprensión.

Is this right? With CWindow I am able to use all the normal GUI-elements of the WinApi like PBWin with SDK-style. Only the method of the generation of the controls is different.
  •  

José Roca

Right. DDT is a wrapper on top of the Windows dialog engine and CWindows a wrapper on top of CreateWindowEx. A sort of DDT for SDK programmers.
  •  

Norbert Spoerl

Cracias!

Now I am looking for the necessary files for CWindow. I can't find the right place for a download.

Additional:
The connection time to your web page was good/quickly today.
  •  

José Roca

It is part of the Windows API Headers package, not an insolated file.
See: http://www.jose.it-berater.org/smfforum/index.php?topic=4425.0
  •