Click here to Skip to main content
15,917,320 members
Home / Discussions / Graphics
   

Graphics

 
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 
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 
Read the message please.

Mark Salsbery wrote:
You mentioned something about a loop in your first post - where is this loop and
what is it (supposed to be) doing?


for "loop" i meant calling the Prikaz() function over again (that was in first post)


Mark Salsbery wrote:
WM_PAINT is posted to your window's message queue by the system. The parameters are
not in your control, nor are they wrong, nor should you be trying to send/post a WM_PAINT
message yourself.


i'm not trying to change the message to constantly switch to WM_PAINT case, nor I said the parameters are whong (READ THE MESSAGES and then answer them if you wish to)


Mark Salsbery wrote:

Window rendering has been the same since the beginning of Windows....the problem is in YOUR code,
not some problem in MFC (which you're not using apparently), .NET (which you're not using apparently),
or the system.



the problem IS in my code (that's why I asked for help in the first place) , and there IS a problem with my .NET config in my VS.


Mark Salsbery wrote:
This code has nothing to do with WM_PAINT or Invalidatexxxx() functions. The bitmap will be rendered
immediately if the HDC and the Bitmap are valid.



that code is called when the WM_PAINT message is set.
the bitmap is rendered (correctly), but only the first time the WM_PAINT is called. the WM_PAINT is called (in my program) only when i do something with the window the image is displayed in, like resizing, minimizing, holding a mouse pointer over the window.....
in the first two situations, when i resize it or minimize (and maximize ofc) the image that is displayed gets updated... (my image in the program is constantly changed in the Render() function)
in the last situation when i hold a mouse pointer over the window the WM_PAINT case gets executed, and whit it the Prikaz function, but then the image doesnt get updated.
I was asking for a way to constantly update the image when WM_PAINT is switched.

Mark Salsbery wrote:
According to your comments, your WM_PAINT handling code is working fine, so where else are
you calling this from and how are you obtaining the HDC?


i dont understand you, i'm not calling it from anywhere else in my code.
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, hWnd);
      return 0;
   case WM_DESTROY:
      PostQuitMessage(0);
	  SnimiBitmap();
      return 0;
   default:
      return DefWindowProc(hWnd, message, wParam, lParam);
   }

i'm geting it with the BeginPaint
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 
AnswerRe: open gl: getting texture dimensions from a texture handle Pin
El Corazon1-Jan-09 6:59
El Corazon1-Jan-09 6:59 
GeneralRe: open gl: getting texture dimensions from a texture handle Pin
Jim Crafton1-Jan-09 7:08
Jim Crafton1-Jan-09 7:08 

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.