Page 1 of 1
active desktop like drawing
Posted: Wed Aug 04, 2004 1:22 am
by Dreglor
i been wondering how you draw drectly on to the wallpaper like some programs
take for example
ZMatrix
it draws on the wallpaper area with out messing around with the icons or anything
is there an api or somthing i can tap into to do this?
Posted: Mon Aug 16, 2004 4:48 pm
by fweil
Does ZMatrix use screen mode ? If so use DrawingBufffer() and DrawingBufferpitch () ...
If not I don't know today !
KRgrds
Posted: Mon Aug 16, 2004 6:38 pm
by Dreglor
it proably an api to get the memory address then that way the problem is that i have no clue what api...
Posted: Mon Aug 16, 2004 7:14 pm
by GedB
The source for ZMatrix is available on SourceForge:
http://cvs.sourceforge.net/viewcvs.py/z ... iew=markup
It's all COM stuff, though. This looks to be significant:
Code: Select all
//Find the desktop window classes
ghProgman = FindWindow(_TEXT("Progman"), _TEXT("Program Manager"));
if(ghProgman != NULL)
{
ghShellDLL = FindWindowEx(ghProgman, 0, _TEXT("SHELLDLL_DefView"), NULL);
ghSysListView = FindWindowEx(ghShellDLL,0,_TEXT("SysListView32"),NULL);
}
else
{
ghProgman = FindWindow(_TEXT("DesktopBackgroundClass"), NULL);
if(ghProgman != NULL)
{
ghShellDLL = FindWindowEx(ghProgman, 0, _TEXT("DeskFolder"), NULL);
ghSysListView = FindWindowEx(ghShellDLL,0,_TEXT("SysListView32"),NULL);
LiteStepMode = true;
}
else
{
ghShellDLL = NULL;
ghSysListView = NULL;
}
}
Posted: Mon Aug 16, 2004 7:17 pm
by GedB
This bit too:
Code: Select all
case(WM_NCPAINT):
{
//return DefWindowProc(hWnd,message,wParam,lParam);
if(MatrixObject)
{
HDC hdc;
hdc = GetDC(hWnd);
SelectClipRgn(hdc,ValidRGN);
SelectObject(MatrixObject->GetBackDC(),MatrixObject->GetBackBitmap());
BitBlt(hdc,gscreenLeft,gscreenTop,gscreenWidth,gscreenHeight,MatrixObject->GetBackDC(),0,0,SRCCOPY);
//OutputDebugString(_T("NCPainting\n"));
ReleaseDC(hWnd, hdc);
}
return 0;
}
break;