Author Topic: Paar Fragen  (Read 8740 times)

0 Members and 1 Guest are viewing this topic.

Offline Norbert Spoerl

  • Newbie
  • *
  • Posts: 37
  • User-Rate: +1/-0
Paar Fragen
« on: January 26, 2012, 10:15:40 AM »
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

Offline Theo Gottwald

  • Administrator
  • Hero Member
  • *****
  • Posts: 919
  • User-Rate: +30/-4
    • it-berater
Re: Paar Fragen
« Reply #1 on: January 26, 2012, 10:45:13 AM »
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.

Offline Norbert Spoerl

  • Newbie
  • *
  • Posts: 37
  • User-Rate: +1/-0
Re: Paar Fragen
« Reply #2 on: January 26, 2012, 11:18:44 AM »
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?



Offline José Roca

  • Administrator
  • Hero Member
  • *****
  • Posts: 2481
  • User-Rate: +204/-0
Re: Paar Fragen
« Reply #3 on: January 26, 2012, 11:13:02 PM »
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.


Offline Theo Gottwald

  • Administrator
  • Hero Member
  • *****
  • Posts: 919
  • User-Rate: +30/-4
    • it-berater
Re: Paar Fragen
« Reply #4 on: January 27, 2012, 09:53:28 PM »
Hallo Norbert

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

Offline Norbert Spoerl

  • Newbie
  • *
  • Posts: 37
  • User-Rate: +1/-0
Re: Paar Fragen
« Reply #5 on: January 30, 2012, 12:38:44 PM »
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

Offline José Roca

  • Administrator
  • Hero Member
  • *****
  • Posts: 2481
  • User-Rate: +204/-0
Re: Paar Fragen
« Reply #6 on: January 30, 2012, 01:36:02 PM »
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.


Offline Norbert Spoerl

  • Newbie
  • *
  • Posts: 37
  • User-Rate: +1/-0
Re: Paar Fragen
« Reply #7 on: January 30, 2012, 03:23:51 PM »
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?

Offline José Roca

  • Administrator
  • Hero Member
  • *****
  • Posts: 2481
  • User-Rate: +204/-0
Re: Paar Fragen
« Reply #8 on: January 30, 2012, 03:51:45 PM »
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.

Offline Norbert Spoerl

  • Newbie
  • *
  • Posts: 37
  • User-Rate: +1/-0
Re: Paar Fragen
« Reply #9 on: January 30, 2012, 04:17:50 PM »
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?



 

Offline José Roca

  • Administrator
  • Hero Member
  • *****
  • Posts: 2481
  • User-Rate: +204/-0
Re: Paar Fragen
« Reply #10 on: January 30, 2012, 04:54:39 PM »
These are methods of the CWindow class. I thought we were talking about it.

Offline Norbert Spoerl

  • Newbie
  • *
  • Posts: 37
  • User-Rate: +1/-0
Re: Paar Fragen
« Reply #11 on: January 31, 2012, 12:06:44 PM »
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.

Offline José Roca

  • Administrator
  • Hero Member
  • *****
  • Posts: 2481
  • User-Rate: +204/-0
Re: Paar Fragen
« Reply #12 on: January 31, 2012, 12:48:57 PM »
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.

Offline Norbert Spoerl

  • Newbie
  • *
  • Posts: 37
  • User-Rate: +1/-0
Re: Paar Fragen
« Reply #13 on: February 01, 2012, 10:57:57 AM »
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.

Offline José Roca

  • Administrator
  • Hero Member
  • *****
  • Posts: 2481
  • User-Rate: +204/-0
Re: Paar Fragen
« Reply #14 on: February 01, 2012, 11:44:07 AM »
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