Click here to Skip to main content
15,921,279 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: AVIFileOpen trouble Pin
Mark Salsbery20-Apr-07 10:52
Mark Salsbery20-Apr-07 10:52 
AnswerRe: AVIFileOpen trouble Pin
R.A.V.E.20-Apr-07 10:58
R.A.V.E.20-Apr-07 10:58 
GeneralRe: AVIFileOpen trouble Pin
Mark Salsbery20-Apr-07 11:07
Mark Salsbery20-Apr-07 11:07 
AnswerRe: AVIFileOpen trouble Pin
R.A.V.E.21-Apr-07 8:41
R.A.V.E.21-Apr-07 8:41 
QuestionRe: AVIFileOpen trouble Pin
Mark Salsbery22-Apr-07 7:14
Mark Salsbery22-Apr-07 7:14 
AnswerRe: AVIFileOpen trouble Pin
R.A.V.E.23-Apr-07 3:05
R.A.V.E.23-Apr-07 3:05 
GeneralRe: AVIFileOpen trouble Pin
Mark Salsbery23-Apr-07 4:52
Mark Salsbery23-Apr-07 4:52 
Questionright way to implement a popup window Pin
Jim Crafton20-Apr-07 8:43
Jim Crafton20-Apr-07 8:43 
I'm trying to implement a class that create a popup window suitable for things like emulating a menu dropdown, or a drop down for a combo box, and I'm running into some issues in implementing the correct behavior.
What I want is a window that pops up, is topmost, doesn't rec'v focus (I think), and disappears when you click on it, or when you click anywhere else, or hit certain keys. I think that when it is displayed it should not disrupt the currently focused control.


I can get the basics to work doing the following,
create the window with WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN and WS_EX_TOPMOST
show the window with SW_SHOWNOACTIVATE
handle WM_MOUSEACTIVATE messages by returning MA_NOACTIVATE

When I display the window, I start a new message loop, and setup message hooks such that any mouse downs, or VK_ESCAPE keys cause the window to be closed.

This works OK. however I notice that I still have cases where the focus seems to bounce to the popup window, and does NOT get forwarded back to the prior focused control on the main window.

Is this normal Win32 behavior? Or do I need to cache the current focused window before I display the popup, and then reset the focus to this when the popup is dismissed?
Any other gotcha's I need to be aware of?



¡El diablo está en mis pantalones! ¡Mire, mire!

Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!

SELECT * FROM User WHERE Clue > 0
0 rows returned

Save an Orange - Use the VCF!
VCF Blog

QuestionSqlConnection does't work with CString????? Pin
Romiks20-Apr-07 8:27
Romiks20-Apr-07 8:27 
AnswerRe: SqlConnection does't work with CString????? Pin
Mark Salsbery20-Apr-07 9:19
Mark Salsbery20-Apr-07 9:19 
QuestionTrouble linking to SQL DB in VC++ Pin
@largeinsd20-Apr-07 8:14
@largeinsd20-Apr-07 8:14 
AnswerRe: Trouble linking to SQL DB in VC++ Pin
Mark Salsbery20-Apr-07 8:25
Mark Salsbery20-Apr-07 8:25 
GeneralRe: Trouble linking to SQL DB in VC++ Pin
@largeinsd20-Apr-07 8:40
@largeinsd20-Apr-07 8:40 
GeneralRe: Trouble linking to SQL DB in VC++ Pin
Mark Salsbery20-Apr-07 9:01
Mark Salsbery20-Apr-07 9:01 
GeneralRe: Trouble linking to SQL DB in VC++ Pin
@largeinsd20-Apr-07 9:55
@largeinsd20-Apr-07 9:55 
GeneralRe: Trouble linking to SQL DB in VC++ Pin
Mark Salsbery20-Apr-07 10:02
Mark Salsbery20-Apr-07 10:02 
Questionhoe design control for C#.net ? Pin
hamid_m20-Apr-07 8:04
hamid_m20-Apr-07 8:04 
QuestionProblems moving date and time control on MFC dialog [modified] Pin
Barry True20-Apr-07 7:19
Barry True20-Apr-07 7:19 
AnswerRe: Problems moving date and time control on MFC dialog Pin
Barry True26-Apr-07 11:41
Barry True26-Apr-07 11:41 
Questionhtml and C++ Pin
Tully200320-Apr-07 6:06
Tully200320-Apr-07 6:06 
QuestionAnybody done any Speex development? Pin
Heavenword120-Apr-07 5:28
Heavenword120-Apr-07 5:28 
QuestionUsing UI-Thread Pin
CDRAIN20-Apr-07 4:58
CDRAIN20-Apr-07 4:58 
Questionstrcpy - Doing something wrong ?? Pin
Programm3r20-Apr-07 4:12
Programm3r20-Apr-07 4:12 
AnswerRe: strcpy - Doing something wrong ?? Pin
Programm3r20-Apr-07 4:17
Programm3r20-Apr-07 4:17 
GeneralRe: strcpy - Doing something wrong ?? Pin
Mark Salsbery20-Apr-07 7:43
Mark Salsbery20-Apr-07 7:43 

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.