Click here to Skip to main content
15,905,679 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Performance and footprint of virtual function Pin
George_George30-Jan-08 22:59
George_George30-Jan-08 22:59 
QuestionAlternative to using FindWindow() in OnCopyData() Pin
demxine30-Jan-08 21:52
demxine30-Jan-08 21:52 
GeneralRe: Alternative to using FindWindow() in OnCopyData() Pin
Iain Clarke, Warrior Programmer30-Jan-08 21:59
Iain Clarke, Warrior Programmer30-Jan-08 21:59 
GeneralRe: Alternative to using FindWindow() in OnCopyData() Pin
demxine30-Jan-08 22:14
demxine30-Jan-08 22:14 
GeneralRe: Alternative to using FindWindow() in OnCopyData() Pin
Iain Clarke, Warrior Programmer30-Jan-08 22:28
Iain Clarke, Warrior Programmer30-Jan-08 22:28 
GeneralRe: Alternative to using FindWindow() in OnCopyData() Pin
David Crow31-Jan-08 3:05
David Crow31-Jan-08 3:05 
GeneralRe: Alternative to using FindWindow() in OnCopyData() Pin
Haroon Sarwar30-Jan-08 22:37
Haroon Sarwar30-Jan-08 22:37 
GeneralRe: Alternative to using FindWindow() in OnCopyData() Pin
demxine30-Jan-08 23:40
demxine30-Jan-08 23:40 
How do i use EnumWindow in this context of OnCopyData?

void CWindowsDVRDlg::CheckTray()
{
LRESULT copyDataResult;
CString mainAppName = "Setup";

CString quitMessage = ("minimized");
CWnd *pOtherWnd = NULL;

//pOtherWnd = CWnd::FindWindow(NULL, (LPCTSTR) mainAppName);

if(pOtherWnd != NULL){
pOtherWnd->SetForegroundWindow();
COPYDATASTRUCT cpd;
cpd.dwData = 0;
cpd.cbData = quitMessage.GetLength()+1;
cpd.lpData = (PVOID)(LPCTSTR) quitMessage;
copyDataResult = pOtherWnd->SendMessage(WM_COPYDATA,
(WPARAM)AfxGetApp()->m_pMainWnd->GetSafeHwnd(),
LPARAM)&cpd);
quitMessage.ReleaseBuffer();
}
}

Should I just replace this line:

//pOtherWnd = CWnd::FindWindow(NULL,(LPCTSTR) mainAppName);

with EnumWindow() and would I be able to get the handle of the hidden window in the system tray? If not, any ideas please?

->Demsen
GeneralRe: Alternative to using FindWindow() in OnCopyData() Pin
Haroon Sarwar30-Jan-08 23:53
Haroon Sarwar30-Jan-08 23:53 
GeneralRe: Alternative to using FindWindow() in OnCopyData() Pin
David Crow31-Jan-08 3:04
David Crow31-Jan-08 3:04 
GeneralRe: Alternative to using FindWindow() in OnCopyData() Pin
demxine31-Jan-08 14:20
demxine31-Jan-08 14:20 
GeneralRe: Alternative to using FindWindow() in OnCopyData() Pin
David Crow1-Feb-08 3:05
David Crow1-Feb-08 3:05 
QuestionSAPI within Windows SDK? Pin
_NielsB30-Jan-08 20:53
_NielsB30-Jan-08 20:53 
GeneralActiveX control richedit control hides when pressing Alt key Pin
ShilpiP30-Jan-08 20:47
ShilpiP30-Jan-08 20:47 
GeneralRepost + Crosspost = Absolutely No help Pin
Rajesh R Subramanian30-Jan-08 21:11
professionalRajesh R Subramanian30-Jan-08 21:11 
GeneralRe: Repost + Crosspost = Absolutely No help Pin
ShilpiP30-Jan-08 22:00
ShilpiP30-Jan-08 22:00 
GeneralRe: ActiveX control richedit control hides when pressing Alt key Pin
Nitheesh George31-Jan-08 0:38
Nitheesh George31-Jan-08 0:38 
GeneralRe: ActiveX control richedit control hides when pressing Alt key Pin
ShilpiP31-Jan-08 1:05
ShilpiP31-Jan-08 1:05 
Questionplz help me, how can read and write AVI files? Pin
Le@rner30-Jan-08 20:39
Le@rner30-Jan-08 20:39 
AnswerRe: plz help me, how can read and write AVI files? Pin
_NielsB30-Jan-08 21:00
_NielsB30-Jan-08 21:00 
GeneralRe: plz help me, how can read and write AVI files? Pin
Le@rner30-Jan-08 21:16
Le@rner30-Jan-08 21:16 
AnswerRe: plz help me, how can read and write AVI files? Pin
Hamid_RT30-Jan-08 21:34
Hamid_RT30-Jan-08 21:34 
GeneralRe: plz help me, how can read and write AVI files? Pin
Le@rner30-Jan-08 22:04
Le@rner30-Jan-08 22:04 
GeneralRe: plz help me, how can read and write AVI files? Pin
Hamid_RT30-Jan-08 22:30
Hamid_RT30-Jan-08 22:30 
AnswerRe: plz help me, how can read and write AVI files? Pin
Cedric Moonen30-Jan-08 21:41
Cedric Moonen30-Jan-08 21:41 

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.