Click here to Skip to main content
15,884,176 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
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 
Neil Urquhart wrote:
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.


Hi! I suggest to make the buttons child controls of the image. They have to be child controls, because overlapping siblings are poorly supported by Windows (see KB79981). Yes the MSDN article is one of the worst I have ever read and left me also confused the first time I read it. Even if you would manage to make overlapping controls work somehow else (e.g. by using transparency), you will sooner or later see redraw artefacts such as parts not been redrawn correctly.

Create your buttons as child controls from the start or use SetParent() in CDesignEditDlg::OnInitDialog().

Let me know if this works for you. Smile | :)

/M

[Edit: Fixed name of message handler and added some swearing]


modified on Tuesday, September 15, 2009 8:32 PM

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 
GeneralRe: I want to know which os am using from C code.Is it is possible? Pin
mohant$.net15-Sep-09 3:17
mohant$.net15-Sep-09 3:17 
GeneralRe: I want to know which os am using from C code.Is it is possible? Pin
CPallini15-Sep-09 3:30
mveCPallini15-Sep-09 3:30 
GeneralRe: I want to know which os am using from C code.Is it is possible? Pin
Stuart Dootson15-Sep-09 7:07
professionalStuart Dootson15-Sep-09 7:07 
AnswerRe: I want to know which os am using from C code.Is it is possible? Pin
Moak15-Sep-09 23:26
Moak15-Sep-09 23:26 
QuestionGet pixel data from PBITMAPINFO struct? Pin
Sauce!15-Sep-09 2:15
Sauce!15-Sep-09 2:15 

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.