Click here to Skip to main content
15,900,110 members
Home / Discussions / Graphics
   

Graphics

 
QuestionProblem in GDI+ Pin
vinay_K12-Jan-09 2:04
vinay_K12-Jan-09 2:04 
AnswerRe: Problem in GDI+ Pin
Henry Minute12-Jan-09 2:16
Henry Minute12-Jan-09 2:16 
QuestionGDI+ refresh image (C++) Pin
Valdyr11-Jan-09 9:14
Valdyr11-Jan-09 9:14 
AnswerRe: GDI+ refresh image (C++) Pin
Tim Craig11-Jan-09 17:03
Tim Craig11-Jan-09 17:03 
GeneralRe: GDI+ refresh image (C++) [modified] Pin
Valdyr11-Jan-09 23:25
Valdyr11-Jan-09 23:25 
GeneralRe: GDI+ refresh image (C++) Pin
Tim Craig12-Jan-09 9:53
Tim Craig12-Jan-09 9:53 
GeneralRe: GDI+ refresh image (C++) Pin
Valdyr12-Jan-09 13:46
Valdyr12-Jan-09 13:46 
QuestionRe: GDI+ refresh image (C++) [modified] Pin
Valdyr13-Jan-09 1:46
Valdyr13-Jan-09 1:46 
there is a problem and I cant use invalidate, i'll work on that. in the meanwhile here is WndProc procedure, it might bee something here that prevents image being refreshed. I think some of the variables in PAINTSTRUCT ps, HWND hWnd, and HDC hdc are not properly set for the image to be refreshed; (firstly I think it has something to do with PAINTSTRUCT);

LRESULT CALLBACK WndProc(HWND hWnd, UINT message, 
   WPARAM wParam, LPARAM lParam){
   PAINTSTRUCT  ps;
   HDC		hdc;

   switch(message){
   case WM_PAINT:
	 hdc = BeginPaint(hWnd, &ps);
	 Prikaz(hdc);
      return 0;
   case WM_DESTROY:
      PostQuitMessage(0);
	  SnimiBitmap();
      return 0;
   default:
      return DefWindowProc(hWnd, message, wParam, lParam);
   }
}


this is WndProc process, in case it can solve my problem. I think there is something with this WM_PAINT case, it is called only when I resize, minimize, move it offscreen OR when i hold mouse pointer over the (display) window.
In first three situations when I resize, minimize, or move offscreen, the image does get refreshed, (the WM_PAINT case is executed and in it the Prikaz(hdc) iz executed which displays new image)
In the fourth situation, when I hold a mouse pointer over the display window, the WM_PAINT case is switched and the Prikaz(hdc) does get executed (including all the functions in Prikaz(hdc)), but the image doesn't get refreshed...? D'Oh! | :doh:
this leads me to conclusion that, in situation when the mouse is over the display window, something is not "properly" set in this line, (since the Prikaz(hdc) uses argument hdc):
hdc = BeginPaint(hWnd, &ps);
I have seen the variables in ps (which is an PAINTSTRUCT structure), the hWnd (which is of HWND type) and hdc (HDC type (:lol))... In each situation they hold different values except for ps.fErase, ps.fIncUpdate, ps.fRestore. they are allways set to value 0;
there is allso ps.rgbReserved which is an pointer to an array of bytes but i'll examine it more closely.
if anyone knows about PAINTSTRUCT structure or hWnd and hdc, what is wrong with them when the image doesn't get refreshed, please let me know. in meanwhile I will try something with ps.rgbReserved, and try to get invalidate() function to include in my code, (this has something to do with .NET namespaces to do i think)....
AnswerRe: GDI+ refresh image (C++) Pin
Mark Salsbery13-Jan-09 6:38
Mark Salsbery13-Jan-09 6:38 
GeneralRe: GDI+ refresh image (C++) Pin
Valdyr13-Jan-09 9:07
Valdyr13-Jan-09 9:07 
GeneralRe: GDI+ refresh image (C++) Pin
Mark Salsbery13-Jan-09 9:27
Mark Salsbery13-Jan-09 9:27 
GeneralRe: GDI+ refresh image (C++) Pin
Valdyr13-Jan-09 10:06
Valdyr13-Jan-09 10:06 
GeneralRe: GDI+ refresh image (C++) Pin
Mark Salsbery13-Jan-09 18:53
Mark Salsbery13-Jan-09 18:53 
GeneralRe: GDI+ refresh image (C++) Pin
Valdyr14-Jan-09 8:48
Valdyr14-Jan-09 8:48 
GeneralRe: GDI+ refresh image (C++) Pin
Mark Salsbery14-Jan-09 8:59
Mark Salsbery14-Jan-09 8:59 
GeneralRe: GDI+ refresh image (C++) Pin
Valdyr14-Jan-09 9:09
Valdyr14-Jan-09 9:09 
GeneralRe: GDI+ refresh image (C++) Pin
Tim Craig14-Jan-09 8:39
Tim Craig14-Jan-09 8:39 
GeneralRe: GDI+ refresh image (C++) Pin
Valdyr14-Jan-09 8:58
Valdyr14-Jan-09 8:58 
AnswerRe: GDI+ refresh image (C++) Pin
Valdyr14-Jan-09 9:07
Valdyr14-Jan-09 9:07 
Question[OpenGL] multithread drawing Pin
King Tran10-Jan-09 15:58
King Tran10-Jan-09 15:58 
AnswerRe: [OpenGL] multithread drawing Pin
xavierkj13-Jul-09 0:35
xavierkj13-Jul-09 0:35 
QuestionProgrammatically Detecting GPU Specs (shading processors) Pin
Daniel Sparks7-Jan-09 8:11
Daniel Sparks7-Jan-09 8:11 
QuestionSIP phone and Flash Pin
bigphish1-Jan-09 21:43
bigphish1-Jan-09 21:43 
QuestionAdding a jpeg to a postscript file Pin
guruthos1-Jan-09 12:09
guruthos1-Jan-09 12:09 
Questionopen gl: getting texture dimensions from a texture handle Pin
Jim Crafton30-Dec-08 13:11
Jim Crafton30-Dec-08 13:11 

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.