|
The window is not minimized to the taskbar but to the systemtray. enumwindows finds minized windows to the taskbar but not when they are minimized to the tray.
I use enumwindows instead of findwindow since it is more stable. I guess both functions do the same thing.
yes, spy++ does find my window. How does spy++ finds its windows?
|
|
|
|
|
systemtray, taskbar - its not a big reason. in both cases main windows are hided.
i won't dispute about stability, but as i said: use findwindow to get handle.
u've caption and u've class, or u dont've? its quite complete info to use this function.
or i dont understand your question.
|
|
|
|
|
Yes, i have the caption.
with enumwindows:
- I find the window when its visible on screen.
- I don't find the window when it is minimized to the tray.
it is simply not listed when using the callback func.
|
|
|
|
|
u dont listen to me.
theme is closed.
|
|
|
|
|
I guess you don't understand the problem.
thank you for your help anyway
|
|
|
|
|
p.s.
// i had outlook in system tray.
HWND hwndOutlook = ::FindWindow(NULL, "Inbox - Microsoft Outlook");
// i got valid handle for this window.
|
|
|
|
|
Using spy++ and find a class of the program. This is safer in my view, 'coz the caption may be changed by a program behaviour or other program.
HWND hWindows = FindWindow("ProgClass", NULL)
_________<br />
I'm made in C++... and I'm proud of it!
|
|
|
|
|
I think you are still confused between a minimized window and a hidden window.
4apai wrote:
// i got valid handle for this window.
Of course, because it was minimized, not hidden.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
ok. lets determine what window should call hidden and what should be call minimized? it looks like demagogy but as i see its necessary.
i want to hear your oppinion!
|
|
|
|
|
EnumWindows() will enumerate all top-level windows on the screen, while EnumDesktopWindows() will enumerate all top-level windows on a desktop.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
...AND...If the system Tray OWNS the minimized window, then you can get the window handle of the system tray and try to enumerate the child windows of it.
One of them is probably the window you want.
|
|
|
|
|
HI,
i have a button with only image no caption on it.
with ID (IDC_BTN_PLAY)
I want that when i place i mouse on that button
or when mouse goes on that button a tool tip
appear " Play button" ;
how i will do that ...
any sample .
thanx
Regards.
|
|
|
|
|
Do this:
messagemap:
ON_NOTIFY_EX(TTN_NEEDTEXT, 0, OnToolTipNotify)
in .h file:
afx_msg BOOL OnToolTipNotify(UINT id, NMHDR *pNMHDR,LRESULT *pResult);
function implementation something like this:
BOOL PbmFlexListViewer::OnToolTipNotify(UINT id, NMHDR *pNMHDR, LRESULT *pResult){<br />
CString tooltiptext2display;<br />
tooltiptext2display = "";<br />
TOOLTIPTEXT *pTTT = (TOOLTIPTEXT *)pNMHDR; <br />
UINT nID = pNMHDR->idFrom;<br />
if(pTTT->uFlags & TTF_IDISHWND){<br />
nID = ::GetDlgCtrlID((HWND)nID);<br />
switch(nID){<br />
case IDC_PBM_DOWN: tooltiptext2display.Format(IDS_MOVE_ROW_DOWN_PBM);<br />
break;<br />
case IDC_PBM_UP: tooltiptext2display.Format(IDS_MOVE_ROW_UP_PBM);<br />
break;<br />
case IDC_FLEX_NEW_ITEM: tooltiptext2display.Format(IDS_ADD_NEW_ITEM);<br />
break;<br />
case IDC_BUTTON_PRINT: tooltiptext2display.Format(IDS_PBM_FLEXLIST_PRINT);<br />
break;<br />
case IDC_STATIC_ROW_COL:tooltiptext2display.Format(IDS_TOOLTIP_FLEXLIST_STATICCURRENTCELL);<br />
break;<br />
default: tooltiptext2display = "";<br />
break;<br />
}
strcpy(pTTT->szText, tooltiptext2display);<br />
return(TRUE);<br />
}
else{ return FALSE; }
}
DON'T FORGET in OnInitDialog or constructor:
EnableToolTips(true);
good luck.
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
|
hallo.
i need your help.
i want to list sessions on a remote terminal server. i use next code:
HANDLE hServer = WTSOpenServer("WMWareComputer");
// hServer is set to NULL;
DWORD dwError = GetLastError();
// dwError is set to 5 (Access Denied)
As i undersatnd i've insufficient access rights on a remote computer.
in documentation i find that i need to have QUERY_INFORMATION access rights to view this specific information.
How can i change access rights?
in the next case i get following results:
HANDLE hServer = WTSOpenServer("RemoteComputer");
// hServer is initialized with a real value, smth like 0x04548343;
DWORD dwError = GetLastError();
// dwError is set to 0 (all is ok)
BOOL bRet = WTSEnumerateSessions(hServer, 0, 1, &wtsSessionInfo, &dwCount);
// bRet is true. all is ok.
// But dwCount is 0. but i know for sure that there're some sessions.
and one more. when i execute those code on specified machines directly, they return good results.
what do i do wrang?
waiting for your ideas, discussions...
|
|
|
|
|
its me again
i found where can i set user access rights on terminal server. and set full control for everyone. but still've the same problem.
what can be wrong?
|
|
|
|
|
What did GetLastError() return from the WTSEnumerateSessions() and did WTSEnumerateSessions() return a non-zero value?
|
|
|
|
|
after enumaratesessions :
GetLastError return 0.
and the result is true (non-zero);
all is ok. looks like it must be so. but it it shioldn't.
|
|
|
|
|
I am sorry I do not know more about your specific problem.
I was trying to help you rule out obvious mistakes, and I only ever enumerated sessions on the local server.
|
|
|
|
|
thx anyway.
thats the way people solve problems here. nobody know everything. everyone know only some specific part.
4apai
There're no impossible tasks. There're tasks that required infinite period of execution time.
|
|
|
|
|
HI.
I would like to print the view as seen by CFormView. I put some static labels and buttons on the screen and try to print it out. I used a technique that I saw on Codeproject. I put
SendMessage(WM_PRINT, (WPARAM) pDC->m_hDC , PRF_CHILDREN | PRF_CLIENT| PRF_NONCLIENT | PRF_OWNED);
In the OnDraw function that will let the child controls print out. I can get things to print but the coordinates seems to go away so that everything prints in the very upper left hand corner. I am not sure how to retain or shift it to print in position relative to its position on the screen onto the paper. has anyone seen this?
Thanks in advance.
|
|
|
|
|
|
You need to set the DLL as the active project. Then use the appropriate executable when you run the DLL. Breakpoints in the DLL code will then work.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
How can I set DLL as the active project? Well I don't get what you mean. Can you explain more detailed please?
|
|
|
|
|
I normally have a workspace with the executable and all DLL projects loaded into the IDE. With such a workspace you need to choose the Active Project (right click on workspace project and Set Active Project or Set as Startup Project depending on IDE).
You could just generate a workspace for that DLL. NOTE: If there is only one project in a workspace it is always the active project.
It is necessary to point the DLL at an executable that uses it in order to debug the DLL. The IDE will ask you for this when you run the DLL.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|