Forum | | | | - Page 1 - |
| Stephan Sonneborn | Hi, in the EMPTY32.DLL have I testweise with the ResourceBuilder two Strings eingefügt:
once in the Language german $0407 or. 1031:
and once in the Language english $0809 or. 2057:
The DLL have I over USEDLL eingebunden. whom Text point I so To:
DE_Text$ = RES("GetStrings", PRGDLL&, 100, $00407)
EN_Text$ = RES("GetStrings", PRGDLL&, 100, $00809)
but I get The Error Message "String-Ressource not found: #100".
What is wrong? |
| | | XProfan X4Schöne Grüße aus Wittgenstein von Stephan Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz | 09/28/20 ▲ |
| |
| | | | | - Page 1 - |
| Georg Teles | me falls on, that
PRGName$ = RES("GetStrings", PRGDLL&, "#100", $00407)
one aray zurückgibt, but I get it neither there, it auszulesen
so functions it, but I understand not Why
Declare PRGNameN$[]'-------------------------------------#
PRGNameN$[] = RES("GetStrings", PRGDLL&, "#7", $00407)'--#
PRGName$ = PRGNameN$[4]'---------------------------------#
whole code
'*******************************************************************************************************'
'* Program: Vokabeltrainer *'
''******************************************************************************************************'
'* Version: V0.01 *'
'* stood: 28.09.2020 *'
'* Info: Vokabeltrainer *'
'*******************************************************************************************************'
'*******************************************************************************************************'
'* Klassendefinition *'
'*******************************************************************************************************'
CLASS Vokabel = word$(21), \
Uebersetzung$(21), \
Genus$(2), \
Casus$(13), \
Numerus$(11), \
Verb1$(21), \
Verb22$(21), \
Verb3$(21), \
Lesson$(13)', \
' Anlegen&, \
' import@, \
' export@, \
' Vorlesen@
'*******************************************************************************************************'
'*******************************************************************************************************'
'* Variablendeklaration *'
'*******************************************************************************************************'
'*- Program -*'
DECLARE PRGDLL&
DECLARE PrgName$
DECLARE x!, xx!, y!, yy!
'*******************************************************************************************************'
'*- dialog -*'
DECLARE DlgText&[5,30], DlgText$[5,30]
DECLARE DlgEdit&[5,30]
DECLARE ToolBar&, ToolbarIcons& , TabControl&[5]
'*******************************************************************************************************'
'*- Vobaln -*'
DECLARE concept#
DECLARE String Texts[]
'*******************************************************************************************************'
'*******************************************************************************************************'
'* Variablendimensionierung *'
'*******************************************************************************************************'
DIM concept#, Vokabel
'*******************************************************************************************************'
'*******************************************************************************************************'
'* Wertzuweisungen *'
'*******************************************************************************************************'
PRGDLL& = USEDLL("Vokabeln_32.DLL")
'PRGName$ = RES("GetStrings", PRGDLL&, "#100", $00407)
'PRGName$ = EXTSTRING$(PRGDLL&, 100)
Declare PRGNameN$[]'-------------------------------------#
PRGNameN$[] = RES("GetStrings", PRGDLL&, "#7", $00407)'--#
PRGName$ = PRGNameN$[4]'---------------------------------#
ToolbarIcons& = 0'here later Toolbaricon present
'*******************************************************************************************************'
'*- Skalierung *'
xx! = 1.30
yy! = 1.15
'*******************************************************************************************************'
'*******************************************************************************************************'
'* Prozedurname: MainWindow *'
''******************************************************************************************************'
'* Version: V0.01 *'
'* stood: 28.09.2020 *'
'* Info: building the Mainwindow/-dialog on *'
'*******************************************************************************************************'
PROC MainWindow
'*******************************************************************************************************'
'*- local Parameter -*'
DECLARE Handle&
DECLARE Tab&[5]
DECLARE dx%, dy%
DECLARE i%
DECLARE end%
'*******************************************************************************************************'
'*- Wertzuweisungen -*'
x! = 1.00
y! = 1.00
dX% = 640
dy% = 480
end% = 0
'*******************************************************************************************************'
'*- Fensteraufbau -*'
Handle& = CREATE("Dialog", %HWND, PrgName$, 0,0,0,0)
SETWINDOWPOS Handle& = INT((%MAXX-dx%)/2)*x!,INT((%MAXY-dy%)/2)*y! - dx%*x!, dy%*y!; 0
Toolbar& = CREATE("Toolbar", Handle&, ToolbarIcons&, 0, 0, WIDTH(Handle&), 64*y!)
TabControl&[1] = CREATE("TabCtrl", Handle&, "Vokabel", 5*x!, HEIGHT(Toolbar&) + 5*x!, WIDTH(Handle&) - 2 * 5*x!, HEIGHT(Handle&) - Height(Toolbar&)-2* 5*x! )
FOR i%, 2,5,1
TabControl&[i%] = INSERTTAB(TabControl&[1], i%,"Tab "+ STR$(i%) )
ENDFOR
'*******************************************************************************************************'
'*- Ereignishandler -*'
WHILENOT end%
WAITINPUT
end%=1
ENDWHILE
'*******************************************************************************************************'
'*- Window close -*'
DESTROYWINDOW(Handle&)
'*******************************************************************************************************'
ENDPROC
'*******************************************************************************************************'
'*******************************************************************************************************'
'* Hauptprogramm *'
''******************************************************************************************************'
CLS
Mainwindow
DISPOSE concept#
FREEDLL PRGDLL&
END
i'd gladly a Statement this having
Regards
EDIT: there the "Deutsche Texte" in line 4 standing s. ResHacker, could The number 4 in the aray what so zutun having ? |
| | | | |
| | Stephan Sonneborn | H.Brill (28.09.2020)
Mach still everything with Rolands installed functions.
would be I gladly make, but I would like none The Vokabeln in a DLL secure, separate only The Texts the Programmoberfläche. really need I not for a Vokabelprogramm, there can The surface Yes quiet in german stay. but I have on the work one Program develops, that in unterschiedlichen Languages runs. and there I'm going still whom umständlichen Away with whom individual DLLs apiece Language and the Reading through ExtString$(). I wanted to simply times the new Opportunities testing.
moreover ought to I but already know, whom String I choose. clear, I could now for each Text a Ressourcenbereich (means whom 3. Parameter in the RES("GetStrings" - function) determine. but I thought, It's all right too plainer, z.B. any Texts on window 1, any Texts on window 2, any Hilfetexte To Window 1, any Hilfetexte To Window 2 u.s.w. each in a Resourcenbereich take off. so would The DLL plenty übersichtlicher, particularly then, if one The Text-numbers then spare determine can, z.B. 100-199 for Fenstertexte, 200-299 for pertinent Hilfetexte u.s.w.
I have me for in Excel a scheduler prepares: in slot A The number, in slot B one comma, in slot C the German Text, in D then the english. into Split E and F becomes then from it the entry for DLL generiert: number & comma & Text in the jeweiligen Language. thereafter can I then in Excel simply The whole slot copy and in the Resource Builder insert. ready! |
| | | XProfan X4Schöne Grüße aus Wittgenstein von Stephan Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz | 09/28/20 ▲ |
| |
| | Stephan Sonneborn | Georg Teles (28.09.2020)
me falls on, that PRGName$ = RES("GetStrings", PRGDLL&, "#100", $00407) one aray zurückgibt, but I get it neither there, it auszulesen
Georg Teles (28.09.2020)
so functions it, but I understand not Why Declare PRGNameN$ '-------------------------------------# PRGNameN$ = RES("GetStrings", PRGDLL&, "#7", $00407) '--# PRGName$ = PRGNameN$ '---------------------------------#
I had already a variables aray probiert with "#7" as 3. Parameter. because the ResHacker there even a 7 writes. Why? i know not...
the power too only the ResHacker. The Resource Builder power not. For this can the neither with Texten as 3. Parameter (z.B. the "MONAT" in Rolands example) life.
Georg Teles (28.09.2020)
EDIT: there the "Deutsche Texte" in line 4 standing s. ResHacker, could The number 4 in the aray what so zutun having ?
by me sustain I as Return Value for PRGName$ the value "8", at least becomes the as Window Title displayed... for PRGNamen$ incidentally too...
|
| | | XProfan X4Schöne Grüße aus Wittgenstein von Stephan Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz | 09/28/20 ▲ |
| |
| | E.T. | I use for something like without Problems ExtString$ , z.B. so:
SetText Status&, 0, @ExtString$(Prg_Dll& ,40)
or
Checker&[22] = @Create("RadioButton",Static_1&[0],@ExtString$(Prg_Dll& ,24),570,305,200,20)
The Parameter is then very The number, which z.B. in the ResHacker very to the Texteintrag standing. in the Bsp. moreover supra means 1584 for "Januar" , 1585 for "Februar" etc... |
| | | Grüße aus Sachsen... Mario WinXP, Win7 (64 Bit),Win8(.1),Win10, Win 11, Profan 6 - X4, XPSE, und 'nen schwarzes, blinkendes Dingens, wo ich das alles reinschütte... | 09/28/20 ▲ |
| |
| | Stephan Sonneborn | E.T. (28.09.2020)
I use for something like without Problems ExtString$ , z.B. so: SetText Status&, 0, @ExtString$(Prg_Dll& ,40)
or
Checker&[22] = @Create("RadioButton",Static_1&[0],@ExtString$(Prg_Dll& ,24),570,305,200,20)
The Parameter is then very The number, which z.B. in the ResHacker very to the Texteintrag standing. in the Bsp. moreover supra means 1584 for "Januar" , 1585 for "Februar" etc...
so make I the usually too. but so can not unterschiedlichen Languages works. or one must with unterschiedlichen Nummernkreisen works, I not would like... |
| | | XProfan X4Schöne Grüße aus Wittgenstein von Stephan Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz | 09/29/20 ▲ |
| |
| | E.T. | Versch. Languages for Programmoberfläche pack I always in a "verkappte" .ini-File (with "falscher" expansion). per Language a File. let itself m.M. to plainer Edit or. strain, as How each times the .dll To Edit. |
| | | XProfan 11Grüße aus Sachsen... Mario WinXP, Win7 (64 Bit),Win8(.1),Win10, Win 11, Profan 6 - X4, XPSE, und 'nen schwarzes, blinkendes Dingens, wo ich das alles reinschütte... | 09/29/20 ▲ |
| |
| | | | - Page 2 - |
| | Georg Teles | good tommorrow,
Stephan Sonneborn (28.09.2020)
by me sustain I as Return Value for PRGName$ the value "8", at least becomes the as Window Title displayed... for PRGNameN$ incidentally too...
RES gives indeed a ARRAY back, with you attempts the commands
PRGName$ = RES("GetStrings", PRGDLL&, "#7", $00407)
PRGNameN$ = RES("GetStrings", PRGDLL&, "#7", $00407)
whom ARRAY in a String To force, 8 suspect I is the Number of Strings in this ARRAY --- You müsstest properly them String PRGNameN$ as ARRAY define, means PRGNameN$[] and from this then your Strings heraussuchen
PRGNameN$[] = RES("GetStrings", PRGDLL&, "#7", $00407)
String1$ = PRGNameN$[0]
String2$ = PRGNameN$[1]
...
sincere said see I with the commands RES neither through and I it yet never apply --- personally would I How ET already wrote with The Strings from the EXE/DLL read, if it so necessary his should
with my mehrsprachigen Programs use I a ARRAY intern, according to Language becomes the ARRAY then properly filled - this is plainer.
so on the side: have yet only TrackMenüs The Ressourcen in the EXE for mehrsprachige usage using, the erspart then integral whom construction the TrackMenüs - extern loading and Show [...]
the sees in the ResHacker then so from:
Regards |
| | | | |
| | H.Brill | might one indeed as RC_DATA Ressource make, especially since it already a Exceldatei has. The can Yes too as normal Textdatei in Excel Save :
Declare string Menu[], Memory area, Long groesse, number, hdll, info
Def %RT_RCDATA 10
/*
the as Textdatei Save and the Reshacker
as RC_DATA under TEXTS insert :
100, File,File
101,Open,Open
102,Closing,Close
*/
cls
hdll = UseDLL("E:\vokabeln.dll")
info = Res("Info", hdll, %RT_RCDATA, "TEXTE", 0)
groesse = Res("Size", hdll, info)
Dim area, groesse
area = Res("Get", hdll, info)
number = Len(String $(area, 0), Chr$(13))
' or same with
' Menu[] = Explode(String$(area, 0), Chr$(13))
' in that aray transferieren.
WhileLoop 1, number
Print SubStr$(String $(area, 0), &LOOP, Chr$(13))
' here can the whole String(Nr, german, english)
' over again untergliedert go.
EndWhile
WaitInput
FreeDll hdll
Dispose area
end
Perhaps comes it Yes so moreover. |
| | | Benutze XPROFAN X3 + FREEPROFAN Wir sind die XProfaner. Sie werden von uns assimiliert. Widerstand ist zwecklos! Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.
Was die Borg können, können wir schon lange. | 09/30/20 ▲ |
| |
| | Stephan Sonneborn | After something Überlegung and nochmaliger "genauer" Inaugenscheinnahme Help
have I me the following Konstrukt built:
StringID& = 100
Sektion$ = "#"+STR$(INT(StringID&/16)+1)
Array$[] = RES("GetStrings", PRGDLL&, Sektion$, $00407)
PRGName$ = aray$[INT(StringID&-16*(INT(StringID&/16)))]
first of all definiere I in a Hilfsvariablen The number the Strings in the DLL. then ermittele I The Sektion, means whom 3. Parameter the RES("Getstrings" - function. then can I the aray with the maximum 16 Einträgen fill, thereby go not belegte numbers automatically with Leerstrings slip. The actual variables must I then only yet whom right entry in the aray allocate.
is something umständlich, ought to but functions... |
| | | XProfan X4Schöne Grüße aus Wittgenstein von Stephan Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz | 09/30/20 ▲ |
| |
| | E.T. | Well, Why simply, ifs umständlich too goes
... but each the its
Have such a Ansatz too time by .dll attempts, Habs but then given. having then per Language simply a sep. dll-File made, which with Prog-Start loaded watts.
be then with of my o.g. Version with each of/ one spoke-File per Language stayed. the can itself for me on the simplest Edit and strain. |
| | | XProfan 11Grüße aus Sachsen... Mario WinXP, Win7 (64 Bit),Win8(.1),Win10, Win 11, Profan 6 - X4, XPSE, und 'nen schwarzes, blinkendes Dingens, wo ich das alles reinschütte... | 10/04/20 ▲ |
| |
| | Stephan Sonneborn | | | | XProfan X4Schöne Grüße aus Wittgenstein von Stephan Programmierumgebung:| XProfan X4 | WIN10 | AMD FX6100 3,3 GHz | 10/04/20 ▲ |
| |
| | H.Brill | means by me functions the :
Declare String Menu1[], Menu2[]
Declare Memory area1, area2
Declare Long groesse1, groesse2, number, hdll, info_d, info_e
Def %RT_RCDATA 10
/*
the as Text files Save and the Reshacker
as RCDATA under DEUTSCH and ENGLISCH insert :
german.txt :
Open
Save
Closing
english.txt :
Open
Save
Close
*/
cls
hdll = UseDLL("E:\Languages.dll")
info_d = Res("Info", hdll, %RT_RCDATA, "DEUTSCH", 0)
info_e = Res("Info", hdll, %RT_RCDATA, "ENGLISCH", 0)
groesse1 = Res("Size", hdll, info_d)
Dim area1, groesse1
groesse2 = Res("Size", hdll, info_e)
Dim area2, groesse2
area1 = Res("Get", hdll, info_d)
area2 = Res("Get", hdll, info_e)
number = Len(String $(area1, 0), Chr$(13))
Menu1[] = Explode(String $(area1, 0), Chr$(13))
number = Len(String $(area2, 0), Chr$(13))
Menu2[] = Explode(String $(area2, 0), Chr$(13))
PopUp "&Datei"
AppendMenu 100, Menu1[0]
AppendMenu 101, Menu1[1]
AppendMenu 102, Menu1[2]
PopUp "&File"
AppendMenu 100, Menu2[0]
AppendMenu 101, Menu2[1]
AppendMenu 102, Menu2[2]
WaitInput
FreeDll hdll
Dispose area1, area2
end
one must only hereon respect, the two Ressourcen synchron To hold. one could too yet to The Menütexte numbers write, around the items from whom aray rather To identify. or hold everything together (100, Open, Open) . the whole is Yes then slight with SubStr$() rauszuziehen. Since there it Yes Opportunities enough, circa something like To release. |
| | | Benutze XPROFAN X3 + FREEPROFAN Wir sind die XProfaner. Sie werden von uns assimiliert. Widerstand ist zwecklos! Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.
Was die Borg können, können wir schon lange. | 10/04/20 ▲ |
| |
|
AnswerThemeninformationenthis Topic has 5 subscriber: |