{"id":94,"date":"2016-03-19T10:48:44","date_gmt":"2016-03-19T09:48:44","guid":{"rendered":"https:\/\/solidt.eu\/blog\/?p=94"},"modified":"2016-03-19T10:54:15","modified_gmt":"2016-03-19T09:54:15","slug":"widechar-in-delphi","status":"publish","type":"post","link":"https:\/\/solidt.eu\/site\/widechar-in-delphi\/","title":{"rendered":"WideChar in Delphi"},"content":{"rendered":"<pre lang=\"delphi\">\r\nprocedure TForm1.FormPaint(Sender: TObject);\r\nvar\r\n  i, j, s, sizex, sizey, pos, x, y : Integer;\r\n  ws : WideString;\r\n  rect : TRect;\r\nbegin\r\n  s := 0; \/\/ To max 65535\r\n\r\n  sizex := 66;\r\n  sizey := 1000;\r\n\r\n  for i:=0 to sizex-1 do\r\n  begin\r\n    for j:=0 to sizey-1 do begin\r\n\r\n      pos := s+(j*sizex)+i;\r\n      if (pos>65535) then\r\n        break;\r\n\r\n      ws := WideChar(pos);\r\n      rect := Self.GetClientRect;\r\n      Canvas.Font.Name := 'Arial';\r\n      Canvas.Font.Size := 12;\r\n\r\n      x := i*24;\r\n      y := (j*18)-VertScrollBar.Position;\r\n\r\n      if (x>=0) and (y>=0) and (x < Self.ClientWidth) and (y<Self.ClientHeight) then\r\n        TextOutW(Canvas.Handle, x, y, PWideChar(ws), Length(ws));\r\n\r\n    end;\r\n  end;\r\n  Self.Caption := ws;\r\nend;\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>procedure TForm1.FormPaint(Sender: TObject); var i, j, s, sizex, sizey, pos, x, y : Integer; ws : WideString; rect : TRect; begin s := 0; \/\/ To max 65535 sizex := 66; sizey := 1000; for i:=0 to sizex-1 do begin for j:=0 to sizey-1 do begin pos := s+(j*sizex)+i; if (pos>65535) then break; ws := [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[8],"tags":[],"class_list":["post-94","post","type-post","status-publish","format-standard","hentry","category-other-scripts"],"_links":{"self":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts\/94","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/comments?post=94"}],"version-history":[{"count":2,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts\/94\/revisions"}],"predecessor-version":[{"id":96,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/posts\/94\/revisions\/96"}],"wp:attachment":[{"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/media?parent=94"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/categories?post=94"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/solidt.eu\/site\/wp-json\/wp\/v2\/tags?post=94"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}