Click here to Skip to main content
15,918,193 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralBMP to AVI Pin
waelahmed5-Apr-04 10:11
waelahmed5-Apr-04 10:11 
GeneralCombox in Visual C++ 6.0 Pin
Charlie Curtis5-Apr-04 9:54
Charlie Curtis5-Apr-04 9:54 
GeneralRe: Combox in Visual C++ 6.0 Pin
David Crow5-Apr-04 10:19
David Crow5-Apr-04 10:19 
GeneralRe: Combox in Visual C++ 6.0 Pin
Charlie Curtis5-Apr-04 10:46
Charlie Curtis5-Apr-04 10:46 
GeneralSetFocus problem - Controls don't get highlighted when SetFocus is called Pin
Chulips5-Apr-04 7:54
Chulips5-Apr-04 7:54 
GeneralRe: SetFocus problem - Controls don't get highlighted when SetFocus is called Pin
avenger_sb255-Apr-04 8:40
avenger_sb255-Apr-04 8:40 
GeneralRe: SetFocus problem - Controls don't get highlighted when SetFocus is called Pin
Chulips5-Apr-04 11:40
Chulips5-Apr-04 11:40 
GeneralRe: SetFocus problem - Controls don't get highlighted when SetFocus is called Pin
Mike Dimmick6-Apr-04 0:37
Mike Dimmick6-Apr-04 0:37 
Ignore the other poster. This is a feature of Windows 2000 and XP - focus is only drawn when the user actually interacts with the UI using the keyboard.

Note: I'm talking about focus rectangles, the dotted lines that appear inside the button. See later for information on the default push button highlight and automatically selecting the text in an edit control.

To get the UI to draw focus rectangles in response to a keyboard operation, Windows sends your window WM_CHANGEUISTATE and WM_UPDATEUISTATE messages. To get the standard controls to do their stuff, simply pass these messages along to DefWindowProc (which you should normally be doing anyway).

If you have a custom control that you want to draw focus rectangles on, handle these messages.

If you're dealing with a dialog, send a WM_NEXTDLGCTRL message to the dialog instead of using SetFocus. The dialog box code itself deals with selecting the text in an edit control and setting the default button, but it doesn't see the notifications to the child controls.

If you have a modeless dialog (created with CreateDialog or the Indirect/Param variants), your message loop needs to call IsDialogMessage to get this behaviour. You can also use IsDialogMessage with a regular window to get the same behaviour.

Stability. What an interesting concept. -- Chris Maunder
GeneralRe: SetFocus problem - Controls don't get highlighted when SetFocus is called Pin
Chulips6-Apr-04 10:58
Chulips6-Apr-04 10:58 
GeneralA question about using COM object. Pin
bin89225-Apr-04 6:50
bin89225-Apr-04 6:50 
GeneralRe: A question about using COM object. Pin
Antony M Kancidrowski6-Apr-04 1:28
Antony M Kancidrowski6-Apr-04 1:28 
GeneralWQL in VC++ Pin
roadragedave5-Apr-04 6:05
roadragedave5-Apr-04 6:05 
GeneralRe: WQL in VC++ Pin
David Crow5-Apr-04 7:42
David Crow5-Apr-04 7:42 
GeneralCookies Pin
Anonymous5-Apr-04 5:42
Anonymous5-Apr-04 5:42 
QuestionHow to Load Bitmap Dynamically Pin
Azghar Hussain5-Apr-04 5:25
professionalAzghar Hussain5-Apr-04 5:25 
AnswerRe: How to Load Bitmap Dynamically Pin
Mike Dimmick5-Apr-04 6:33
Mike Dimmick5-Apr-04 6:33 
AnswerRe: How to Load Bitmap Dynamically Pin
avenger_sb255-Apr-04 6:43
avenger_sb255-Apr-04 6:43 
AnswerRe: How to Load Bitmap Dynamically Pin
GflPower5-Apr-04 16:12
GflPower5-Apr-04 16:12 
QuestionHow to derive a MFC class from CMenu?? Pin
CPAVG5-Apr-04 4:45
CPAVG5-Apr-04 4:45 
AnswerRe: How to derive a MFC class from CMenu?? Pin
Antony M Kancidrowski5-Apr-04 5:03
Antony M Kancidrowski5-Apr-04 5:03 
GeneralRe: How to derive a MFC class from CMenu?? Pin
CPAVG5-Apr-04 21:30
CPAVG5-Apr-04 21:30 
GeneralRe: How to derive a MFC class from CMenu?? Pin
Antony M Kancidrowski6-Apr-04 0:56
Antony M Kancidrowski6-Apr-04 0:56 
GeneralRe: How to derive a MFC class from CMenu?? Pin
CPAVG7-Apr-04 5:11
CPAVG7-Apr-04 5:11 
GeneralLinking a DLL file to MFC application Pin
chemipoo5-Apr-04 3:47
chemipoo5-Apr-04 3:47 
GeneralRe: Linking a DLL file to MFC application Pin
Antony M Kancidrowski5-Apr-04 4:53
Antony M Kancidrowski5-Apr-04 4:53 

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.