Click here to Skip to main content
15,881,882 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionQuestion on g++ compiler options Pin
minkowski15-Sep-09 6:23
minkowski15-Sep-09 6:23 
AnswerRe: Question on g++ compiler options Pin
Stuart Dootson15-Sep-09 7:06
professionalStuart Dootson15-Sep-09 7:06 
GeneralRe: Question on g++ compiler options Pin
minkowski15-Sep-09 22:47
minkowski15-Sep-09 22:47 
GeneralRe: Question on g++ compiler options Pin
Stuart Dootson15-Sep-09 23:33
professionalStuart Dootson15-Sep-09 23:33 
GeneralRe: Question on g++ compiler options Pin
minkowski16-Sep-09 0:29
minkowski16-Sep-09 0:29 
GeneralRe: Question on g++ compiler options Pin
Stuart Dootson16-Sep-09 0:37
professionalStuart Dootson16-Sep-09 0:37 
GeneralRe: Question on g++ compiler options Pin
minkowski16-Sep-09 1:00
minkowski16-Sep-09 1:00 
QuestionHow can I force the redraw of buttons which overlay a picture bitmap in a Dialog Pin
Neil Urquhart15-Sep-09 4:31
Neil Urquhart15-Sep-09 4:31 
Using MFC Dialog App with VC6

I need some help to force redraw of buttons?

I have a bitmap image displayed in my dialog using the picture control and have positioned over the top of it number of CButton's (ie the buttons overlap the image). I want to get the buttons to remain displayed when I change the bitmap image in the button selected function.

If I have an "OnSel" function for each button with code like this :

void CDesignEditDlg::OnButtonSel3() <br />
{<br />
	// TODO: Add your control notification handler code here<br />
	MessageBox("Button 3 Pressed", "Select", MB_OK) ;<br />
	<br />
}


When I run the app and press a button it is all fine, ie I get the button pressed message pops up and all the buttons are still shown.

Since I want to change the image displayed while the button is pressed I tried to modify my code to something like this.

void CDesignEditDlg::OnButtonSel2() <br />
{<br />
	// TODO: Add your control notification handler code here<br />
	// Set new image<br />
	m_ctrlPageImage.SetBitmap(cBmp[1]);<br />
<br />
	MessageBox("Button 2 Pressed", "Select", MB_OK) ;<br />
<br />
	// Put old image back<br />
	m_ctrlPageImage.SetBitmap(cBmp[0]);<br />
}



This works in that it changes the displayed image while the popup message is on screen but all the buttons other than the one I pressed have disappeared.

Is there a way to force MFC to redraw my buttons over the top of the image after I have changed it ??
AnswerRe: How can I force the redraw of buttons which overlay a picture bitmap in a Dialog Pin
Code-o-mat15-Sep-09 4:48
Code-o-mat15-Sep-09 4:48 
GeneralRe: How can I force the redraw of buttons which overlay a picture bitmap in a Dialog Pin
Neil Urquhart15-Sep-09 6:02
Neil Urquhart15-Sep-09 6:02 
GeneralRe: How can I force the redraw of buttons which overlay a picture bitmap in a Dialog Pin
Neil Urquhart15-Sep-09 6:09
Neil Urquhart15-Sep-09 6:09 
GeneralRe: How can I force the redraw of buttons which overlay a picture bitmap in a Dialog Pin
Code-o-mat15-Sep-09 6:13
Code-o-mat15-Sep-09 6:13 
AnswerRe: How can I force the redraw of buttons which overlay a picture bitmap in a Dialog [modified] Pin
Moak15-Sep-09 14:09
Moak15-Sep-09 14:09 
GeneralRe: How can I force the redraw of buttons which overlay a picture bitmap in a Dialog Pin
Neil Urquhart15-Sep-09 20:04
Neil Urquhart15-Sep-09 20:04 
GeneralRe: How can I force the redraw of buttons which overlay a picture bitmap in a Dialog Pin
Neil Urquhart15-Sep-09 20:57
Neil Urquhart15-Sep-09 20:57 
GeneralRe: How can I force the redraw of buttons which overlay a picture bitmap in a Dialog Pin
Moak15-Sep-09 23:21
Moak15-Sep-09 23:21 
GeneralRe: How can I force the redraw of buttons which overlay a picture bitmap in a Dialog Pin
Neil Urquhart16-Sep-09 2:53
Neil Urquhart16-Sep-09 2:53 
GeneralRe: How can I force the redraw of buttons which overlay a picture bitmap in a Dialog Pin
Moak16-Sep-09 3:19
Moak16-Sep-09 3:19 
GeneralRe: How can I force the redraw of buttons which overlay a picture bitmap in a Dialog Pin
Neil Urquhart16-Sep-09 3:56
Neil Urquhart16-Sep-09 3:56 
QuestionRe: How can I force the redraw of buttons which overlay a picture bitmap in a Dialog Pin
Moak16-Sep-09 4:21
Moak16-Sep-09 4:21 
AnswerRe: How can I force the redraw of buttons which overlay a picture bitmap in a Dialog Pin
Neil Urquhart16-Sep-09 4:41
Neil Urquhart16-Sep-09 4:41 
GeneralRe: How can I force the redraw of buttons which overlay a picture bitmap in a Dialog Pin
Moak16-Sep-09 5:12
Moak16-Sep-09 5:12 
QuestionI want to know which os am using from C code.Is it is possible? Pin
mohant$.net15-Sep-09 2:20
mohant$.net15-Sep-09 2:20 
QuestionRe: I want to know which os am using from C code.Is it is possible? Pin
David Crow15-Sep-09 2:36
David Crow15-Sep-09 2:36 
JokeRe: I want to know which os am using from C code.Is it is possible? Pin
CPallini15-Sep-09 2:46
mveCPallini15-Sep-09 2:46 

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.