Click here to Skip to main content
15,920,801 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: [C] IRC client check if he is still operative Pin
Code-o-mat11-Jan-09 22:15
Code-o-mat11-Jan-09 22:15 
GeneralRe: [C] IRC client check if he is still operative Pin
ogn0s12-Jan-09 9:05
ogn0s12-Jan-09 9:05 
QuestionCSlider that works backwards Pin
Chris Hills11-Jan-09 10:20
Chris Hills11-Jan-09 10:20 
AnswerRe: CSlider that works backwards Pin
Graham Bradshaw11-Jan-09 11:52
Graham Bradshaw11-Jan-09 11:52 
AnswerRe: CSlider that works backwards Pin
Richard Andrew x6411-Jan-09 12:04
professionalRichard Andrew x6411-Jan-09 12:04 
QuestionTrying to create a File Menu [modified] Pin
BobInNJ11-Jan-09 9:06
BobInNJ11-Jan-09 9:06 
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 
Regards
I have a problem. I cant get to refresh an image the second time it should be displayed. I am using gdi+ function Graphics::DrawImage. The image displays correctly but the second time (in a loop) the function is called the image isn't refreshed. Instead the image stays (on screen) as the first time it was drawn. I know that the image (bitmap) is changed between the two calls for DrawImage function because, when I do something with the window the image is drawn to, (like resizing it, minimizing etc.), the image is refreshed, but if I do nothing the image stays as it is the first time DrawImage draws it. I am changing image's pixels in another function named Render(), that is called before DrawImage.
Is there another function that draws image on screen, or is there a clear screen function. (I tried with graphics.Clear(color) function but after it the screen is filled with the color 'color' and again it it stays like that indefinitely)
The bitmap is created in memory and isn't read from the disk (although it's the same thing once it is in memory).
Here is part of the code which is called continously (in a loop):

void Prikaz(HDC hdc){
    Graphics graphics(hdc);
    Render();
    Bitmap FrameBuffer((BITMAPINFO*) &((*BMPSlika).InfoHeader), (*BMPSlika).PixelData);
    graphics.DrawImage(&FrameBuffer,0,0);
}


BMPSlika is a pointer to the bitmap image structure.
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 
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 

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.