Main Menu

Recent posts

#21
José Roca Software / Re: CDicObj
Last post by hajubu - May 02, 2026, 06:45:56 PM
hi,
I just added a 'Little'  and had working output result:
'REMARK I did not use #cmdline option in Tiko !!! do NOT use -'s gui' for an ' -s console'
'I prefer to set the pref. to win console64  (shift-f7 ....) and in the basic - env - compiler pref  to ' using cmd windows '

'!!!!!! IF you did (-s gui) on a console  -check- you have to kill the running application manually via Taskmanager
' ALSO with the  'SLEEP at the end - do not forget to close it manually.
----------------
Arial
42926416
0
1662031610
29243
42926416
0
42934288
0
... and_eight_more_zeros
-------------------------
'CdicObj_RK_sample_onConsole
'REMARK I did not use #cmdline option in Tiko !!! do NOT use -'s gui' for an ' -s console'

'#cmdline "-s console"   ' console application
''''''''''''''''''''''''''''''#cmdline "-s gui"       ' gui application
'#cmdline "resource.rc"  ' resource file
'REMARK
#include once "AfxNova\CdicObj.inc"
'
' then the Type...End section/region
Type FontDescriptor
.......................................
Type End
'
'then a copy of your 'code' region p to the last print statement
DIM uDescriptor      As FontDescriptor
DIM uDescriptor1      As FontDescriptor
DIM oDicObj            AS CDicObj
DIM sDescriptor AS STRING * LEN(UDescriptor)
DIM sDescriptor1 AS STRING

    uDescriptor.FontName = "Arial"
    uDescriptor.FontID = 1
'......up_to....
print str(uDescriptor1.FontUnderlinePosition)
'
'THEN a
SLEEP
' to ensure halting the console output ... waiting for a needed key <Enter>



#22
José Roca Software / Re: CDicObj
Last post by Richard Kelly - May 02, 2026, 04:40:17 PM
I'm getting a little closer using:

DIM uDescriptor       As FontDescriptor
 DIM uDescriptor1       As FontDescriptor
 DIM oDicObj            AS CDicObj
 DIM sDescriptor AS STRING * LEN(UDescriptor)
 DIM sDescriptor1 AS STRING
 
    uDescriptor.FontName = "Arial"
    uDescriptor.FontID = 1
    uDescriptor.FontStyle = 1
    uDescriptor.FontReferenced = 0
    uDescriptor.FontAscent = 905
    uDescriptor.FontCapHeight = 728
    uDescriptor.FontDescent = -210
    uDescriptor.FontFlags = 32
    uDescriptor.FontRectLeft = -666
    uDescriptor.FontRectTop = -210
    uDescriptor.FontRectRight = 2000
    uDescriptor.FontRectBottom = 728
    uDescriptor.FontItalicAngle = 0
    uDescriptor.FontStemV = 44
    uDescriptor.FontWeight = 400
    uDescriptor.FontUnderlineThickness = 73
    uDescriptor.FontUnderlinePosition = -106
   
    memcpy (StrPtr(sDescriptor), @uDescriptor, LEN(UDescriptor))
   
    oDicObj.Add("F1",sDescriptor)
    sDescriptor1 = oDicObj.Item("F1")
   
    memcpy (@uDescriptor1, StrPtr(sDescriptor1), LEN(uDescriptor1))
   
    print uDescriptor1.FontName
    print str(uDescriptor1.FontID)
    print str(uDescriptor1.FontStyle)
    print str(uDescriptor1.FontReferenced)
    print str(uDescriptor1.FontAscent)
    print str(uDescriptor1.FontCapHeight)
    print str(uDescriptor1.FontDescent)
    print str(uDescriptor1.FontFlags)
    print str(uDescriptor1.FontRectLeft)
    print str(uDescriptor1.FontRectTop)
    print str(uDescriptor1.FontRectRight)
    print str(uDescriptor1.FontRectBottom)
    print str(uDescriptor1.FontItalicAngle)
    print str(uDescriptor1.FontStemV)
    print str(uDescriptor1.FontWeight)
    print str(uDescriptor1.FontUnderlineThickness)
    print str(uDescriptor1.FontUnderlinePosition)

I'm not getting back what I sent in. More analysis needed.
#23
José Roca Software / Re: CDicObj
Last post by Richard Kelly - May 02, 2026, 01:55:52 PM
I'll study things a bit. I've reached way back to PowerBasic days and I'm looking for replacements for LinkListCollection and PowerCollection.

What I'm trying to figure out is how to add a custom type like:

Type FontDescriptor
    FontName                As ZSTRING * 30
    FontID                  As Long
    FontStyle               As Long
    FontReferenced          As Long
    FontAscent              As Long
    FontCapHeight           As Long
    FontDescent             As Long
    FontFlags               As Long
    FontRectLeft            As Long
    FontRectTop             As Long
    FontRectRight           As Long
    FontRectBottom          As Long
    FontItalicAngle         As Double
    FontStemV               As Long
    FontWeight              As Long
    FontUnderlineThickness  As Long
    FontUnderlinePosition   As Long
    FontObject              As Long
    FontWidthObject         As Long
    FontDescriptorObject    As Long
 End Type
#24
José Roca Software / Re: CDicObj
Last post by hajubu - May 02, 2026, 12:33:26 PM
Hi Richard, here my Tip for an short example , show in J.R. docs folder of AfxNova-Main (Github)

CDicObj

can be  found in ..\docs\Windows\Windows Script\CDicObj Class.md

b.r. Hans (hajubu)

PS: see also the full .md collection as an HTML-Webview , which can be integrated in the Tiko as an help tool.

docs-as-Html for Tiko1.3/AfxNova

find it here in this  Support Forum -- PlanetSquires Software --# Tiko 1.3 and AfxNova Docs as integrated HelpTool   #10
--> CDicObj Class
-->
CDicObj is an associative array of variants. Each item is associated with a unique key. The key is used to retrieve an individual item.

Example
' // Creates an instance of the CDicObj class
DIM pDic AS CDicObj

' // Adds some key, value pairs
pDic.Add "a", "Athens"
pDic.Add "b", "Belgrade"
pDic.Add "c", "Cairo" ..........and so on .....
#25
PlanetSquires Software / Re: Tiko 1.3 and AfxNova Docs ...
Last post by hajubu - May 02, 2026, 12:20:50 PM
it's me - with todays (26-05-02) kumulative.update based on

AfxNova_260501_213556_08e8403::  doc-updates (GDi Plus Objects, GDi Plus ...)
which follows the related uploads in Examples,Template AND AfxNova-files.

b.r. Hans

--> please consider to download also the AfxNova-main to be  synchronized with  AfxNova-files
--> unzip to folder AfxNovaWeb and try to start with the index (AfxNova_idx. or AfxNovaTest_idx)
--> it runs also on (linux) web-server without changes

--> do not forget , to adapt the AfxNovaWeb.ini for your $env:xxx
      if using AfxNova_WebView2.bas (which is directly adapted from CW_Webview2.bas
      (see J.R. examples folder or my added template.zip)
#26
José Roca Software / CDicObj
Last post by Richard Kelly - May 02, 2026, 04:21:59 AM
I have a custom TYPE I want to put into a dictionary with a string key. Are any examples available?
#27
José Roca Software / Re: Proof of Concept Tiko and ...
Last post by José Roca - April 30, 2026, 01:23:53 AM
I only use STRING when I need to store binary data that can contain embeded nulls. DWSTRING extends WSTRING and has a BYREF CONST AS WSTRING cast that makes FreeBasic to believe that it is working with a WSTRING, so all the FreeBasic's intrinsic functions and operators accept it. It also uses the same structure of its descriptor as STRING to make STRPTR to work with it.
#28
José Roca Software / Re: Proof of Concept Tiko and ...
Last post by Richard Kelly - April 29, 2026, 09:31:15 PM
All FB STRING declarations replaced with DWSTRING. Everything works as expected.
#29
José Roca Software / Re: Proof of Concept Tiko and ...
Last post by Richard Kelly - April 29, 2026, 08:53:58 PM
Good point Jose. I'll start with taking my cCalendar class and replacing all STRING with DWSTRING.
#30
José Roca Software / Re: Proof of Concept Tiko and ...
Last post by José Roca - April 29, 2026, 04:33:19 PM
If you ever need to use unicode strings, just change AS STRING to AS DWSTRING. AfxNova is fully Unicode, so you're already using Unicode without knowing it. This is because DWSTRING does the conversions automatically and works transparently with all the intrinsic functions and operators of FreeBasic.