Is there a way to get dc from backbuffer?

Blitz3D Forums/Blitz3D Programming/Is there a way to get dc from backbuffer?

Jin(Posted 2007) [#1]
Is there a way to get dc from backbuffer? I want to draw the GDI text on the backbuffer.If there are some C++ DLL sample codes ,that would be great!

thanks.
Jin


MixailV(Posted 2007) [#2]
; pseudo-code
dd7surface.IDirectDrawSurface7 = PeekInteger ( BackBuffer()+12 )
dd7surface\GetDC(hDCpointer)
If hDCpointer
   ... bla bla bla :)
Endif
dd7surface\ReleaseDC(hDCpointer)

See FastText library (DLL) - http://blitzbasic.com/Community/posts.php?topic=68216
GDI drawing method already used in lib, it's fast and maximum optimized...


Jin(Posted 2007) [#3]
Great Thanks!

But I did not understand your codes above very much:)

when I Run "FastText_Example.bb",I did not see the unicode characters ,all the unicode characters disappeared .I do not know where I am wrong.


MixailV(Posted 2007) [#4]

... not understand your codes ...


sorry :)

I did not see the unicode characters


post screenshot


Jin(Posted 2007) [#5]
I just opened sample file"FastText_Example.bb" using b3d editor (also tried Protean editor) ,and changed some "text out characters" such as ˇ°Text 60,190,"Unicode Greek ¨C.....ˇ° to Chinese characters ,after that ,when I run the "FastText_Example.bb",the Chinese characters disappeared.


MixailV(Posted 2007) [#6]
In example is said:
; unicoded text can be seen in any editor that supports the display of unicode(UTF-8) characters
; such as Notepad (open this source with encoding UTF-8)
; or new version of IDEal

attentively read comments ;)

Your editor (Protean), before compiling, saves code-source in ASCII encoding... and kills all chinese characters.

_ONLY_ new unicode version of IDEal (ide for blitz) and Notepad can display and correctly _SAVE_ source-text in encoding UTF-8 (unicode) !!!


Jin(Posted 2007) [#7]
Yes ,I saw the unicode characters ,A lot of thanks:)