PBOSL - Update 19.08.2005

Ankündigungen PureBasic oder die Community betreffend.
Benutzeravatar
ts-soft
Beiträge: 22292
Registriert: 08.09.2004 00:57
Computerausstattung: Mainboard: MSI 970A-G43
CPU: AMD FX-6300 Six-Core Processor
GraKa: GeForce GTX 750 Ti, 2 GB
Memory: 16 GB DDR3-1600 - Dual Channel
Wohnort: Berlin

PBOSL - Update 19.08.2005

Beitrag von ts-soft »

PBOSL - OpenSource Library-Sammlung für PureBasic Update

Code: Alles auswählen

|---------------------------------------------------------------------------------------|
|                                                                                       |
|                   PBOSL - PureBasic OpenSource Libraries (LGPL)                       |
|                                                                                       |
|---------------------------------------------------------------------------------------|
| Library (alphabetically)     | Prog.Language |       Coder      | Win | Linux | MacOS |
|------------------------------+---------------+------------------+-----+-------+-------|
| PBOSL_AnimSprite             |       C       |      Danilo      |  X  |   X   |   ?   |
| PBOSL_AppRunning             |      ASM      |       Rings      |  X  |       |       |
| PBOSL_Bignum                 |       PB      |       Rings      |  X  |       |       |
| PBOSL_BriefLZ                |       C       |   Joergen Ibsen  |  X  |   ?   |   ?   |
| PBOSL_CatchDebugOutput       |       PB      |       Rings      |  X  |       |       |
| PBOSL_CPUmonitor             |      ASM      |      Danilo      |  X  |       |       |
| PBOSL_Cryption               |       PB      |Mischa Brandt/Dige|  X  |       |       |
| PBOSL_DDE                    |       PB      |       Rings      |  X  |       |       |
| PBOSL_ExDataBase             |       PB      |       Rings      |  X  |       |       |
| PBOSL_ExPrinter              |       PB      |       Rings      |  X  |       |       |
| PBOSL_FASTFILE               |      ASM      |       Rings      |  X  |       |       |
| PBOSL_FastFileCRC32          |       PB      |       Rings      |  X  |       |       |
| PBOSL_FastFileMD5            |       PB      |       Rings      |  X  |       |       |
| PBOSL_FastFileText           |       PB      |       Rings      |  X  |       |       |
| PBOSL_GetExeNameFromSuffix   |       PB      |       Rings      |  X  |       |       |
| PBOSL_GetHWInfo              |      ASM      |       Rings      |  X  |       |       |
| PBOSL_GlobalSharedMemory     |       PB      |       Rings      |  X  |       |       |
| PBOSL_LoadDllMemory          |       C       |   Joachim Bauch  |  X  |       |       |
| PBOSL_MSXML3                 |       PB      |       Kiffi      |  X  |       |       |
| PBOSL_NTLog                  |       PB      |       Rings      |  X  |       |       |
| PBOSL_NTService              |       PB      |       Rings      |  X  |       |       |
| PBOSL_OOP                    |      ASM      |      Danilo      |  X  |       |       |
| PBOSL_Process                |       PB      |       Rings      |  X  |       |       |
| PBOSL_SkinWin                |       C       |      Danilo      |  X  |       |       |
| PBOSL_SkinWinFast            |       C       |      Danilo      |  X  |       |       |
| PBOSL_SQLite3                |       PB      |       Kiffi      |  X  |       |       |
| PBOSL_Timer                  |       C       |      Danilo      |  X  |       |       |
| PBOSL_ToolbarPro             |       C       |      Danilo      |  X  |       |       |
| PBOSL_TRYCATCH               |      ASM      | Sebastian Lackner|  X  |       |       |
| PBOSL_UInt64                 |       C       |       Rings      |  X  |   ?   |   ?   |
| PBOSL_VB_Helper              |       PB      |       Rings      |  X  |       |       |
| PBOSL_WinIO                  |       PB      |       Rings      |  X  |       |       |
|---------------------------------------------------------------------------------------|
| X = supported OS                                                                      |
| ? = possible, should compile (with modifications)                                     |
|---------------------------------------------------------------------------------------|
2 neue Libraries aufgenommen:
PBOSL_AppRunning (Rings)
PBOSL_MSXML3 (Kiffi)

Source ann PB3.94 angepasst:
PBOSL_ExPrinter (Strukturen)

Examples wurden erweitert, sowie kleinere Fehler in der Hilfe korrigiert

Alle Windows-Binaries mit PB3.94 neu erstellt.

Alle Downloads unter: http://pbosl.purearea.net

Ich habe mir erlaubt, den Link zu korrigieren. Kiffi
PureBasic 5.73 LTS | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Nutella hat nur sehr wenig Vitamine. Deswegen muss man davon relativ viel essen.
Bild
Benutzeravatar
ts-soft
Beiträge: 22292
Registriert: 08.09.2004 00:57
Computerausstattung: Mainboard: MSI 970A-G43
CPU: AMD FX-6300 Six-Core Processor
GraKa: GeForce GTX 750 Ti, 2 GB
Memory: 16 GB DDR3-1600 - Dual Channel
Wohnort: Berlin

Beitrag von ts-soft »

Sorry, wahr noch ein kleiner Fehler in den Dateinamen :oops: , jetzt sollten die richtigen Dateien kommen :)
PureBasic 5.73 LTS | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Nutella hat nur sehr wenig Vitamine. Deswegen muss man davon relativ viel essen.
Bild
Benutzeravatar
Pelagio
Beiträge: 424
Registriert: 11.11.2004 17:52
Computerausstattung: AMD Ryzen 5 7600 6-Core Prozessor 3.80 GHz
16,0 GB Arbeitsspeicher
Windows 11 Pro Betriebssystem
Wohnort: Bremen

Beitrag von Pelagio »

@ Guten Abend,

ich habe mir gerade das neue PBOSL heruntergezogen, auch die Beispielcodes. Da ich Annehme das ich über ExPrinter mein Papierformat (Orientation) ändern kann, wollte ich durch das Beispiel für ExPrinter die ausprobieren um so zu erkennen wie ich Arbeiten muss. Leider war es mir nicht möglich diesen Source vernümpftig zum laufen zu bringen. Eine Structure ist schon irgendwo Declariert, eine andere Structure ist wiederum ist nicht Declariert und habe ich das alles ausgemertzt, so wird der PrinterDialog nicht zurückgegeben.
Meine Frage, wiurden die BeispielCodes auch überarbeitet?
Wenn ich hier Probleme habe, so ist es sicherlich auch möglich das andere Beispiele auch nicht Funktionieren.
Benutzeravatar
ts-soft
Beiträge: 22292
Registriert: 08.09.2004 00:57
Computerausstattung: Mainboard: MSI 970A-G43
CPU: AMD FX-6300 Six-Core Processor
GraKa: GeForce GTX 750 Ti, 2 GB
Memory: 16 GB DDR3-1600 - Dual Channel
Wohnort: Berlin

Beitrag von ts-soft »

@Pelagio
Schönen Dank für den Hinweis :)

Alle Änderungen bezüglich der Strukturen wurden nur in Libs durchgeführt, das Testen aller Examples konnte ich mangels Helfer nicht durchführen. Auch eine Liste der geänderten Strukturen wurde bisher nicht veröffentlicht, so das damit zu Rechnen ist, das diverse Examples aller Art für PureBasic 3.94 angepaßt werden müssen. Wenn Ihr also noch weitere Fehler findet, bitte melden. Das Beispiel ExPrinter_Test.pb wurde jetzt gefixt. Für alle die die Examples schon geladen haben:

Code: Alles auswählen

; Extended Printer-Dialog and PageSetup Functions
;
;(C) 2002 by Siegfried Rings (-Codeguru-)

;These structures are not needed
; but i leave them to know how the Orignal are typed
;
Structure PRINTDLG_TYPE
    lStructSize.l 
    hwndOwner.l 
    hDevMode.l 
    hDevNames.l 
    hdc.l 
    Flags.l 
    nFromPage.w 
    nToPage.w 
    nMinPage.w 
    nMaxPage.w 
    nCopies.w 
    hInstance.l 
    lCustData.l 
    lpfnPrintHook.l 
    lpfnSetupHook.l 
    lpPrintTemplateName.s 
    lpSetupTemplateName.s 
    hPrintTemplate.l 
    hSetupTemplate.l 
EndStructure
Structure DEVNAMES_TYPE
    wDriverOffset.w 
    wDeviceOffset.w 
    wOutputOffset.w 
    wDefault.w 
    extra.b[100]
EndStructure
Structure DEVMODE_TYPE
    dmDeviceName.b[32]
    dmSpecVersion.w 
    dmDriverVersion.w 
    dmSize.w 
    dmDriverExtra.w 
    dmFields.l 
    dmOrientation.w 
    dmPaperSize.w 
    dmPaperLength.w 
    dmPaperWidth.w 
    dmScale.w 
    dmCopies.w 
    dmDefaultSource.w 
    dmPrintQuality.w 
    dmColor.w 
    dmDuplex.w 
    dmYResolution.w 
    dmTTOption.w 
    dmCollate.w 
    dmFormName.b[32]
    dmUnusedPadding.w 
    dmBitsPerPel.w 
    dmPelsWidth.l 
    dmPelsHeight.l 
    dmDisplayFlags.l 
    dmDisplayFrequency.l 
EndStructure

;These are the constants For the PrinterDialog

    #DM_DUPLEX = $1000
    #DM_ORIENTATION = $1

    #PD_ALLPAGES = $0
    #PD_COLLATE = $10
    #PD_DISABLEPRINTTOFILE = $80000
    #PD_ENABLEPRINTHOOK = $1000
    #PD_ENABLEPRINTTEMPLATE = $4000
    #PD_ENABLEPRINTTEMPLATEHANDLE = $10000
    #PD_ENABLESETUPHOOK = $2000
    #PD_ENABLESETUPTEMPLATE = $8000
    #PD_ENABLESETUPTEMPLATEHANDLE = $20000
    #PD_HIDEPRINTTOFILE = $100000
    #PD_NONETWORKBUTTON = $200000
    #PD_NOPAGENUMS = $8
    #PD_NOSELECTION = $4
    #PD_NOWARNING = $80
    #PD_PAGENUMS = $2
    #PD_PRINTSETUP = $40
    #PD_PRINTTOFILE = $20
    #PD_RETURNDC = $100
    #PD_RETURNDEFAULT = $400
    #PD_RETURNIC = $200
    #PD_SELECTION = $1
    #PD_SHOWHELP = $800
    #PD_USEDEVMODECOPIES = $40000
    #PD_USEDEVMODECOPIESANDCOLLATE = $40000



; Structure PAGESETUPDLG
;     lStructSize.l
;     hwndOwner.l
;     hDevMode.l
;     hDevNames.l
;     flags.l
;     ptPaperSize.POINT
;     rtMinMargin.RECT
;     rtMargin.RECT
;     hInstance.l
;     lCustData.l
;     lpfnPageSetupHook.l
;     lpfnPagePaintHook.l
;     lpPageSetupTemplateName.s
;     hPageSetupTemplate.l
; EndStructure
#PSD_DEFAULTMINMARGINS ;Sets the minimum values that the user can specify For the page margins To be the minimum ;margins allowed by the printer. This is the default. This flag is ignored If the #PSD_MARGINS And PSD_MINMARGINS flags are also specified.
#PSD_DISABLEMARGINS ;Disables the margin controls, preventing the user from setting the margins.
#PSD_DISABLEORIENTATION;Disables the orientation controls, preventing the user from setting the page orientation.
#PSD_DISABLEPAGEPAINTING;Prevents the dialog box from drawing the contents of the sample page. If you enable a ;PagePaintHook hook procedure, you can still draw the contents of the sample page.
#PSD_DISABLEPAPER ;Disables the paper controls, preventing the user from setting page parameters such as the ;Mpaper size And source.
#PSD_DISABLEPRINTER;Disables the Printer button, preventing the user from invoking a dialog box that contains ;additional printer setup information.
#PSD_ENABLEPAGEPAINTHOOK ;Enables the hook Procedure specified in the lpfnPagePaintHook member. 
#PSD_ENABLEPAGESETUPHOOK ;Enables the hook Procedure specified in the lpfnPageSetupHook member.
#PSD_ENABLEPAGESETUPTEMPLATE;Indicates that the hInstance And lpPageSetupTemplateName members specify a dialog box ;template To use in place of the Default template.
#PSD_ENABLEPAGESETUPTEMPLATEHANDLE ;Indicates that the hPageSetupTemplate member identifies a Data block that contains a ;preloaded dialog box template. The system ignores the lpPageSetupTemplateName member If ;this flag is specified. 
#PSD_INHUNDREDTHSOFMILLIMETERS ;Indicates that hundredths of millimeters are the unit of measurement For margins And ;paper size. The values in the rtMargin, rtMinMargin, And ptPaperSize members are in ;hundredths of millimeters. You can set this flag on input To override the Default unit of ;measurement For the user's locale. When the function returns, the dialog box sets this ;flag To indicate the units used.
#PSD_INTHOUSANDTHSOFINCHES ;Indicates that thousandths of inches are the unit of measurement For margins And paper ;size. The values in the rtMargin, rtMinMargin, And ptPaperSize members are in thousandths ;of inches. You can set this flag on input To override the Default unit of measurement For ;the user's locale. When the function returns, the dialog box sets this flag To indicate ;the units used.
#PSD_INWININIINTLMEASURE ;Not implemented.
#PSD_MARGINS ;Causes the system To use the values specified in the rtMargin member as the initial widths ;For the left, top, right, And bottom margins. If PSD_MARGINS is Not set, the system sets ;the initial widths To one inch For all margins. 
#PSD_MINMARGINS;Causes the system To use the values specified in the rtMinMargin member as the minimum ;allowable widths For the left, top, right, And bottom margins. The system prevents the ;user from entering a width that is less than the specified minimum. If PSD_MINMARGINS is ;Not specified, the system sets the minimum allowable widths To those allowed by the ;printer. 
#PSD_NOWARNING ;Prevents the system from displaying a warning message when there is no Default printer.
#PSD_RETURNDEFAULT;PageSetupDlg does Not display the dialog box. Instead, it sets the hDevNames And hDevMode ;members To handles To DEVMODE And DEVNAMES structures that are initialized For the system ;Default printer. PageSetupDlg returns an error If either hDevNames Or hDevMode is Not ;NULL.
#PSD_SHOWHELP ;Causes the dialog box To display the Help button. The hwndOwner member must specify the ;window To receive the HELPMSGSTRING registered messages that the dialog box sends when ;the user clicks the Help button.


#GMEM_MOVEABLE = $2
#GMEM_ZEROINIT = $40


hwnd= OpenWindow(0, 10, 10, 100, 200, #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget, "PureBasic Window")
If hwnd

 pd.PRINTDLG
 pd\nFromPage = 3 
 pd\nToPage = 5
 pd\nMinPage = 1 
 pd\nMaxPage = 100 
 pd\nCopies = 13
                          ;If you set Flags=#PD_RETURNDEFAULT the Requester i snewer called
 pd\Flags =  0;#PD_RETURNDC |#PD_HIDEPRINTTOFILE |#PD_PAGENUMS| #PD_USEDEVMODECOPIES ;    #PD_ALLPAGES ;#PD_RETURNDC ;| #PD_PRINTSETUP 
 DevModeCopy.DEVMODE
 Result=PrintDialog(hwnd,pd,DevModeCopy)
 If Result
  Info.s="" 
  Info.s=Info.s + "     Copies="+Str(DevModeCopy\dmCopies)+Chr(13)
  Info.s=Info.s + "Orientation="+Str(DevModeCopy\dmOrientation)+Chr(13)
  Info.s=Info.s + "   FromPage="+Str(pd\nFromPage  ) +Chr(13)
  Info.s=Info.s + "     ToPage="+Str(pd\nToPage ) +Chr(13)
  Info.s=Info.s + "    Quality="+Str(DevModeCopy\dmPrintQuality)+Chr(13) 
  Info.s=Info.s + "      Color="+Str(DevModeCopy\dmColor)+Chr(13) 
  MessageRequester("Info",Info,0) 
 Else
  MessageRequester("Info","Aborted",0)
 EndIf 

 PGSDLG.PAGESETUPDLG
 PGSDLG\lStructSize=SizeOf(PAGESETUPDLG)
 PGSDLG\hwndOwner=hwnd
 PGSDLG\hDevMode=0;DevModeCopy
 PGSDLG\rtMargin\left=3000
 PGSDLG\hInstance=0 ;fails -> GetModuleHandle_(0)
 
 PGSDLG\flags=#PSD_MARGINS|#PSD_DISABLEPRINTER 
 Result=PageSetupDialog(PGSDLG)

 Info.s=         "     Result="+Str(Result)+Chr(13)
 Info.s=Info.s + "      Flags="+Str(PGSDLG\flags)+Chr(13)
 Info.s=Info.s + " PapersizeX="+Str(PGSDLG\ptPaperSize\x)+" PapersizeY="+Str(PGSDLG\ptPaperSize\y)+Chr(13)
 Info.s=Info.s + "  MinMargin="+Str(PGSDLG\rtMinMargin\left)+":"+Str(PGSDLG\rtMinMargin\top)+":"+Str(PGSDLG\rtMinMargin\right)+":"+Str(PGSDLG\rtMinMargin\bottom)+Chr(13)
 Info.s=Info.s + "     Margin="+Str(PGSDLG\rtMargin\left)+":"+Str(PGSDLG\rtMargin\top)+":"+Str(PGSDLG\rtMargin\right)+":"+Str(PGSDLG\rtMargin\bottom)+Chr(13)
 MessageRequester("Info",Info,0) 
EndIf 

MessageRequester("Default Printer is",Getdefaultprinter(),0)
Setdefaultprinter("Ein Drucker aus den Systemeinstellungen")
MessageRequester("Aktueller Standard-Drucker",Getdefaultprinter(),0) 
PureBasic 5.73 LTS | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Nutella hat nur sehr wenig Vitamine. Deswegen muss man davon relativ viel essen.
Bild
Benutzeravatar
Kiffi
Beiträge: 10714
Registriert: 08.09.2004 08:21
Wohnort: Amphibios 9

Beitrag von Kiffi »

ts-soft und DarkDragon,

vielen lieben Dank für die Arbeit, die Ihr Euch für uns gemacht habt!

:allright:

Grüße ... Kiffi
a²+b²=mc²
Benutzeravatar
Pelagio
Beiträge: 424
Registriert: 11.11.2004 17:52
Computerausstattung: AMD Ryzen 5 7600 6-Core Prozessor 3.80 GHz
16,0 GB Arbeitsspeicher
Windows 11 Pro Betriebssystem
Wohnort: Bremen

Beitrag von Pelagio »

=)
Auch ich sage Dank für die schnelle Umsetzung von PBOSL auf den PB 3.94 Standard.
:?:
Trotzdem noch eine Frage zu dem von euch pepoosteten Source von EXPrinter:

Code: Alles auswählen

Result=PrintDialog(hwnd,pd,DevModeCopy)
Sollte an dieser Stelle nicht irgendetwas passieren?
Z.Bsp. ein Fenster aufgehen?
Ich glaube es wäre gut sich den Code noch einmal anzusehen!
Wenn ich das Programm starten ist das erste Fenster das BasisFenster (OpenWindow) und das zweite Fenster schon:

Code: Alles auswählen

MessageRequester("Info","Aborted",0)
Ich gehe davon aus, das dies nicht korrekt ist, ODER?
Benutzeravatar
ts-soft
Beiträge: 22292
Registriert: 08.09.2004 00:57
Computerausstattung: Mainboard: MSI 970A-G43
CPU: AMD FX-6300 Six-Core Processor
GraKa: GeForce GTX 750 Ti, 2 GB
Memory: 16 GB DDR3-1600 - Dual Channel
Wohnort: Berlin

Beitrag von ts-soft »

>> Sollte an dieser Stelle nicht irgendetwas passieren? Z.Bsp. ein Fenster aufgehen?
Ja, eigentlich schon :D , hab den Fehler gefunden und gefixed (hat nichts mit PB Update zu tun, sondern wahr schon länger da). Die entsprechenden PBOSL-Pakete wurden geupdated.

Hier noch ein Extra-Link, der nur die geänderte Lib und den zugehörigen Source enthält: http://purebasic.ts-soft-online.de/dl/e ... update.zip
PureBasic 5.73 LTS | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Nutella hat nur sehr wenig Vitamine. Deswegen muss man davon relativ viel essen.
Bild
DarkDragon
Beiträge: 6291
Registriert: 29.08.2004 08:37
Computerausstattung: Hoffentlich bald keine mehr
Kontaktdaten:

Beitrag von DarkDragon »

Kiffi hat geschrieben:ts-soft und DarkDragon,

vielen lieben Dank für die Arbeit, die Ihr Euch für uns gemacht habt!

:allright:

Grüße ... Kiffi
:mrgreen: Danke, aber remi_meier und Andre gebührt genauso Dank ;) .

[EDIT]
Beinahe hätte ich unser neuestes Mitglied vergessen: MVXA
Angenommen es gäbe einen Algorithmus mit imaginärer Laufzeit O(i * n), dann gilt O((i * n)^2) = O(-1 * n^2) d.h. wenn man diesen Algorithmus verschachtelt ist er fertig, bevor er angefangen hat.
Benutzeravatar
Kiffi
Beiträge: 10714
Registriert: 08.09.2004 08:21
Wohnort: Amphibios 9

Beitrag von Kiffi »

DarkDragon hat geschrieben: :mrgreen: Danke, aber remi_meier und Andre gebührt genauso Dank ;) .

[EDIT]
Beinahe hätte ich unser neuestes Mitglied vergessen: MVXA
Natürlich auch an Remi, Andre und MVXA ein dickes Dankeschön! :allright:

Kurzum: An das gesamte PBOSL-Team ein dreifaches Hipp-Hipp-Hurra!

Grüße ... Kiffi
a²+b²=mc²
Benutzeravatar
bluejoke
Beiträge: 1244
Registriert: 08.09.2004 16:33
Kontaktdaten:

Beitrag von bluejoke »

Dem schließ ich mich an!
Ich bin Ausländer - fast überall
Windows XP Pro SP2 - PB 4.00
Antworten