Click here to Skip to main content
15,887,027 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: draw a rectangle in dialog based visual C++ 6.0 Pin
CPallini23-Sep-09 21:27
mveCPallini23-Sep-09 21:27 
AnswerRe: draw a rectangle in dialog based visual C++ 6.0 Pin
«_Superman_»23-Sep-09 21:30
professional«_Superman_»23-Sep-09 21:30 
JokeRe: draw a rectangle in dialog based visual C++ 6.0 Pin
CPallini23-Sep-09 21:36
mveCPallini23-Sep-09 21:36 
GeneralRe: draw a rectangle in dialog based visual C++ 6.0 Pin
«_Superman_»23-Sep-09 22:38
professional«_Superman_»23-Sep-09 22:38 
GeneralRe: draw a rectangle in dialog based visual C++ 6.0 Pin
Eka Candra23-Sep-09 22:17
Eka Candra23-Sep-09 22:17 
QuestionRe: draw a rectangle in dialog based visual C++ 6.0 Pin
CPallini23-Sep-09 22:26
mveCPallini23-Sep-09 22:26 
AnswerRe: draw a rectangle in dialog based visual C++ 6.0 Pin
Eka Candra23-Sep-09 22:49
Eka Candra23-Sep-09 22:49 
AnswerRe: draw a rectangle in dialog based visual C++ 6.0 Pin
CPallini23-Sep-09 21:24
mveCPallini23-Sep-09 21:24 
First, please use code block button when posting code snippets.

As about the code, you should never call OnPaint() explicitely in your code, change from
Eka Candra wrote:
void CGambarDlg::OnButton1()
{
red = green = blue = 255;
OnPaint();
}


to

void CGambarDlg::OnButton1()
{
  InvalidateRect(NULL);
  UpdateWindow();
}


See documentation (InvalidateRect [^], UpdateWindow [^] for details).
Smile | :)

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke

[My articles]

GeneralRe: draw a rectangle in dialog based visual C++ 6.0 Pin
Eka Candra23-Sep-09 22:38
Eka Candra23-Sep-09 22:38 
GeneralRe: draw a rectangle in dialog based visual C++ 6.0 Pin
KarstenK23-Sep-09 22:51
mveKarstenK23-Sep-09 22:51 
GeneralRe: draw a rectangle in dialog based visual C++ 6.0 Pin
CPallini23-Sep-09 22:54
mveCPallini23-Sep-09 22:54 
AnswerRe: draw a rectangle in dialog based visual C++ 6.0 Pin
Eka Candra23-Sep-09 23:04
Eka Candra23-Sep-09 23:04 
GeneralRe: draw a rectangle in dialog based visual C++ 6.0 Pin
Richard MacCutchan24-Sep-09 1:13
mveRichard MacCutchan24-Sep-09 1:13 
QuestionMY simple txt Based Rpg Pin
akosidandan23-Sep-09 20:15
akosidandan23-Sep-09 20:15 
AnswerRe: MY simple txt Based Rpg Pin
CPallini23-Sep-09 20:49
mveCPallini23-Sep-09 20:49 
GeneralRe: MY simple txt Based Rpg Pin
akosidandan23-Sep-09 21:12
akosidandan23-Sep-09 21:12 
GeneralRe: MY simple txt Based Rpg Pin
CPallini23-Sep-09 21:28
mveCPallini23-Sep-09 21:28 
GeneralRe: MY simple txt Based Rpg Pin
akosidandan23-Sep-09 21:47
akosidandan23-Sep-09 21:47 
GeneralRe: MY simple txt Based Rpg Pin
CPallini23-Sep-09 21:55
mveCPallini23-Sep-09 21:55 
GeneralRe: MY simple txt Based Rpg Pin
akosidandan24-Sep-09 16:01
akosidandan24-Sep-09 16:01 
QuestionPlease help to display System Tray Ballon in XP. [modified] Pin
Le@rner23-Sep-09 19:54
Le@rner23-Sep-09 19:54 
AnswerRe: Please help to display System Tray Ballon in XP. Pin
kilt24-Sep-09 7:01
kilt24-Sep-09 7:01 
Questionshell32.dll!7ca51646() Pin
MsmVc23-Sep-09 19:15
MsmVc23-Sep-09 19:15 
AnswerRe: shell32.dll!7ca51646() Pin
«_Superman_»23-Sep-09 19:30
professional«_Superman_»23-Sep-09 19:30 
GeneralRe: shell32.dll!7ca51646() Pin
MsmVc23-Sep-09 19:57
MsmVc23-Sep-09 19:57 

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.