Click here to Skip to main content
15,913,467 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionhow to indicate Sort icon in the list control on column header Pin
K. narasimharao15-Nov-05 23:40
K. narasimharao15-Nov-05 23:40 
AnswerRe: how to indicate Sort icon in the list control on column header Pin
*Dreamz16-Nov-05 2:04
*Dreamz16-Nov-05 2:04 
QuestionShow and close dialog Pin
trunghd15-Nov-05 22:34
trunghd15-Nov-05 22:34 
AnswerRe: Show and close dialog Pin
Steen Krogsgaard15-Nov-05 22:46
Steen Krogsgaard15-Nov-05 22:46 
GeneralRe: Show and close dialog Pin
trunghd16-Nov-05 0:25
trunghd16-Nov-05 0:25 
GeneralRe: Show and close dialog Pin
toxcct16-Nov-05 0:56
toxcct16-Nov-05 0:56 
GeneralRe: Show and close dialog Pin
Steen Krogsgaard16-Nov-05 1:34
Steen Krogsgaard16-Nov-05 1:34 
AnswerRe: Show and close dialog Pin
Rage15-Nov-05 23:08
professionalRage15-Nov-05 23:08 
trunghd wrote:
but it doesn't work


What does not work ? You do not catch the WM_KILLFOCUS message, or does the message not get send when you click outside the dialog ?

Three possibilities here (from the best to the least good, IMO):

1- Catch the WM_ACTIVATE message( MFC using afx_msg void OnActivate( UINT nState, CWnd* pWndOther, BOOL bMinimized ); and WA_INACTIVE as nState). In the message handler, dismiss your dialog.

2- Catch WM_KILLFOCUS, i still do not understand why this should not work

3- Handle WM_LBUTTONDOWN and WM_RBUTTONDOWN, check if the clicked position is inside the area of your dialog, if not, dismiss the dialog.


Hope this helps

~RaGE();
GeneralRe: Show and close dialog Pin
trunghd16-Nov-05 0:23
trunghd16-Nov-05 0:23 
GeneralRe: Show and close dialog Pin
Rage16-Nov-05 1:54
professionalRage16-Nov-05 1:54 
Questionneed help Pin
toufiq_raja15-Nov-05 20:42
toufiq_raja15-Nov-05 20:42 
AnswerRe: need help Pin
Michael P Butler15-Nov-05 21:05
Michael P Butler15-Nov-05 21:05 
GeneralRe: need help Pin
toufiq_raja16-Nov-05 18:43
toufiq_raja16-Nov-05 18:43 
AnswerRe: need help Pin
toxcct15-Nov-05 22:07
toxcct15-Nov-05 22:07 
GeneralRe: need help Pin
toufiq_raja16-Nov-05 23:14
toufiq_raja16-Nov-05 23:14 
GeneralRe: need help Pin
toxcct17-Nov-05 2:21
toxcct17-Nov-05 2:21 
GeneralRe: need help Pin
toufiq_raja20-Nov-05 20:08
toufiq_raja20-Nov-05 20:08 
QuestionHow to use CByteArray to store and retrieve pictures Pin
snprani15-Nov-05 20:02
snprani15-Nov-05 20:02 
QuestionHow To set tab order at runtime using SetWindowPos() so as to shift the focus from one edit box to another edit box(of any control) when down arrow button pressed Pin
zxc8915-Nov-05 19:44
zxc8915-Nov-05 19:44 
AnswerRe: How To set tab order at runtime using SetWindowPos() so as to shift the focus from one edit box to another edit box(of any control) when down arrow button pressed Pin
Rage15-Nov-05 21:02
professionalRage15-Nov-05 21:02 
GeneralRe: How To set tab order at runtime using SetWindowPos() so as to shift the focus from one edit box to another edit box(of any control) when down arrow button pressed Pin
dabs15-Nov-05 22:27
dabs15-Nov-05 22:27 
AnswerRe: How To set tab order at runtime using SetWindowPos() so as to shift the focus from one edit box to another edit box(of any control) when down arrow button pressed Pin
Owner drawn15-Nov-05 23:52
Owner drawn15-Nov-05 23:52 
QuestionExtracing data from word document to notepad or edit box Pin
Ankush Mehta15-Nov-05 19:41
Ankush Mehta15-Nov-05 19:41 
AnswerRe: Extracing data from word document to notepad or edit box Pin
Rage15-Nov-05 21:06
professionalRage15-Nov-05 21:06 
AnswerRe: Extracing data from word document to notepad or edit box Pin
Barm15-Nov-05 21:20
Barm15-Nov-05 21:20 

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.