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

C / C++ / MFC

 
AnswerRe: know if the object is created or not Pin
Cool Ju16-Nov-05 1:07
Cool Ju16-Nov-05 1:07 
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 
I just tested this, OnActivate won't work for you. Since it's a modal dialog (which I assume it is) it won't receive OnActivate messages when you click outside the dialog. Similarly, you won't get any WM_LBUTTONDOWN or the likes when the user clicks outside your dialog. Instead, you must handle the WM_NCACTIVATE message:
In your dialog class header, put
<br />
afx_msg BOOL OnNcActivate(BOOL bActive);<br />

and put
<br />
ON_WM_NCACTIVATE()<br />

in the dialog class' message map.
in CYourDialog::OnNcActivate handle the case bActive==FALSE, this is when the user clicks outside the client area. Dismiss your dialog in whatever way is appropriate.


Cheers
Steen.

"To claim that computer games influence children is ridiculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
AnswerRe: Show and close dialog Pin
Rage15-Nov-05 23:08
professionalRage15-Nov-05 23:08 
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 

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.