Autor | Thema: API: Probleme mit | | Datum:09.10.02 13:03 
(webmaster@nvse.de) | |
Hi zusammen,
ich bastle gerade an einem kleinen Programm zur Datenbankverwaltung und möchte hier wie es bei Access (bitte nicht schlagen) üblich ist eine kleine Navigationsleiste einbauen - Ergo die Buttons für "|<", "<", [Satz#], ">" und ">|". Dabei soll die Satznummer im jeweiligen Feld natürlich zentriert angezeigt werden. Profan² unterstützt ja standardmäßig "nur" normale Editfelder, also wollte ich mir über Def und @Control selbst etwas zusammenbasteln. Das Ding sollte logischerweise @CreateCEdit heißen und mein Ansatz war der folgende:
Def @CreateCEdit(6) Control("EDIT",@$(2),$50000001,@%(3),@%(4),@%(5),@%(6),@$(1),1000,%HINSTANCE)
Damit bekomme ich zwar ein Edit, in dem der Inhalt zentriert dargestellt wird, nur fehlt mir dummerweise der Rand dazu (also habe ich im Prinzip nur ein weißes Feld). Ich habe alternativ auch schon $50400001 und $50800001 ausprobiert - 4 führt zu einem einfachen schwarzen Rahmen (praktisch wie in den 16-Bit-Version), mit $508..... wird das ganze optisch als Button dargestellt.
Hat jemand von Euch eine Idee? Die Website von Gerhard Putschalka habe ich mir wie auch einige andere Ressourcen schon angesehen, bin dort aber nicht weitergekommen.
Danke im Voraus und Grüße,
Heiko
|
| | Datum:09.10.02 14:35 
| |
Hi,
hinter %HInstance kannst du noch einen Parameter angeben, nämlich die Extended WindowStyles, soviel ich weiß.
Ab welcher Profanversion der zusätzliche Parameter gilt, kann ich leider nicht sagen...
Extended Window-Styles (Zahlenwerte unten):
WS_EX_ABSPOSITION
Specifies that a window has an absolute position. That is, the window does not move when the working area moves.
WS_EX_ACCEPTFILES
Specifies that a window created with this style accepts drag-drop files.
WS_EX_APPWINDOW
Windows 95 only: Forces a top-level window onto the application taskbar when the window is minimized.
WS_EX_CLIENTEDGE
Specifies that a window has a border with a sunken edge.
WS_EX_CONTEXTHELP
Includes a question mark in the title bar of the window. When the user clicks the question mark, the cursor changes to a question mark with a pointer. If the user then clicks a child window, the child receives a WM_HELP message. The child window should pass the message to the parent window procedure, which should call the WinHelp function using the HELP_WM_HELP command. The Help application displays a pop-up window that typically contains help for the child window.
WS_EX_CONTROLPARENT
Windows 95 only: Allows the user to navigate among the child windows of the window by using the TAB key.
WS_EX_DLGMODALFRAME
Creates a window that has a double border the window can, optionally, be created with a title bar by specifying the WS_CAPTION style in the dwStyle parameter.
WS_EX_LEFT
Windows 95 only: Window has generic "left-aligned" properties. This is the default.
WS_EX_LEFTSCROLLBAR
Windows 95 only: If the shell language is Hebrew, Arabic, or another language that supports reading order alignment, the vertical scroll bar (if present) is to the left of the client area. For other languages, the style is ignored and not treated as an error.
WS_EX_LTRREADING
Windows 95 only: The window text is displayed using Left to Right reading-order properties. This is the default.
WS_EX_MDICHILD
Creates an MDI child window.
WS_EX_NOPARENTNOTIFY
Specifies that a child window created with this style does not send the WM_PARENTNOTIFY message to its parent window when it is created or destroyed.
WS_EX_OVERLAPPEDWINDOW
Windows 95 only: Combines the WS_EX_CLIENTEDGE and WS_EX_WINDOWEDGE styles.
WS_EX_PALETTEWINDOW
Windows 95 only: Combines the WS_EX_WINDOWEDGE, WS_EX_TOOLWINDOW, and WS_EX_TOPMOST styles.
WS_EX_RIGHT
Windows 95 only: Window has generic "right-aligned" properties. This depends on the window class. This style has an effect only if the shell language is Hebrew, Arabic, or another language that supports reading order alignment otherwise, the style is ignored and not treated as an error.
WS_EX_RIGHTSCROLLBAR
Windows 95 only: Vertical scroll bar (if present) is to the right of the client area. This is the default.
WS_EX_RTLREADING
Windows 95 only: If the shell language is Hebrew, Arabic, or another language that supports reading order alignment, the window text is displayed using Right to Left reading-order properties. For other languages, the style is ignored and not treated as an error.
WS_EX_STATICEDGE
Windows 95 only: Creates a window with a three-dimensional border style intended to be used for items that do not accept user input.
WS_EX_TOOLWINDOW
Windows 95 only: Creates a tool window that is, a window intended to be used as a floating toolbar. A tool window has a title bar that is shorter than a normal title bar, and the window title is drawn using a smaller font. A tool window does not appear in the task bar or in the window that appears when the user presses ALT+TAB.
WS_EX_TOPMOST
Specifies that a window created with this style should be placed above all non-topmost windows and should stay above them, even when the window is deactivated. To add or remove this style, use the SetWindowPos function.
WS_EX_TRANSPARENT
Specifies that a window created with this style is to be transparent. That is, any windows that are beneath the window are not obscured by the window. A window created with this style receives WM_PAINT messages only after all sibling windows beneath it have been updated.
WS_EX_WINDOWEDGE
Windows 95 only: Specifies that a window has a border with a raised edge.
als Zahlenwerte:
WS_EX_DLGMODALFRAME = 1
WS_EX_NOPARENTNOTIFY = 4
WS_EX_TOPMOST = 8
WS_EX_ACCEPTFILES = $10
WS_EX_TRANSPARENT = $20
WS_EX_MDICHILD = $40
WS_EX_TOOLWINDOW = $80
WS_EX_WINDOWEDGE = $100
WS_EX_CLIENTEDGE = $200
WS_EX_CONTEXTHELP = $400
WS_EX_RIGHT = $1000
WS_EX_LEFT = 0
WS_EX_RTLREADING = $2000
WS_EX_LTRREADING = 0
WS_EX_LEFTSCROLLBAR = $4000
WS_EX_RIGHTSCROLLBAR = 0
WS_EX_CONTROLPARENT = $10000
WS_EX_STATICEDGE = $20000
WS_EX_APPWINDOW = $40000
WS_EX_OVERLAPPEDWINDOW = WS_EX_WINDOWEDGE or WS_EX_CLIENTEDGE
WS_EX_PALETTEWINDOW = WS_EX_WINDOWEDGE or WS_EX_TOOLWINDOW or WS_EX_TOPMOST
|
| | Datum: 09.10.02 15:26 
(webmaster@nvse.de) | |
Hi Frank,
tausend Dank für die Info!!!! Ich nutze Profan in der 6.6, da ist der Punkt aber in der Hilfe noch nicht dokumentiert und somit bin ich auch nicht weitergekommen :-/
Zum Glück gibt es ja seit eh und je die aktuelle Hilfedatei auf der Website zum Download, da war dieser Parameter zwar auch nicht weiter erklärt, aber zumindest aufgeführt und mit dem Hinweis "ab Profan 6.6" versehen.
Jetzt klappt mit dem Befehl
let mw_fcurrec%=@Control("EDIT","1",$50000001,220,34,30,21,%HWND,1000,%HINSTANCE,$200)
alles absolut einwandfrei :)
Danke nochmals & Gruß,
Heiko
|
|
|