blitzplus1.44 hDC for dll??
BlitzPlus Forums/BlitzPlus Programming/blitzplus1.44 hDC for dll??
| ||
hello I has blitzplus 1.44 and needs the equipment context "hDC" from the active window, how I get? i need for a "dll" that paints on the screen sorry for my bad english ;-) |
| ||
I'm not sure, but I believe that if you have the hwnd, (using SystemProperty$("apphwnd") or api_GetActiveWindow), you can use api_GetDC to retreive the HDC. You might need to get the user32.decls. |
| ||
hi, thanks for the answer but... when i enter the blitzcode test%=SystemProperty$ ("apphwnd") DebugLog test% is test% = 0 that does not run ;-( you say "api_GetActiveWindow), you can use api_GetDC" have you or other here one example code for this ? Tom p.s. sorry for my bad english ;-) |
| ||
the solution ;-) ---- namexyz.decls --- .lib "user32.dll" GetDC%(hwnd%):"GetDC" ReleaseDC%(hwnd%, hdc%):"ReleaseDC" ---------------------------- in blitz+ window1=CREATEWINDOW("Win1",150,150,600,600,0,9) hDC% = GetDC(QueryObject(window1,1)) DebugLog hDC% Tom |
| ||
TomG Have you considered posting your code in the "Code Archives". It makes the solution available to everyone who want to perform a floodfill in Blitz+ using the API call. |
| ||
;-) ok |