Click here to Skip to main content
14,454,012 members

C / C++ / MFC

 
QuestionAdjust paper size Pin
Erich Ruth17-Aug-15 11:02
MemberErich Ruth17-Aug-15 11:02 
AnswerRe: Adjust paper size Pin
Kenneth Walters17-Aug-15 12:09
MemberKenneth Walters17-Aug-15 12:09 
QuestionWindows 10 & WM_QUERY_ENDSESSION/WM_ENDSESSION Pin
Peter Weyzen17-Aug-15 5:51
MemberPeter Weyzen17-Aug-15 5:51 
Questionc++ Qt or C# or JAVA !! Pin
Dreamer_X15-Aug-15 4:51
MemberDreamer_X15-Aug-15 4:51 
AnswerRe: c++ Qt or C# or JAVA !! Pin
OriginalGriff15-Aug-15 4:54
communityengineerOriginalGriff15-Aug-15 4:54 
AnswerRe: c++ Qt or C# or JAVA !! Pin
ThatsAlok20-Aug-15 1:24
MemberThatsAlok20-Aug-15 1:24 
QuestionFirst button of toolbar control get activated after another button get executed Pin
Amrit Agr14-Aug-15 2:35
MemberAmrit Agr14-Aug-15 2:35 
QuestionCheckbox: SetFocus() doesn't draw broken rectangle around it Pin
Donguy197613-Aug-15 14:39
MemberDonguy197613-Aug-15 14:39 
I am working on a legacy Windows app written in Win32.

There's a checkbox in the screen and i call the SetFocus() function to have the focus on it. I know that it works as far as setting the focus, because now i can use space button in keyboard to check and uncheck the checkbox.

But the problem is, when a control get's the focus, it's supposed show a broken rectangle around it. In my case this broken rectangle is not drawn/shown all the time. Sometimes it shows the broken rectangle and some times it doesn't.

I need to show some visual indication to user that this checkbox has the focus. I tried using WM_CTLCOLORSTATIC, but that creates some painting issues in the window.

So am looking for a simpler solution, by which i could show some visual indicator to user that this checkbox is having focus.

Like changing the text color or background color or even force draw a broken rectangle.

But i have no idea how to do this without using the WM_CTLCOLORSTATIC.

Is there a easier way to show some sort of visual indication on a checkbox in Win32?

Thanks in advance!
AnswerRe: Checkbox: SetFocus() doesn't draw broken rectangle around it Pin
Arthur V. Ratz13-Aug-15 20:13
mvaArthur V. Ratz13-Aug-15 20:13 
QuestionLearning C++ Pin
Kevin Marois13-Aug-15 12:12
professionalKevin Marois13-Aug-15 12:12 
AnswerRe: Learning C++ Pin
jeron113-Aug-15 13:09
Memberjeron113-Aug-15 13:09 
GeneralRe: Learning C++ Pin
Kevin Marois13-Aug-15 13:13
professionalKevin Marois13-Aug-15 13:13 
AnswerRe: Learning C++ Pin
Nitin K. Kawale17-Aug-15 2:55
professionalNitin K. Kawale17-Aug-15 2:55 
QuestionURLDownloadToFile stopped working on Windows 10 Pin
DavidBaird12-Aug-15 14:18
MemberDavidBaird12-Aug-15 14:18 
SuggestionRe: URLDownloadToFile stopped working on Windows 10 Pin
Ujesh Mohanan13-Aug-15 4:30
MemberUjesh Mohanan13-Aug-15 4:30 
GeneralRe: URLDownloadToFile stopped working on Windows 10 Pin
DavidBaird13-Aug-15 11:43
MemberDavidBaird13-Aug-15 11:43 
QuestionHow to read an XML file in C++.? Pin
Member 874411112-Aug-15 1:02
MemberMember 874411112-Aug-15 1:02 
JokeRe: How to read an XML file in C++.? Pin
enhzflep12-Aug-15 1:12
Memberenhzflep12-Aug-15 1:12 
AnswerRe: How to read an XML file in C++.? Pin
David Crow12-Aug-15 2:58
MemberDavid Crow12-Aug-15 2:58 
AnswerRe: How to read an XML file in C++.? Pin
Richard MacCutchan12-Aug-15 2:58
communityengineerRichard MacCutchan12-Aug-15 2:58 
AnswerRe: How to read an XML file in C++.? Pin
Ujesh Mohanan12-Aug-15 3:05
MemberUjesh Mohanan12-Aug-15 3:05 
AnswerRe: How to read an XML file in C++.? Pin
DavidBaird12-Aug-15 14:29
MemberDavidBaird12-Aug-15 14:29 
AnswerRe: How to read an XML file in C++.? Pin
Maximilien17-Aug-15 4:36
MemberMaximilien17-Aug-15 4:36 
AnswerRe: How to read an XML file in C++.? Pin
Peter Weyzen17-Aug-15 5:54
MemberPeter Weyzen17-Aug-15 5:54 
QuestionManabJB Pin
Member 1189993510-Aug-15 17:05
MemberMember 1189993510-Aug-15 17:05 

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.