Click here to Skip to main content
15,922,166 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to print a String class string to a txt file Pin
Iain Clarke, Warrior Programmer30-Jan-08 23:09
Iain Clarke, Warrior Programmer30-Jan-08 23:09 
GeneralRe: How to print a String class string to a txt file Pin
Cabomba10-Feb-08 22:48
Cabomba10-Feb-08 22:48 
AnswerRe: How to print a String class string to a txt file Pin
CPallini30-Jan-08 23:16
mveCPallini30-Jan-08 23:16 
GeneralRe: How to print a String class string to a txt file Pin
Cabomba10-Feb-08 23:10
Cabomba10-Feb-08 23:10 
GeneralPage File counter and Private Bytes Counter Pin
George_George30-Jan-08 22:18
George_George30-Jan-08 22:18 
GeneralPerformance and footprint of virtual function Pin
George_George30-Jan-08 21:59
George_George30-Jan-08 21:59 
GeneralRe: Performance and footprint of virtual function Pin
CPallini30-Jan-08 22:17
mveCPallini30-Jan-08 22:17 
GeneralRe: Performance and footprint of virtual function Pin
George_George30-Jan-08 22:25
George_George30-Jan-08 22:25 
GeneralRe: Performance and footprint of virtual function Pin
Iain Clarke, Warrior Programmer30-Jan-08 22:41
Iain Clarke, Warrior Programmer30-Jan-08 22:41 
GeneralRe: Performance and footprint of virtual function Pin
George_George30-Jan-08 23:05
George_George30-Jan-08 23:05 
GeneralRe: Performance and footprint of virtual function Pin
Iain Clarke, Warrior Programmer30-Jan-08 23:17
Iain Clarke, Warrior Programmer30-Jan-08 23:17 
GeneralRe: Performance and footprint of virtual function Pin
George_George30-Jan-08 23:21
George_George30-Jan-08 23:21 
GeneralRe: Performance and footprint of virtual function Pin
CPallini30-Jan-08 22:44
mveCPallini30-Jan-08 22:44 
GeneralRe: Performance and footprint of virtual function Pin
George_George30-Jan-08 23:02
George_George30-Jan-08 23:02 
GeneralRe: Performance and footprint of virtual function Pin
CPallini30-Jan-08 23:07
mveCPallini30-Jan-08 23:07 
GeneralRe: Performance and footprint of virtual function Pin
Cedric Moonen30-Jan-08 22:44
Cedric Moonen30-Jan-08 22:44 
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 

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.