GetWindowText [modified]
-
hi, i've got a problem with getwindowtext. i've spent at least an hour trying to figure out why this won't work. (sad, huh?) i have this code:
BOOL CALLBACK EnumWindowsProc(HWND hwnd, LPARAM lParam)
{
LPSTR title = "";
CString thetitle = "";GetWindowText(hwnd, title, 100); thetitle = (CString) title;
AfxMessageBox(thetitle); //just to see its value
if(thetitle == "...") {
...
}return TRUE;
}
onSomeButtonClick...() {
if(!EnumWindows((WNDENUMPROC) EnumWindowsProc, 0)) {
...
}
}for some reason, thetitle is always blank. can someone tell me why this is happening? any tips for fixing this would help. thanks. -- modified at 21:14 Wednesday 24th May, 2006
-
hi, i've got a problem with getwindowtext. i've spent at least an hour trying to figure out why this won't work. (sad, huh?) i have this code:
BOOL CALLBACK EnumWindowsProc(HWND hwnd, LPARAM lParam)
{
LPSTR title = "";
CString thetitle = "";GetWindowText(hwnd, title, 100); thetitle = (CString) title;
AfxMessageBox(thetitle); //just to see its value
if(thetitle == "...") {
...
}return TRUE;
}
onSomeButtonClick...() {
if(!EnumWindows((WNDENUMPROC) EnumWindowsProc, 0)) {
...
}
}for some reason, thetitle is always blank. can someone tell me why this is happening? any tips for fixing this would help. thanks. -- modified at 21:14 Wednesday 24th May, 2006
-
it worked! thanks a lot. 1 more question... how do you put the text in that font? :confused:
-
it worked! thanks a lot. 1 more question... how do you put the text in that font? :confused:
Sam Kline wrote:
it worked! thanks a lot. 1 more question... how do you put the text in that font?
Look down where the smileys are. Just above them there is a section called Formatting: B I U S small BIG... Hope you saw it. Now select any text and just click on those items. Now your selected text will be wrapped within html tags. Thats it. Hope this is what you meant. :~
Nibu thomas A Developer Programming tips[^] My site[^]
-
Sam Kline wrote:
it worked! thanks a lot. 1 more question... how do you put the text in that font?
Look down where the smileys are. Just above them there is a section called Formatting: B I U S small BIG... Hope you saw it. Now select any text and just click on those items. Now your selected text will be wrapped within html tags. Thats it. Hope this is what you meant. :~
Nibu thomas A Developer Programming tips[^] My site[^]