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

C / C++ / MFC

 
Generalload jpeg into memory as bitmap Pin
Pia G27-Jan-05 9:11
Pia G27-Jan-05 9:11 
GeneralRe: load jpeg into memory as bitmap Pin
Neville Franks27-Jan-05 9:30
Neville Franks27-Jan-05 9:30 
GeneralRe: load jpeg into memory as bitmap Pin
PJ Arends27-Jan-05 9:49
professionalPJ Arends27-Jan-05 9:49 
QuestionHow to find Child window? Pin
Dody_DK27-Jan-05 8:34
Dody_DK27-Jan-05 8:34 
AnswerRe: How to find Child window? Pin
Wes Aday27-Jan-05 9:17
professionalWes Aday27-Jan-05 9:17 
GeneralRe: How to find Child window? Pin
Neville Franks27-Jan-05 9:33
Neville Franks27-Jan-05 9:33 
AnswerRe: How to find Child window? Pin
ThatsAlok27-Jan-05 18:56
ThatsAlok27-Jan-05 18:56 
AnswerRe: How to find Child window? Pin
rwestgraham29-Jan-05 23:01
rwestgraham29-Jan-05 23:01 
FindWindowEx allows you to specify a parent handle, and will search only for children of that parent window.

So you find the parent window, then call FindWindowEx using the parent window handle as the starting search point.

There is one VERY important caveat:

FindWindowEx will ONLY find FIRST generation children.

Suppose for example, your top level window is a dialog box. The Dialog has a frame control. The window you want to find is a child of the frame.

Calling FindWindowEx using the parent will find the frame. But it will not find your desired window, because it only searches direct children.

So your strategy in this case would be:

1) Get dialog handle.

2) Use dialog handle as parent and find handle to the frame.

3) Then use the frame handle, NOT the dialog handle, as the new parent and continue the search.

This will now find your target because it is a direct child of the frame, not the dialog.

Because windows hierarchies can be complex, you need to use a tool like Spy which can show the relationships of a window. Then base you search strategy based on how Spy shows you the windows are related.

Hope this helps,

Robert
GeneralRe: How to find Child window? Pin
Dody_DK30-Jan-05 0:39
Dody_DK30-Jan-05 0:39 
GeneralRe: How to find Child window? Pin
rwestgraham30-Jan-05 14:19
rwestgraham30-Jan-05 14:19 
GeneralRe: How to find Child window? Pin
Dody_DK31-Jan-05 9:59
Dody_DK31-Jan-05 9:59 
GeneralDAO Pin
Deian27-Jan-05 8:32
Deian27-Jan-05 8:32 
GeneralRe: DAO Pin
Deian27-Jan-05 8:58
Deian27-Jan-05 8:58 
GeneralRe: DAO Pin
BlackDice27-Jan-05 9:47
BlackDice27-Jan-05 9:47 
GeneralRe: DAO Pin
Deian27-Jan-05 9:58
Deian27-Jan-05 9:58 
GeneralRe: DAO Pin
BlackDice27-Jan-05 10:19
BlackDice27-Jan-05 10:19 
GeneralCDialog Update Pin
poiut27-Jan-05 8:24
poiut27-Jan-05 8:24 
GeneralRe: CDialog Update Pin
Neville Franks27-Jan-05 9:35
Neville Franks27-Jan-05 9:35 
GeneralRe: CDialog Update Pin
Anonymous27-Jan-05 10:13
Anonymous27-Jan-05 10:13 
GeneralRe: CDialog Update Pin
Neville Franks27-Jan-05 10:30
Neville Franks27-Jan-05 10:30 
GeneralRe: CDialog Update Pin
David Crow27-Jan-05 9:37
David Crow27-Jan-05 9:37 
GeneralRe: CDialog Update Pin
Anonymous27-Jan-05 10:21
Anonymous27-Jan-05 10:21 
GeneralGetSystemTime(LPSYSTEMTIME st) Pin
Jnewg527-Jan-05 6:31
Jnewg527-Jan-05 6:31 
GeneralRe: GetSystemTime(LPSYSTEMTIME st) Pin
Neville Franks27-Jan-05 9:46
Neville Franks27-Jan-05 9:46 
GeneralRe: GetSystemTime(LPSYSTEMTIME st) Pin
rwestgraham29-Jan-05 23:14
rwestgraham29-Jan-05 23:14 

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.