Click here to Skip to main content
15,922,512 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Suggest a third party library for MFC applications Pin
rahul.kulshreshtha14-Oct-11 7:14
rahul.kulshreshtha14-Oct-11 7:14 
GeneralRe: Suggest a third party library for MFC applications Pin
_AnsHUMAN_ 16-Oct-11 18:51
_AnsHUMAN_ 16-Oct-11 18:51 
AnswerRe: Suggest a third party library for MFC applications Pin
Maximilien14-Oct-11 1:05
Maximilien14-Oct-11 1:05 
GeneralRe: Suggest a third party library for MFC applications Pin
Stefan_Lang14-Oct-11 6:25
Stefan_Lang14-Oct-11 6:25 
GeneralRe: Suggest a third party library for MFC applications Pin
rahul.kulshreshtha14-Oct-11 7:20
rahul.kulshreshtha14-Oct-11 7:20 
AnswerRe: third party ui controls for MFC Pin
Software_Developer14-Oct-11 1:44
Software_Developer14-Oct-11 1:44 
GeneralRe: third party ui controls for MFC Pin
rahul.kulshreshtha14-Oct-11 7:09
rahul.kulshreshtha14-Oct-11 7:09 
AnswerRe: Suggest a third party library for MFC applications Pin
Rolf Kristensen14-Oct-11 9:54
Rolf Kristensen14-Oct-11 9:54 
AnswerRe: Suggest a third party library for MFC applications Pin
rahul.kulshreshtha20-Oct-11 20:04
rahul.kulshreshtha20-Oct-11 20:04 
GeneralRe: Suggest a third party library for MFC applications Pin
rahul.kulshreshtha30-Oct-11 20:51
rahul.kulshreshtha30-Oct-11 20:51 
QuestionFile Locations on Win 7 Pin
softwaremonkey13-Oct-11 10:55
softwaremonkey13-Oct-11 10:55 
AnswerRe: File Locations on Win 7 Pin
André Kraak13-Oct-11 11:08
André Kraak13-Oct-11 11:08 
AnswerRe: File Locations on Win 7 Pin
_AnsHUMAN_ 13-Oct-11 20:21
_AnsHUMAN_ 13-Oct-11 20:21 
AnswerRe: File Locations on Win 7 Pin
«_Superman_»13-Oct-11 22:03
professional«_Superman_»13-Oct-11 22:03 
GeneralRe: File Locations on Win 7 Pin
softwaremonkey13-Oct-11 22:50
softwaremonkey13-Oct-11 22:50 
AnswerRe: File Locations on Win 7 Pin
Snorri Kristjansson14-Oct-11 1:27
professionalSnorri Kristjansson14-Oct-11 1:27 
GeneralRe: File Locations on Win 7 Pin
softwaremonkey14-Oct-11 10:13
softwaremonkey14-Oct-11 10:13 
AnswerRe: File Locations on Win 7 Pin
jkirkerx14-Oct-11 7:49
professionaljkirkerx14-Oct-11 7:49 
GeneralRe: File Locations on Win 7 Pin
softwaremonkey14-Oct-11 10:21
softwaremonkey14-Oct-11 10:21 
Question[mfc, custom control] Default Button Pin
csrss13-Oct-11 6:15
csrss13-Oct-11 6:15 
AnswerRe: Implement an NM_CUSTOMDRAW Message Handler Pin
Software_Developer13-Oct-11 6:36
Software_Developer13-Oct-11 6:36 
GeneralRe: Implement an NM_CUSTOMDRAW Message Handler Pin
csrss13-Oct-11 6:51
csrss13-Oct-11 6:51 
AnswerRe: [mfc, custom control] Default Button Pin
Richard MacCutchan13-Oct-11 7:48
mveRichard MacCutchan13-Oct-11 7:48 
GeneralRe: [mfc, custom control] Default Button Pin
csrss13-Oct-11 7:58
csrss13-Oct-11 7:58 
AnswerRe: [mfc, custom control] Default Button Pin
André Kraak13-Oct-11 8:41
André Kraak13-Oct-11 8:41 
You need to several things:

1. Override CWnd::OnGetDlgCode[^] and specify that your control accepts becoming a default push button (DLGC_DEFPUSHBUTTON).

2. Handle the BM_SETSTYLE[^] message in your button class, so that you are informed when windows set and removes the BS_DEFPUSHBUTTON style for your button and paint the button accordingly.
0100000101101110011001000111001011101001

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.