I'm using VB.NET and want to use cards.dll (32-bit version) to render cards
onto various PictureBox controls.
I'm having a{*filter*}ens of a time getting a device context from a PictureBox in
order to make the DLL call work. I tried to use the API call GetDC using the
PictureBox .Handle property, but that didn't work.
Any advice as to how to get a DC for a PictureBox would be greatly
appreciated!
Declare Function GetDC Lib "user32" (ByVal hwnd As IntPtr) As Long
Declare Function cdtDraw Lib "Cards32.Dll" (ByVal hdc As Long, ByVal X As
Long, ByVal Y As Long, ByVal cardValue As Long, ByVal cardSuit As Long,
ByVal rgbColor As Long) As Boolean
...
cdtDraw(GetDC(pbxCPUCard1.Handle), 0, 0, CardBack, CPU.Hand(0).Suit, 0) <-
does nothing