Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How get private Device context GDI in QB64?
#8
Petr

I don't get it why you use HDC or DC which is GDI and then you use openGL
i think that you must use openGL wrapper functions to set font and other things
not font created with HDC

this subroutine i use in o2 to select font i want but it is pure GDI
:
Code: (Select All)
Sub WindowFont(int height, width, flag, string fontname) 
int hFont
'hDC=GetDC(win)
ReleaseDC( win, hdcMem)
'SelectObject hdcMem, hFont
hFont = CreateFont height,width,0,0,flag,0,0,0,0,0,0,0,0,fontname
SelectObject hdcMem, hFont
'without SetBkMode BCOLOR r,g,b,.. work ?
SetBkMode hdcMem,1

'BitBlt(hDC, 0, 0, ww, wh, hdcMem, 0, 0, SRCCOPY)
DeleteObject hFont
'ReleaseDC( win, hdcMem)
End Sub
Reply


Messages In This Thread
RE: How get private Device context GDI in QB64? - by aurel - 04-07-2023, 06:49 PM



Users browsing this thread: 1 Guest(s)