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

C / C++ / MFC

 
AnswerRe: Trying to create a File Menu Pin
BobInNJ11-Jan-09 9:25
BobInNJ11-Jan-09 9:25 
QuestionGDI+ image refresh (C++) Pin
Valdyr11-Jan-09 7:38
Valdyr11-Jan-09 7:38 
AnswerRe: GDI+ image refresh (C++) Pin
Baltoro11-Jan-09 10:55
Baltoro11-Jan-09 10:55 
GeneralRe: GDI+ image refresh (C++) [modified] Pin
Valdyr11-Jan-09 23:28
Valdyr11-Jan-09 23:28 
AnswerRe: GDI+ image refresh (C++) Pin
Mark Salsbery12-Jan-09 7:27
Mark Salsbery12-Jan-09 7:27 
GeneralRe: GDI+ image refresh (C++) Pin
Valdyr12-Jan-09 13:32
Valdyr12-Jan-09 13:32 
GeneralRe: GDI+ image refresh (C++) Pin
Mark Salsbery13-Jan-09 6:43
Mark Salsbery13-Jan-09 6:43 
QuestionRe: GDI+ image refresh (C++) Pin
Valdyr13-Jan-09 2:45
Valdyr13-Jan-09 2:45 
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 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)....

(i have posted this message also in the graphics forum under the same name of the question. At the time i first asked the question i didn't know weather to post it in this forum or graphics because this has something to do with MFC, (with the MFC function: invalidate(), and the thing that i'm not being able to use this function)...)
QuestionExecute one instance of application per system Pin
Mohammad Khodaea11-Jan-09 1:51
Mohammad Khodaea11-Jan-09 1:51 
AnswerRe: Execute one instance of application per system Pin
Hamid_RT11-Jan-09 1:58
Hamid_RT11-Jan-09 1:58 
QuestionSetWindowText function error Pin
KARFER11-Jan-09 1:50
KARFER11-Jan-09 1:50 
AnswerRe: SetWindowText function error Pin
Hamid_RT11-Jan-09 1:53
Hamid_RT11-Jan-09 1:53 
GeneralRe: SetWindowText function error Pin
KARFER11-Jan-09 9:44
KARFER11-Jan-09 9:44 
AnswerRe: SetWindowText function error Pin
Stephen Hewitt11-Jan-09 4:11
Stephen Hewitt11-Jan-09 4:11 
QuestionFind All databases in a SQL Server Instance using VC++ 6.0 Pin
unniks10-Jan-09 16:53
unniks10-Jan-09 16:53 
AnswerRe: Find All databases in a SQL Server Instance using VC++ 6.0 Pin
Hamid_RT11-Jan-09 2:01
Hamid_RT11-Jan-09 2:01 
GeneralRe: Find All databases in a SQL Server Instance using VC++ 6.0 Pin
unniks11-Jan-09 5:06
unniks11-Jan-09 5:06 
AnswerRe: Find All databases in a SQL Server Instance using VC++ 6.0 Pin
David Crow12-Jan-09 3:27
David Crow12-Jan-09 3:27 
AnswerRe: Find All databases in a SQL Server Instance using VC++ 6.0 Pin
Member 8157212-Jan-09 22:19
Member 8157212-Jan-09 22:19 
QuestionQuestion about Inject DLL Redirect wsock Pin
VB_Crazy10-Jan-09 16:42
VB_Crazy10-Jan-09 16:42 
AnswerRe: Question about Inject DLL Redirect wsock Pin
Code-o-mat11-Jan-09 8:48
Code-o-mat11-Jan-09 8:48 
GeneralRe: Question about Inject DLL Redirect wsock Pin
VB_Crazy12-Jan-09 0:26
VB_Crazy12-Jan-09 0:26 
GeneralRe: Question about Inject DLL Redirect wsock Pin
Code-o-mat12-Jan-09 0:38
Code-o-mat12-Jan-09 0:38 
AnswerRe: Question about Inject DLL Redirect wsock Pin
VB_Crazy12-Jan-09 22:42
VB_Crazy12-Jan-09 22:42 
QuestionList control ignores FindItem? Pin
nobaq10-Jan-09 10:12
nobaq10-Jan-09 10:12 

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.