Click here to Skip to main content
16,004,969 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Help for Arabic/Urdu Development in Visual C++ Pin
Giannakakis Kostas22-Feb-06 1:43
professionalGiannakakis Kostas22-Feb-06 1:43 
Questionany predefined function to convert string to int Pin
namaskaaram21-Feb-06 18:27
namaskaaram21-Feb-06 18:27 
AnswerRe: any predefined function to convert string to int Pin
Ryan Binns21-Feb-06 18:44
Ryan Binns21-Feb-06 18:44 
GeneralRe: any predefined function to convert string to int Pin
namaskaaram21-Feb-06 19:06
namaskaaram21-Feb-06 19:06 
AnswerRe: any predefined function to convert string to int Pin
Stephen Hewitt21-Feb-06 18:54
Stephen Hewitt21-Feb-06 18:54 
AnswerRe: any predefined function to convert string to int Pin
James R. Twine22-Feb-06 2:18
James R. Twine22-Feb-06 2:18 
QuestionDrawing focus rect Pin
Naveen21-Feb-06 18:18
Naveen21-Feb-06 18:18 
AnswerRe: Drawing focus rect Pin
-Dy23-Feb-06 3:05
-Dy23-Feb-06 3:05 
Hi Nav,

Naveen raj mohan wrote:
So my question is is there any way to know how the foucs came to a control( via keyboard or mouse )?


You can find out what had the focus before you get it, but you can't find out if it came from the mouse or the keyboard; in general, you don't need to know how it got there, you just care about the fact it did.

To find out what had it before, handle WM_SETFOCUS, and take a look at the wParam - that's the HWND of what had the focus before (note that it can be NULL). If you're using MFC, handle OnSetFocus(CWnd *pwnd) - the pwnd is what had the focus before.

Naveen raj mohan wrote:
I want to draw a focus rect around my control.


Try the DrawFocusRect API (or CDC::DrawFocusRect if you're using MFC).



- Dy
GeneralRe: Drawing focus rect Pin
Naveen28-Feb-06 23:47
Naveen28-Feb-06 23:47 
AnswerRe: Drawing focus rect Pin
Nibu babu thomas26-Feb-06 16:54
Nibu babu thomas26-Feb-06 16:54 
GeneralRe: Drawing focus rect Pin
Naveen28-Feb-06 23:58
Naveen28-Feb-06 23:58 
GeneralRe: Drawing focus rect Pin
Nibu babu thomas1-Mar-06 0:16
Nibu babu thomas1-Mar-06 0:16 
GeneralRe: Drawing focus rect Pin
Naveen1-Mar-06 0:37
Naveen1-Mar-06 0:37 
GeneralRe: Drawing focus rect Pin
Nibu babu thomas1-Mar-06 0:48
Nibu babu thomas1-Mar-06 0:48 
GeneralRe: Drawing focus rect Pin
Naveen1-Mar-06 1:16
Naveen1-Mar-06 1:16 
GeneralRe: Drawing focus rect Pin
Nibu babu thomas1-Mar-06 1:18
Nibu babu thomas1-Mar-06 1:18 
GeneralRe: Drawing focus rect Pin
Naveen1-Mar-06 1:55
Naveen1-Mar-06 1:55 
QuestionHow to ActiveX? Pin
<color>Aljechin 21-Feb-06 17:47
<color>Aljechin 21-Feb-06 17:47 
AnswerRe: How to ActiveX? Pin
QuickDeveloper21-Feb-06 18:00
QuickDeveloper21-Feb-06 18:00 
GeneralRe: How to ActiveX? Pin
J512198224-Feb-06 0:14
J512198224-Feb-06 0:14 
QuestionMFC & Sockets Pin
kbsoftware21-Feb-06 17:29
kbsoftware21-Feb-06 17:29 
AnswerRe: MFC & Sockets Pin
_AnsHUMAN_ 21-Feb-06 19:01
_AnsHUMAN_ 21-Feb-06 19:01 
AnswerRe: MFC & Sockets Pin
ThatsAlok22-Feb-06 3:01
ThatsAlok22-Feb-06 3:01 
QuestionNo Link tab Pin
QuickDeveloper21-Feb-06 17:24
QuickDeveloper21-Feb-06 17:24 
AnswerRe: No Link tab Pin
Christian Graus21-Feb-06 17:31
protectorChristian Graus21-Feb-06 17:31 

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.