Click here to Skip to main content
14,327,173 members

C / C++ / MFC

 
QuestionError running debugger from Visual studio 2010 Pin
Member 935023722-Apr-15 4:28
memberMember 935023722-Apr-15 4:28 
AnswerRe: Error running debugger from Visual studio 2010 Pin
Richard MacCutchan22-Apr-15 6:30
protectorRichard MacCutchan22-Apr-15 6:30 
GeneralRe: Error running debugger from Visual studio 2010 Pin
Member 935023722-Apr-15 23:19
memberMember 935023722-Apr-15 23:19 
GeneralRe: Error running debugger from Visual studio 2010 Pin
Richard MacCutchan22-Apr-15 23:22
protectorRichard MacCutchan22-Apr-15 23:22 
AnswerRe: Error running debugger from Visual studio 2010 Pin
Maximilien22-Apr-15 6:59
memberMaximilien22-Apr-15 6:59 
QuestionVSS restore in C++ Pin
Wshwilfried21-Apr-15 23:04
memberWshwilfried21-Apr-15 23:04 
AnswerRe: VSS restore in C++ Pin
Richard MacCutchan22-Apr-15 0:56
protectorRichard MacCutchan22-Apr-15 0:56 
Question[MFC] Using the SS_OWNERDRAW style on a CStatic control Pin
Maximilien21-Apr-15 9:50
memberMaximilien21-Apr-15 9:50 
(not really urgent, just a general question)

I want to "owner draw" a CStatic to have a custom "GroupBox".

The documentation says that I need to add the SS_OWNERDRAW style to the control; The resource editor does not let me change the style (there's no toggle for that).

So, I added a variable to my test dialog and tried to use ModifyStyle to add the SS_OWNERDRAW style in the dialog OnInitDialog (after the control is created).

I also tried to change the style in custom CStatic's PreSubclassWindow method; but that does not work.

Both changes did not work as expected.

I tried manually create the control in the dialog OnInitDialog; this is the work-around I am using now.
///... 
CRect rect;
GetClientRect(rect);
rect.DeflateRect(10, 10, 10, 10 );
m_CustomGroup.Create(_T(""), SS_OWNERDRAW|WS_CHILD|WS_VISIBLE, rect, this, IDC_CUSTOM_STATIC );
///...

This works, but I remove the ability to use the resource editor to manage the custom static.

Is this the proper way to do it?

Thanks.

Max.
I'd rather be phishing!

AnswerRe: [MFC] Using the SS_OWNERDRAW style on a CStatic control Pin
Richard Andrew x6421-Apr-15 11:22
professionalRichard Andrew x6421-Apr-15 11:22 
GeneralRe: [MFC] Using the SS_OWNERDRAW style on a CStatic control Pin
Maximilien22-Apr-15 3:13
memberMaximilien22-Apr-15 3:13 
AnswerRe: [MFC] Using the SS_OWNERDRAW style on a CStatic control Pin
Jochen Arndt21-Apr-15 21:24
mveJochen Arndt21-Apr-15 21:24 
GeneralRe: [MFC] Using the SS_OWNERDRAW style on a CStatic control Pin
Maximilien22-Apr-15 3:00
memberMaximilien22-Apr-15 3:00 
GeneralRe: [MFC] Using the SS_OWNERDRAW style on a CStatic control Pin
Jochen Arndt22-Apr-15 3:41
mveJochen Arndt22-Apr-15 3:41 
QuestionMultiple Client Support Server Application designed with Named Pipes hangs frequently Pin
SRIVATHSAN VIJAYA20-Apr-15 23:15
memberSRIVATHSAN VIJAYA20-Apr-15 23:15 
SuggestionRe: Multiple Client Support Server Application designed with Named Pipes hangs frequently Pin
Richard MacCutchan20-Apr-15 23:31
protectorRichard MacCutchan20-Apr-15 23:31 
QuestionHow to implement usb touch driver in win ce 6.0 Pin
cedricvictor20-Apr-15 20:56
membercedricvictor20-Apr-15 20:56 
SuggestionRe: How to implement usb touch driver in win ce 6.0 Pin
Richard MacCutchan20-Apr-15 21:22
protectorRichard MacCutchan20-Apr-15 21:22 
QuestionExe file compatibility Pin
lor7517-Apr-15 8:57
memberlor7517-Apr-15 8:57 
AnswerRe: Exe file compatibility Pin
bling17-Apr-15 9:45
memberbling17-Apr-15 9:45 
AnswerRe: Exe file compatibility Pin
David Crow17-Apr-15 10:20
memberDavid Crow17-Apr-15 10:20 
AnswerRe: Exe file compatibility Pin
Frankie-C17-Apr-15 10:58
memberFrankie-C17-Apr-15 10:58 
AnswerRe: Exe file compatibility Pin
Albert Holguin1-May-15 4:56
professionalAlbert Holguin1-May-15 4:56 
QuestionUnable to invoke VIsual Studio debugger in Child process VS2012 pro Pin
ForNow17-Apr-15 3:01
memberForNow17-Apr-15 3:01 
AnswerRe: Unable to debug Child process VS2012 pro follow up Pin
ForNow17-Apr-15 11:34
memberForNow17-Apr-15 11:34 
GeneralI think I found a solution Pin
ForNow20-Apr-15 14:26
memberForNow20-Apr-15 14:26 

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.