Click here to Skip to main content
15,900,461 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: About creating Smart Device DLL using Libxml2 Pin
Stuart Dootson20-Jan-09 16:02
professionalStuart Dootson20-Jan-09 16:02 
GeneralRe: About creating Smart Device DLL using Libxml2 Pin
leslie wu20-Jan-09 16:09
leslie wu20-Jan-09 16:09 
GeneralRe: About creating Smart Device DLL using Libxml2 Pin
Randor 20-Jan-09 16:51
professional Randor 20-Jan-09 16:51 
GeneralRe: About creating Smart Device DLL using Libxml2 Pin
Stuart Dootson20-Jan-09 20:46
professionalStuart Dootson20-Jan-09 20:46 
GeneralRe: About creating Smart Device DLL using Libxml2 Pin
leslie wu20-Jan-09 20:58
leslie wu20-Jan-09 20:58 
GeneralRe: About creating Smart Device DLL using Libxml2 Pin
Stuart Dootson20-Jan-09 21:57
professionalStuart Dootson20-Jan-09 21:57 
GeneralRe: About creating Smart Device DLL using Libxml2 Pin
Stuart Dootson20-Jan-09 23:48
professionalStuart Dootson20-Jan-09 23:48 
QuestionDouble Buffer with Bitblt Pin
Killiconn20-Jan-09 14:28
Killiconn20-Jan-09 14:28 
So I'm trying to create a function that will layer all of the objects I have in the list onto a temp HDC and then BitBlt from it to the actual HDC which is passed in as hdc. If I replace the line BitBlt-ing everything to the hdcTempMem with the same statement BitBlt-ing to hdc I can see it working.

Not sure what needs to be done to get this intermedte hdc to work but it will be needed because otherwise there will be flashing when running at full speed. Anyone able to help me out?

void UpdateDisplay(HWND hwnd, HDC hdc)
	{
		HBITMAP oldImg;
		RECT screenRect;
		HINSTANCE hInst = NULL;
		HDC hdcTempMem, hdcMainMem;
		AniObject curObj;
		int i = 0;
				
		GetClientRect(hwnd, &screenRect);
		hdcMainMem = CreateCompatibleDC(hdc);


                // Loop until all objects have been drawn to the hdcMainMem


		for(objI = objects.begin(); objI != objects.end(); objI++)
		{ 		

                        // Regular bitmap Image
	
			if(objI->objectType == ANIBITMAP)
			{
                                       
				GetObject(objI->hBmp, sizeof(BITMAP), &(objI->bmp));
				hdcTempMem = CreateCompatibleDC(hdcMainMem);

				oldImg = (HBITMAP)SelectObject(hdcTempMem, objI->hBmp);
				BitBlt(hdcMainMem, objI->posX, objI->posY, objI->width, objI->height, hdcTempMem, 0, 0, SRCCOPY);
				DeleteDC(hdcTempMem);
			}

			i++;
		}

		//Copy from hdcMainMem to the actual hdc

		BitBlt(hdc, 0, 0, screenRect.right, screenRect.bottom, hdcMainMem, 0, 0, SRCCOPY);
		DeleteDC(hdcMainMem);

AnswerRe: Double Buffer with Bitblt Pin
Stuart Dootson20-Jan-09 15:55
professionalStuart Dootson20-Jan-09 15:55 
GeneralRe: Double Buffer with Bitblt Pin
Killiconn20-Jan-09 16:19
Killiconn20-Jan-09 16:19 
AnswerRe: Double Buffer with Bitblt Pin
KarstenK21-Jan-09 2:00
mveKarstenK21-Jan-09 2:00 
GeneralHelp required about c language localtime function Pin
Umer Aziz20-Jan-09 6:07
Umer Aziz20-Jan-09 6:07 
GeneralRe: Help required about c language localtime function Pin
CPallini20-Jan-09 6:43
mveCPallini20-Jan-09 6:43 
GeneralRe: Help required about c language localtime function Pin
David Crow20-Jan-09 7:12
David Crow20-Jan-09 7:12 
GeneralRe: Help required about c language localtime function Pin
Umer Aziz20-Jan-09 7:19
Umer Aziz20-Jan-09 7:19 
Questionhow to send a file path from shell extension dll to an application Pin
Nitheesh George20-Jan-09 5:32
Nitheesh George20-Jan-09 5:32 
AnswerRe: how to send a file path from shell extension dll to an application Pin
Code-o-mat20-Jan-09 5:53
Code-o-mat20-Jan-09 5:53 
QuestionSutter/Alexandrescu explanation of Exceptions Pin
Member 260377220-Jan-09 5:29
Member 260377220-Jan-09 5:29 
AnswerRe: Sutter/Alexandrescu explanation of Exceptions Pin
Stuart Dootson20-Jan-09 6:02
professionalStuart Dootson20-Jan-09 6:02 
AnswerRe: Sutter/Alexandrescu explanation of Exceptions Pin
Nemanja Trifunovic20-Jan-09 6:20
Nemanja Trifunovic20-Jan-09 6:20 
QuestionCListBox string wrapping Pin
nuclph20-Jan-09 5:00
nuclph20-Jan-09 5:00 
AnswerRe: CListBox string wrapping Pin
Stuart Dootson20-Jan-09 5:47
professionalStuart Dootson20-Jan-09 5:47 
AnswerRe: CListBox string wrapping Pin
Iain Clarke, Warrior Programmer20-Jan-09 6:11
Iain Clarke, Warrior Programmer20-Jan-09 6:11 
GeneralRe: CListBox string wrapping Pin
Nibu babu thomas20-Jan-09 16:57
Nibu babu thomas20-Jan-09 16:57 
GeneralRe: CListBox string wrapping Pin
Iain Clarke, Warrior Programmer20-Jan-09 21:54
Iain Clarke, Warrior Programmer20-Jan-09 21:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.