Quelltexte/ Codesnippets | | | | ![H.Brill: 11.10.2023](.././../../i/a/86.gif) H.Brill | ![](.././../../i/st.gif) Hallo, Smilies sind ja z.Zt. hip. Daß man mit der Tastatur (Windows-Taste + Punkt (.) ) sie ab Windows 10 anzeigen kann, dürfte ja einigermaßen bekannt sein. Mit Rechtsklick in die Taskleiste und Bildschirmtastatur anzeigen geht es auch. Bloß wie bekommt man die in ein Profanprogramm ?
Hier habe ich ein kleines Beispielprogramm, das die Smilies in einem HTMLWin anzeigt. Die HTML-Codes der Smilies habe ich mit Frank Abbings XDatengenerator in eine Bersichsvariable gepackt.
Progamm funktioniert erst mit Windows 10 wegen dem Font. Und Achtung : ich benutze eine Embedded Variable. Embedded Vars gehen glaube ich erst mit X4.
Declare String z, h, HTM#
Declare Handle browser
Dim HTM#,4628
Clear HTM#
LoadHTMCodes()
z = String$(HTM#, 0)
z = Translate$(z, ",", ";")
h = "mshtml:<!DOCTYPE html><html><meta charset=\qUTF-8\q><body><p style=\qfont-family:Segoe UI Emoji;font-size:48px\q>\:z;</p>\n</body></html>"
'h = "mshtml:<!DOCTYPE html><html><meta charset=\qUTF-8\q><body><p style=\qfont-family:Segoe UI Emoji;font-size:48px\q>😀😄😍💗</p>\n</body></html>"
Window 600, 400
browser = Create("HTMLWin", %HWnd, h, 5, 10, 10, 400, 200)
While 1
WaitInput
EndWhile
Proc LoadHTMCodes
Long HTM#,0=959980326,640431672,943274019,589704247,808464953,958604844,741880887,926491430,640432436,892877091,589704245,892811321,958604844,741947448,960045862,640432438,926497059,589704241,859257145,958604844,741423161
Long HTM#,84=960045862,640431672,943274275,589704249,842611001,958604844,741554489,960045862,640431417,808464675,640431152,808464675,640431664,808464675,640431154,808464675,640431411,808464675,640431667,808464675,640430645
Long HTM#,168=808464675,640431413,808464675,640430134,808464675,640430646,808464675,640431926,808464675,640432182,808464675,640432438,808464675,640430391,808464675,640431160,825241891,640430899,825241891,640431155,825241891
Long HTM#,252=640431411,926036259,741554227,842081062,959854391,824387116,926365490,589704241,926364209,640430647,926036259,741553975,842081062,876033847,824387116,926365490,589704245,926364209,640431927,926036259,741357623
Long HTM#,336=842081062,825767735,824387116,943142706,589704242,926364209,640430904,926036259,741619767,842081062,892876599,824387116,943142706,589704246,926364209,640431161,926036259,741685559,842081062,909719351,824387116
Long HTM#,420=959919922,589704247,926364209,640432185,926036259,741947703,842081062,808466487,824387116,808990514,589704241,943141425,640430640,926036259,741552184,842081062,875575351,824387116,808990514,589704245,943141425
Long HTM#,504=640431664,926036259,741814328,842081062,942684215,824387116,808990514,589704249,943141425,640430129,926036259,741421368,842081062,842086455,824387116,825767730,589704243,943141425,640431153,926036259,741683512
Long HTM#,588=842081062,909195319,824387116,825767730,589704247,943141425,640432177,926036259,741945656,842081062,808597559,824387116,842544946,589704241,943141425,640430642,926036259,741552696,842081062,875706423,824387116
Long HTM#,672=842544946,589704245,943141425,640431666,926036259,741814840,842081062,808859703,824387116,909653810,589704241,943141425,640430902,926036259,741619256,842081062,959854647,824387116,926431026,589704243,943141425
Long HTM#,756=640431159,926036259,741685048,842081062,909588535,824387116,959985458,589704245,959918641,640430385,926036259,741486905,842081062,892483895,824387116,842610482,589704246,959918641,640431922,926036259,741880377
Long HTM#,840=842081062,808663351,824387116,859387698,589704241,959918641,640430643,926036259,741552953,842081062,875772215,824387116,859387698,589704247,959918641,640432179,926036259,741946169,842081062,808728887,824387116
Long HTM#,924=876164914,589704241,959918641,640430644,926036259,741553209,842081062,892614967,824387116,876164914,589704246,959918641,640431924,926036259,741880889,842081062,959723831,824387116,892942130,589704240,959918641
Long HTM#,1008=640430389,926036259,741487929,842081062,859126071,824387116,892942130,589704244,959918641,640431413,926036259,741881401,842081062,943208759,824387116,808466482,589704241,808989233,640430640,942813475,741552176
Long HTM#,1092=842081062,875573304,824387116,808466482,589704246,808989233,640431920,942813475,741879856,842081062,959459384,824387116,825243698,589704240,808989233,640430385,942813475,741486896,842081062,858861624,824387116
Long HTM#,1176=825243698,589704244,808989233,640431409,942813475,741749040,842081062,942747704,824387116,825243698,589704249,808989233,640430130,942813475,741421616,842081062,842149944,824387116,842020914,589704243,808989233
Long HTM#,1260=640431154,942813475,741683760,842081062,909258808,824387116,842020914,589704247,808989233,640432178,942813475,741945904,842081062,808661048,824387116,858798130,589704241,808989233,640431155,942813475,741749552
Long HTM#,1344=842081062,942878776,824387116,875575346,589704242,808989233,640430900,942813475,741618736,842081062,892612664,824387116,875575346,589704246,808989233,640431924,942813475,741880880,842081062,959721528,824387116
Long HTM#,1428=892352562,589704240,808989233,640430389,942813475,741487920,842081062,859123768,824387116,892352562,589704244,808989233,640431413,942813475,741750064,842081062,926232632,824387116,892352562,589704248,808989233
Long HTM#,1512=640432437,942813475,741357104,842081062,825634872,824387116,909129778,589704244,808989233,640431670,942813475,741357360,842081062,825700408,824387116,925906994,589704242,808989233,640430903,942813475,741619504
Long HTM#,1596=842081062,892809272,824387116,925906994,589704246,808989233,640431927,942813475,741881648,842081062,959918136,824387116,942684210,589704240,808989233,640430392,942813475,741488688,842081062,859320376,824387116
Long HTM#,1680=942684210,589704244,808989233,640431416,942813475,741750832,842081062,926429240,824387116,942684210,589704248,808989233,640432440,942813475,741357872,842081062,825831480,824387116,959461426,589704242,808989233
Long HTM#,1764=640430905,942813475,741620016,842081062,892940344,824387116,959461426,589704246,808989233,640431929,942813475,741882160,842081062,960049208,824387116,808532018,589704240,825766449,640430384,942813475,741486641
Long HTM#,1848=842081062,858796344,824387116,808532018,589704244,825766449,640431408,942813475,741748785,842081062,925905208,824387116,808532018,589704248,825766449,640432432,942813475,741355825,842081062,842084664,824387116
Long HTM#,1932=825309234,589704243,825766449,640431153,942813475,741683505,842081062,909193528,824387116,825309234,589704247,825766449,640432177,942813475,741945649,842081062,808595768,824387116,842086450,589704241,825766449
Long HTM#,2016=640430898,942813475,741683761,842081062,909259064,824387116,842086450,589704247,825766449,640432178,942813475,741815089,842081062,942879032,824387116,875640882,589704240,825766449,640430644,942813475,741684273
Long HTM#,2100=842081062,926167352,824387116,875640882,589704248,825766449,640432436,942813475,741356849,842081062,825569592,824387116,892418098,589704242,825766449,640430901,942813475,741618993,842081062,892678456,824387116
Long HTM#,2184=892418098,589704246,825766449,640431925,942813475,741881137,842081062,959787320,824387116,909195314,589704244,825766449,640431414,942813475,741946929,842081062,808923448,824387116,925972530,589704242,825766449
Long HTM#,2268=640430903,942813475,741619505,842081062,892809528,824387116,925972530,589704246,825766449,640432183,942813475,741947185,842081062,943206712,824387116,942749746,589704249,825766449,640430137,942813475,741620017
Long HTM#,2352=842081062,909717816,824387116,959526962,589704247,842543665,640430128,942813475,741421106,842081062,842019384,824387116,808597554,589704243,842543665,640431152,942813475,741683250,842081062,909128248,824387116
Long HTM#,2436=808597554,589704247,842543665,640432176,942813475,741356082,842081062,825373240,824387116,842151986,589704242,842543665,640431410,942813475,741749298,842081062,926036536,824387116,875706418,589704245,842543665
Long HTM#,2520=640431668,942813475,741815346,842081062,959722040,824387116,892483634,589704240,842543665,640430389,942813475,741422642,842081062,842412600,824387116,909260850,589704243,842543665,640431158,942813475,741684786
Long HTM#,2604=842081062,909521464,824387116,909260850,589704247,842543665,640432182,942813475,741946930,842081062,808923704,824387116,926038066,589704242,842543665,640430903,942813475,741619506,842081062,892809784,824387116
Long HTM#,2688=926038066,589704246,842543665,640431927,942813475,741947186,842081062,808989240,824387116,942815282,589704246,842543665,640430905,942813475,741620018,842081062,892940856,824387116,959592498,589704246,842543665
Long HTM#,2772=640432185,942813475,741947698,842081062,808465208,824387116,808663090,589704241,859320881,640430896,942813475,741617971,842081062,892416824,824387116,825440306,589704246,859320881,640431921,942813475,741619507
Long HTM#,2856=842081062,892810040,824387116,926103602,589704246,859320881,640431161,942813475,741356084,842081062,858993720,824387116,942946354,589704243,876098097,640432184,942813475,741685556,842081062,960050232,824387116
Long HTM#,2940=808794162,589704248,892875313,640432432,942813475,741486901,842081062,858862904,824387116,825571378,589704244,892875313,640431409,942813475,741749045,842081062,925971768,824387116,825571378,589704248,892875313
Long HTM#,3024=640432433,942813475,741356085,842081062,825374008,824387116,842348594,589704242,892875313,640430898,942813475,741618229,842081062,892482872,824387116,842348594,589704246,892875313,640431922,942813475,741880373
Long HTM#,3108=842081062,959591736,824387116,859125810,589704240,892875313,640430387,942813475,741487413,842081062,858993976,824387116,859125810,589704244,892875313,640431411,942813475,741749557,842081062,926102840,824387116
Long HTM#,3192=859125810,589704248,892875313,640432435,942813475,741356597,842081062,825505080,824387116,875903026,589704242,892875313,640430900,942813475,741618741,842081062,892613944,824387116,875903026,589704246,892875313
Long HTM#,3276=640431924,942813475,741880885,842081062,959722808,824387116,892680242,589704240,892875313,640430389,942813475,741487925,842081062,859125048,824387116,892680242,589704244,892875313,640431413,942813475,741750069
Long HTM#,3360=842081062,926233912,824387116,892680242,589704248,892875313,640432437,942813475,741357109,842081062,825636152,824387116,909457458,589704242,892875313,640430902,942813475,741619253,842081062,892745016,824387116
Long HTM#,3444=909457458,589704246,892875313,640431926,942813475,741881397,842081062,959853880,824387116,926234674,589704240,892875313,640430391,942813475,741488437,842081062,859256120,824387116,926234674,589704244,892875313
Long HTM#,3528=640431415,942813475,741750581,842081062,926364984,824387116,926234674,589704248,892875313,640432439,942813475,741357621,842081062,825767224,824387116,943011890,589704242,892875313,640430904,942813475,741619765
Long HTM#,3612=842081062,892876088,824387116,943011890,589704246,892875313,640431928,942813475,741881909,842081062,959984952,824387116,959789106,589704240,892875313,640430393,942813475,741356598,842081062,825505336,824387116
Long HTM#,3696=875968562,589704242,909652529,640430900,942813475,741618742,842081062,892614200,824387116,875968562,589704246,909652529,640431924,942813475,741880886,842081062,959723064,824387116,892745778,589704240,909652529
Long HTM#,3780=640430389,942813475,741487926,842081062,859125304,824387116,892745778,589704244,909652529,640431669,942813475,741815606,842081062,943011384,824387116,892745778,589704249,909652529,640430134,942813475,741422646
Long HTM#,3864=842081062,842413624,824387116,909522994,589704243,909652529,640431158,942813475,741684790,842081062,909522488,824387116,909522994,589704247,909652529,640430392,942813475,741488694,842081062,859321912,824387116
Long HTM#,3948=943077426,589704244,909652529,640431416,942813475,741750838,842081062,926430776,824387116,943077426,589704248,909652529,640432440,942813475,741357878,842081062,825833016,824387116,959854642,589704242,909652529
Long HTM#,4032=640430905,942813475,741620022,842081062,892941880,824387116,959854642,589704246,909652529,640431929,942813475,741882166,842081062,825243448,824387116,808925234,589704243,926429745,640431408,942813475,741749047
Long HTM#,4116=842081062,842151736,824387116,859256882,589704246,842609201,640431673,959590691,741816626,842081062,943272505,824387116,959592754,589704249,859386417,640430128,959590691,741421107,842081062,842019641,824387116
Long HTM#,4200=808663346,589704243,859386417,640431152,959590691,741683251,842081062,909128505,824387116,825440562,589704241,859386417,640430641,959590691,741552435,842081062,875639609,824387116,825440562,589704245,859386417
Long HTM#,4284=640431665,959590691,741814579,842081062,942748473,824387116,825440562,589704249,859386417,640430130,959590691,741421619,842081062,842150713,824387116,842217778,589704243,859386417,640431154,959590691,741683763
Long HTM#,4368=842081062,909259577,824387116,842217778,589704247,859386417,640432178,959590691,741945907,842081062,808661817,824387116,858994994,589704242,859386417,640430899,959590691,741618483,842081062,825570105,824387116
Long HTM#,4452=892549426,589704242,859386417,640430901,959590691,741881139,842081062,892744505,824387116,926103858,589704249,876163633,640432184,959590691,741947444,842081062,809055289,824387116,959723826,589704241,876163633
Long HTM#,4536=640430649,959590691,741554484,842081062,876164153,824387116,959723826,589704246,876163633,640431929,959590691,741882164,842081062,960050233,824387116,808794418,589704241,892940849,640430640,959590691,741552181
Long HTM#,4620=842081062,892351801
EndProc
Dispose HTM#
End
|
| | | 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. | 11.10.2023 ▲ |
| |
| | ![Georg Teles: 14.10.2023](.././../../i/a/910.gif) Georg Teles | ![](.././../../i/st.gif) Guten Morgen,
puh, das wird nicht einfach ... habe jez die ganze Nacht dran gesessen und versucht, die Emojis zu generieren:
Aaalso, was geht, ist, die Emojis abzulegen und auszulesen (Test.dll ist angehängt):
DECLARE DLL$, DLL&, FONT&, HText&[3], HTextW&[3], HTx&[3]
DECLARE Text$[3], TextW$[3]
DECLARE Buffer#, count&, Adresse%,i%
DECLARE id%
DEF LoadStringW(4) !"USER32", "LoadStringW"
DEF IsMEnu(1) !"USER32", "IsMenu"
DEF CreateWindowExW(12) !"USER32", "CreateWindowExW"
DEF SetWindowTextW(2) !"USER32", "SetWindowTextW"
DIM Buffer#,4097
STRUCT CREATESTRUCT = lpCreateParams&, hInstance&, hMenu&, hwndParent&, cy%, cx%, y%, x%, style&, lpszName&, lpszClass&, dwExStyle&
'*****************************************************************************************************************'
Proc UTF
parameters text$
declare b#
Dim b#,2*len(text$)+2
StringW b#,0 = text$
text$ = Char$(b#,0,SizeOf(b#)-2)
return text$
EndProc
'*****************************************************************************************************************'
Proc CreateW
parameters Class$,Name$,style&,x%,y%,dx%,dy%,pWnd&,pid%,hInst&,exstyle&
case %pCount <11 : exstyle& = 0
Class$ = UTF(Class$)
Name$ = UTF(Name$)
Var cs# = New(CREATESTRUCT)
With cs#
.lpCreateParams& = SizeOf(cs#)
.hInstance& = hInst&
.hMenu& = (IsMenu(id%)<>0) * id%
.hwndParent& = pWnd&
.cy% = dy%
.cx% = dx%
.y% = y%
.x% = x%
.style& = style&
.lpszName& = Addr(Name$)
.lpszClass& = Addr(Class$)
.dwExStyle& = exstyle&
EndWith
Var handle& = CreateWindowExW(exstyle&,Addr(Class$),Addr(Name$),style&,x%,y%,dx%,dy%,pWnd&,id%,hInst&,cs#)
Class$ = WinError$(%WinError)
inc id%
IfNot handle&
MessageBox("Es trat folgender Fehler auf:\n\n" + Class$,"F E H L E R !!!",4096)
EndIf
Dispose cs#
Return handle&
EndProc
'*****************************************************************************************************************'
'* Hauptprogramm'
'*****************************************************************************************************************'
DLL$ ="TEST.DLL"
DLL&=USEDLL(DLL$)
id% = 1
CLS
SET("CHARSET", 1251)
Font&=Create("FONT", "calibri",0,0,0,0,0)
Locate 1,1
print "Static:"
HText&[1] = create("Static",%HWND, 10,20,200,20)
HText&[2] = create("Static",%HWND, 10,50,200,20)
HText&[3] = create("Static",%HWND, 10,80,200,20)
Locate 1,27
print "WindowEx (Static):"
HTextW&[1] = createW("static","W1", $50000000,220,20,200,20,%HWND,0,%HINSTANCE)
HTextW&[2] = createW("static","W2", $50000000,220,50,200,20,%HWND,0,%HINSTANCE)
HTextW&[3] = createW("static","W3", $50000000,220,80,200,20,%HWND,0,%HINSTANCE)
Locate 1,54
print "Text:"
HTx&[1] = create("Text",%HWND, "", 430,20,200,20)
HTx&[2] = create("Text",%HWND, "", 430,50,200,20)
HTx&[3] = create("Text",%HWND, "", 430,80,200,20)
SETFONT HText&[1], Font&
SETFONT HText&[2], Font&
SETFONT HText&[3], Font&
SETFONT HTextW&[1], Font&
SETFONT HTextW&[2], Font&
SETFONT HTextW&[3], Font&
'WAITINPUT
Adresse% = 99
WHILELOOP 1,3,1
waitinput
CLEAR Buffer#
count& = LoadStringW(DLL&, Adresse%+&LOOP, Buffer#, 4097)
TextW$[&LOOP] = c2w(Buffer#,count&*2)'Byte für Byte auslesen !!!
SetWindowTextW(HText&[&LOOP], Addr(TextW$[&LOOP]))'Set...W
SetWindowTextW(HTextW&[&LOOP], Addr(TextW$[&LOOP]))'Set...W
SetWindowTextW(HTx&[&LOOP], Addr(TextW$[&LOOP]))'Set...W
'SETTEXT HTextW&[&LOOP], TextW$[&LOOP]
ENDWHILE
WAITINPUT
DISPOSE Buffer#
DELETEOBJECT Font&
FREEDLL DLL&
END
ENDWHILE
Proc c2w'Byte für Byte auslesen
Parameters buf#, siz&
Declare wide$
Clear wide$
WhileLoop 0,(siz&-1)
wide$ = wide$+Chr$(Byte(buf#,&loop))'+Chr$(4) CHR(4) entfällt, da Buffer# bereits als Wide geladen wurde !!! bei normalem String müsste man hier den CHR(4) noch anhängen
EndWhile
Return wide$
EndProc
Den Code habe ich schnell zusammengeschustert ...
habe durch Ausprobieren die Emojis selbst generiert:
DECLARE DLL$, DLL&, FONT&, HText&[3], HTextW&[3], HTx&[3]
DECLARE Text$[3], TextW$[3]
DECLARE id%
DEF IsMEnu(1) !"USER32", "IsMenu"
DEF CreateWindowExW(12) !"USER32", "CreateWindowExW"
DEF SetWindowTextW(2) !"USER32", "SetWindowTextW"
STRUCT CREATESTRUCT = lpCreateParams&, hInstance&, hMenu&, hwndParent&, cy%, cx%, y%, x%, style&, lpszName&, lpszClass&, dwExStyle&
'*****************************************************************************************************************'
Proc UTF
parameters text$
declare b#
Dim b#,2*len(text$)+2
StringW b#,0 = text$
text$ = Char$(b#,0,SizeOf(b#)-2)
return text$
EndProc
'*****************************************************************************************************************'
Proc CreateW
parameters Class$,Name$,style&,x%,y%,dx%,dy%,pWnd&,pid%,hInst&,exstyle&
case %pCount <11 : exstyle& = 0
Class$ = UTF(Class$)
Name$ = UTF(Name$)
Var cs# = New(CREATESTRUCT)
With cs#
.lpCreateParams& = SizeOf(cs#)
.hInstance& = hInst&
.hMenu& = (IsMenu(id%)<>0) * id%
.hwndParent& = pWnd&
.cy% = dy%
.cx% = dx%
.y% = y%
.x% = x%
.style& = style&
.lpszName& = Addr(Name$)
.lpszClass& = Addr(Class$)
.dwExStyle& = exstyle&
EndWith
Var handle& = CreateWindowExW(exstyle&,Addr(Class$),Addr(Name$),style&,x%,y%,dx%,dy%,pWnd&,id%,hInst&,cs#)
Class$ = WinError$(%WinError)
inc id%
IfNot handle&
MessageBox("Es trat folgender Fehler auf:\n\n" + Class$,"F E H L E R !!!",4096)
EndIf
Dispose cs#
Return handle&
EndProc
'*****************************************************************************************************************'
'* Hauptprogramm'
'*****************************************************************************************************************'
CLS
SET("CHARSET", 1251)
Font&=Create("FONT", "calibri",0,0,0,0,0)
Locate 1,1
print "Static:"
HText&[1] = create("Static",%HWND, 10,20,200,20)
HText&[2] = create("Static",%HWND, 10,50,200,20)
HText&[3] = create("Static",%HWND, 10,80,200,20)
Locate 1,27
print "WindowEx (Static):"
HTextW&[1] = createW("static","W1", $50000000,220,20,200,20,%HWND,0,%HINSTANCE)
HTextW&[2] = createW("static","W2", $50000000,220,50,200,20,%HWND,0,%HINSTANCE)
HTextW&[3] = createW("static","W3", $50000000,220,80,200,20,%HWND,0,%HINSTANCE)
Locate 1,54
print "Text:"
HTx&[1] = create("Text",%HWND, "", 430,20,200,20)
HTx&[2] = create("Text",%HWND, "", 430,50,200,20)
HTx&[3] = create("Text",%HWND, "", 430,80,200,20)
SETFONT HText&[1], Font&
SETFONT HText&[2], Font&
SETFONT HText&[3], Font&
SETFONT HTextW&[1], Font&
SETFONT HTextW&[2], Font&
SETFONT HTextW&[3], Font&
SETFONT HTx&[1], Font&
SETFONT HTx&[2], Font&
SETFONT HTx&[3], Font&
'-------------------------------------------------------- Magic !
Declare byte0&
Declare byte2&
Declare byte3&
Declare d#
Declare w$
Dim d#,4
byte0& = 61'60, 61, 62
byte3& = 222'220 221 222 223
WhileLoop 0,255
WAITINPUT
clear d#
Byte d#,0 = byte0&'60, 61, 62
Byte d#,1 = 216
Byte d#,2 = &loop
Byte d#,3 = byte3&'220 221 222 223
w$ = char$(d#,0,4)'c2w(d#,2*2)
SetWindowTextW(HText&[1],Addr(w$))'Set...W
SetWindowTextW(HText&[2],Addr(w$))'Set...W
SetWindowTextW(HText&[3],Addr(w$))'Set...W
SetWindowTextW(HTextW&[1],Addr(w$))'Set...W
SetWindowTextW(HTextW&[2],Addr(w$))'Set...W
SetWindowTextW(HTextW&[3],Addr(w$))'Set...W
SetWindowTextW(HTx&[1],Addr(w$))'Set...W
SetWindowTextW(HTx&[2],Addr(w$))'Set...W
SetWindowTextW(HTx&[3],Addr(w$))'Set...W
If ((byte0& = 61) AND (byte3& = 222))
byte2& = 128512
Else
byte2& = 1
EndIf
locate 10,0
print "Loop | Unicodenummer (theoretisch, nicht getestet !!!)"
If byte2& = 128512
print "Zeichen "+three(&loop)+"/255 | U+1F6"+hx(Hex$(&loop))+" ("+Str$(byte2&+&loop)+")"
Else
print "Zeichen "+three(&loop)+"/255 | ????"
EndIf
EndWhile
proc three
Parameters x$
If Len(x$) = 1
x$ = "00"+x$
ElseIf Len(x$) = 2
x$ = "0"+x$
EndIf
Return x$
endproc
Proc hx
Parameters x$
If Len(x$) = 1
x$ = "0"+x$
EndIf
Return x$
EndProc
'--------------------------------------------------------
WAITINPUT
Dispose d#
DELETEOBJECT Font&
Proc c2w'Byte für Byte auslesen
Parameters buf#, siz&
Declare wide$
Clear wide$
WhileLoop 0,(siz&-1)
wide$ = wide$+Chr$(Byte(buf#,&loop))'+Chr$(4) CHR(4) entfällt, da Buffer# bereits als Wide geladen wurde !!! bei normalem String müsste man hier den CHR(4) noch anhängen
EndWhile
Return wide$
EndProc
END
Viel Spaß beim Suchen der Codes, Byte 0, 2 und 3 variieren, habe auf die schnelle keine ordentliche "Chronologische" Liste der Smylies gefunden, sodass man die Unicodenummern automatisch mit anzeigen kann
s. [...] [...] [...] [...] [...] [...] [...] [...] [...] [...] [...] [...] [...] [...] [...] da sieht doch keiner durch ... ![](.././../../i/s/freak.gif)
Wie das alles farbig geht, keine Ahnung, ich nehme an, in Windows sind die Smilies als eigener Font abgelegt, nur Programmabhängig werden die in Farbe angezeigt (s. Firefox, Outlook etc.)
Servus Georg |
![](/intl/i/dw.gif) | | | | |
| | ![Sven Bader: 16.10.2023](.././../../i/a/71.gif) Sven Bader | Das ist ziemlich beeindruckend, das erste Mal überhaupt, dass ich ein 4-Byte Character auf einem Control in XProfan sehe. |
| | | | |
| | ![Georg Teles: 17.10.2023](.././../../i/a/910.gif) Georg Teles | Der Code funktioniert bis XProfan 10 zurück (ohne Create(Static und CreateW..., da Profan 10 es nicht kennt), bei XProfan 8 sind bei einigen Smilies noch "anhängsel" dran
![](https://xprofan.net/files/nnnmu.png)
Ansonsten geht das mit allen Fensterobjekten, außer Fenstertitel, da werden die Smilies als ?? angezeigt
![](https://xprofan.net/files/ennmu.png)
Grüße |
| | | | |
|
Zum QuelltextThemenoptionen | 1.124 Betrachtungen |
ThemeninformationenDieses Thema hat 3 Teilnehmer: |