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

C / C++ / MFC

 
AnswerRe: Asynchronous I/O using ReadFile Pin
Vanting2-Feb-06 0:45
Vanting2-Feb-06 0:45 
GeneralRe: Asynchronous I/O using ReadFile Pin
PradeepKK2-Feb-06 1:18
PradeepKK2-Feb-06 1:18 
GeneralRe: Asynchronous I/O using ReadFile Pin
Iain Clarke, Warrior Programmer2-Feb-06 5:16
Iain Clarke, Warrior Programmer2-Feb-06 5:16 
QuestionHow can I intercept the "Windows" menu Pin
Jim @ JCT1-Feb-06 23:17
Jim @ JCT1-Feb-06 23:17 
AnswerRe: How can I intercept the "Windows" menu Pin
Iain Clarke, Warrior Programmer2-Feb-06 6:17
Iain Clarke, Warrior Programmer2-Feb-06 6:17 
GeneralRe: How can I intercept the "Windows" menu Pin
Jim @ JCT2-Feb-06 22:21
Jim @ JCT2-Feb-06 22:21 
GeneralRe: How can I intercept the "Windows" menu Pin
Iain Clarke, Warrior Programmer3-Feb-06 0:33
Iain Clarke, Warrior Programmer3-Feb-06 0:33 
GeneralRe: How can I intercept the "Windows" menu Pin
Jim @ JCT13-Feb-06 3:16
Jim @ JCT13-Feb-06 3:16 
Thanks to you pointing me in the right direction I was able to do it in the end:

<br />
BOOL CMainFrame::OnCommand(WPARAM wParam, LPARAM lParam)<br />
{<br />
    if (wParam >= AFX_IDM_FIRST_MDICHILD && wParam <= AFX_IDM_FIRST_MDICHILD + 8)<br />
    {               <br />
        //Get hold of a handle to the relevant window:<br />
        HWND hWnd = ::GetDlgItem(m_hWndMDIClient, wParam);<br />
        CMDIChildWnd* pChild = (CMDIChildWnd*)CWnd::FromHandlePermanent(hWnd);<br />
        <br />
        //Now do whatever it is I want to do with the window<br />
        pChild->DoWhatEver();<br />
    }<br />
<br />
    return __super::OnCommand(wParam, lParam);<br />
}


The trick was realising that GetDlgItem() works with MDI child windows.

Thanks for your help,
Jim
Questionasking............ Pin
shazzney1-Feb-06 23:14
shazzney1-Feb-06 23:14 
AnswerRe: asking............ Pin
RChin1-Feb-06 23:20
RChin1-Feb-06 23:20 
QuestionHow to extract plain text from a url or a html document? Pin
shertay1-Feb-06 21:02
shertay1-Feb-06 21:02 
AnswerRe: How to extract plain text from a url or a html document? Pin
Stephen Hewitt1-Feb-06 21:28
Stephen Hewitt1-Feb-06 21:28 
GeneralRe: How to extract plain text from a url or a html document? Pin
shertay5-Feb-06 16:47
shertay5-Feb-06 16:47 
QuestionText extraction Pin
KongHL1-Feb-06 20:51
KongHL1-Feb-06 20:51 
AnswerRe: Text extraction Pin
hsdok1-Feb-06 21:32
hsdok1-Feb-06 21:32 
GeneralRe: Text extraction Pin
James Gupta1-Feb-06 21:37
professionalJames Gupta1-Feb-06 21:37 
GeneralRe: Text extraction Pin
toxcct1-Feb-06 22:06
toxcct1-Feb-06 22:06 
GeneralRe: Text extraction Pin
KongHL1-Feb-06 21:54
KongHL1-Feb-06 21:54 
GeneralRe: Text extraction Pin
Sebastian Schneider1-Feb-06 22:08
Sebastian Schneider1-Feb-06 22:08 
GeneralRe: Text extraction Pin
KongHL1-Feb-06 22:13
KongHL1-Feb-06 22:13 
GeneralRe: Text extraction Pin
Sebastian Schneider1-Feb-06 22:18
Sebastian Schneider1-Feb-06 22:18 
AnswerRe: Text extraction Pin
grigsoft1-Feb-06 22:39
grigsoft1-Feb-06 22:39 
AnswerRe: Text extraction Pin
Maximilien2-Feb-06 3:10
Maximilien2-Feb-06 3:10 
AnswerRe: Text extraction Pin
David Crow2-Feb-06 5:03
David Crow2-Feb-06 5:03 
QuestionVisual studio 2003 (BUG ?) Pin
jk chan1-Feb-06 20:47
jk chan1-Feb-06 20:47 

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.