Click here to Skip to main content
16,015,900 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to get file record from file name? [modified] Pin
chandu00422-Jul-09 1:08
chandu00422-Jul-09 1:08 
GeneralRe: How to get file record from file name? Pin
denghp22-Jul-09 14:52
denghp22-Jul-09 14:52 
GeneralRe: How to get file record from file name? Pin
chandu00422-Jul-09 19:33
chandu00422-Jul-09 19:33 
GeneralRe: How to get file record from file name? Pin
denghp22-Jul-09 19:53
denghp22-Jul-09 19:53 
AnswerRe: How to get file record from file name? Pin
David Crow13-Jul-09 4:41
David Crow13-Jul-09 4:41 
GeneralRe: How to get file record from file name? Pin
denghp14-Jul-09 2:44
denghp14-Jul-09 2:44 
GeneralRe: How to get file record from file name? Pin
David Crow14-Jul-09 2:49
David Crow14-Jul-09 2:49 
QuestionSimple Button Styles Question Pin
Dave Kerr12-Jul-09 23:11
mentorDave Kerr12-Jul-09 23:11 
Hi All,

I'm tearing my hear out over this one. I am subclassing controls dynamically at runtime. I run through each child control of a window, and check it's class. If the class is "BUTTON" I want to subclass it to one of four controls:

CThemedButton : public CButton
CThemedRadioButton : public CButton
CThemedGroupBox : public CButton
CThemedCheckBox : public CButton

However, I cannot for the life of me get the correct combination of window styles to make this work in every case. My code is as below:

bool bGroupBox = (dwControlStyle&BS_GROUPBOX);<br />
			bool bRadioButton = (dwControlStyle&BS_RADIOBUTTON);<br />
			bool bAutoRadioButton = (dwControlStyle&BS_AUTORADIOBUTTON);<br />
			bool bCheckBox = (dwControlStyle&BS_CHECKBOX);<br />
			bool bAutoCheckBox = (dwControlStyle&BS_AUTOCHECKBOX);<br />
			bool bPushLike = (dwControlStyle&BS_PUSHLIKE);


But I'm getting bizarre results. It seems that BS_AUTORADIOBUTTON for example is a combination of other flags, as is BS_GROUPBOX. The end result is I get some buttons that are subclassed, unless they're the default buttons, group boxes aren't picked up, check boxes are missed. The button styles aren't proper flags it seems, so I'm getting cases where bRadioButton, bAutoRadioButton and bGroupBox are all true!

Please can anyone help me here? This should be simple but it's been causing me no end of problems.

Thanks in advance,

Dave Kerr
AnswerRe: Simple Button Styles Question Pin
josda100013-Jul-09 2:12
josda100013-Jul-09 2:12 
Questionstring format Pin
kumamako12-Jul-09 22:58
kumamako12-Jul-09 22:58 
AnswerRe: string format Pin
chandu00412-Jul-09 23:09
chandu00412-Jul-09 23:09 
AnswerRe: string format Pin
CPallini12-Jul-09 23:34
mveCPallini12-Jul-09 23:34 
QuestionRe: string format Pin
David Crow13-Jul-09 4:45
David Crow13-Jul-09 4:45 
Questionstd::search matches start of data before passing to function, but not within function? Pin
Mike the Red12-Jul-09 22:46
Mike the Red12-Jul-09 22:46 
AnswerFound it... Pin
Mike the Red12-Jul-09 23:24
Mike the Red12-Jul-09 23:24 
QuestionCFormView in CDockablePane Pin
eight12-Jul-09 22:44
eight12-Jul-09 22:44 
QuestionNeed a program that implements nearest neighbor method in c Pin
singh.vikas850812-Jul-09 21:55
singh.vikas850812-Jul-09 21:55 
AnswerRe: Need a program that implements nearest neighbor method in c Pin
Rajesh R Subramanian12-Jul-09 21:59
professionalRajesh R Subramanian12-Jul-09 21:59 
AnswerRe: Need a program that implements nearest neighbor method in c Pin
CPallini12-Jul-09 22:07
mveCPallini12-Jul-09 22:07 
GeneralRe: Need a program that implements nearest neighbor method in c Pin
Rajesh R Subramanian12-Jul-09 22:18
professionalRajesh R Subramanian12-Jul-09 22:18 
GeneralRe: Need a program that implements nearest neighbor method in c Pin
CPallini12-Jul-09 23:30
mveCPallini12-Jul-09 23:30 
GeneralRe: Need a program that implements nearest neighbor method in c Pin
Rajesh R Subramanian12-Jul-09 23:39
professionalRajesh R Subramanian12-Jul-09 23:39 
GeneralRe: Need a program that implements nearest neighbor method in c Pin
CPallini13-Jul-09 0:07
mveCPallini13-Jul-09 0:07 
GeneralRe: Need a program that implements nearest neighbor method in c Pin
Rajesh R Subramanian13-Jul-09 0:14
professionalRajesh R Subramanian13-Jul-09 0:14 
AnswerRe: Need a program that implements nearest neighbor method in c Pin
KarstenK12-Jul-09 22:24
mveKarstenK12-Jul-09 22:24 

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.