Click here to Skip to main content
15,887,464 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionFind the windows Pin
Cvaji22-Apr-10 0:13
Cvaji22-Apr-10 0:13 
AnswerRe: Find the windows Pin
Code-o-mat22-Apr-10 0:21
Code-o-mat22-Apr-10 0:21 
GeneralRe: Find the windows Pin
Cvaji22-Apr-10 0:31
Cvaji22-Apr-10 0:31 
GeneralRe: Find the windows Pin
Code-o-mat22-Apr-10 0:38
Code-o-mat22-Apr-10 0:38 
GeneralRe: Find the windows Pin
Cvaji22-Apr-10 0:48
Cvaji22-Apr-10 0:48 
GeneralRe: Find the windows Pin
Code-o-mat22-Apr-10 1:00
Code-o-mat22-Apr-10 1:00 
GeneralRe: Find the windows Pin
Cvaji22-Apr-10 5:27
Cvaji22-Apr-10 5:27 
GeneralRe: Find the windows Pin
Code-o-mat22-Apr-10 6:16
Code-o-mat22-Apr-10 6:16 
No, i mean something like this:

HWND hWnd;
while ((hWnd = ::FindWindow(0, L"Untitled - Notepad")) != NULL)
{
  //Do what you need with hWnd
  ::SetWindowText(hWnd, L"Untitled - Notepad ");
}


Since you add a space at the end of the window text, the next time you call FindWindow, it will not find this window you already used (since it's title does not mach your search string anymore) and go on looking for the next one, if you find that next one, you add a space to that one too and so on untill you get no more windows...
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <

GeneralRe: Find the windows Pin
Cvaji22-Apr-10 6:40
Cvaji22-Apr-10 6:40 
GeneralRe: Find the windows Pin
Code-o-mat22-Apr-10 6:44
Code-o-mat22-Apr-10 6:44 
GeneralRe: Find the windows Pin
Cvaji22-Apr-10 6:54
Cvaji22-Apr-10 6:54 
QuestionChild windows and OOP Pin
zoopp22-Apr-10 0:04
zoopp22-Apr-10 0:04 
AnswerRe: Child windows and OOP Pin
Eugen Podsypalnikov22-Apr-10 2:16
Eugen Podsypalnikov22-Apr-10 2:16 
GeneralRe: Child windows and OOP Pin
zoopp22-Apr-10 4:21
zoopp22-Apr-10 4:21 
Questionidle percentage Pin
Russell'21-Apr-10 23:50
Russell'21-Apr-10 23:50 
AnswerRe: idle percentage Pin
Michel Godfroid22-Apr-10 1:03
Michel Godfroid22-Apr-10 1:03 
Questionnew operator in DllMain of MFC Extension Dll Pin
Member 334509521-Apr-10 23:24
Member 334509521-Apr-10 23:24 
AnswerRe: new operator in DllMain of MFC Extension Dll Pin
Eugen Podsypalnikov21-Apr-10 23:59
Eugen Podsypalnikov21-Apr-10 23:59 
QuestionGenerate series Pin
MsmVc21-Apr-10 21:45
MsmVc21-Apr-10 21:45 
AnswerRe: Generate series Pin
Richard MacCutchan21-Apr-10 21:50
mveRichard MacCutchan21-Apr-10 21:50 
GeneralRe: Generate series Pin
MsmVc21-Apr-10 21:54
MsmVc21-Apr-10 21:54 
GeneralRe: Generate series Pin
Richard MacCutchan21-Apr-10 22:49
mveRichard MacCutchan21-Apr-10 22:49 
AnswerRe: Generate series PinPopular
Stephen Hewitt21-Apr-10 21:54
Stephen Hewitt21-Apr-10 21:54 
GeneralRe: Generate series Pin
MsmVc21-Apr-10 21:56
MsmVc21-Apr-10 21:56 
GeneralRe: Generate series PinPopular
Cedric Moonen21-Apr-10 22:00
Cedric Moonen21-Apr-10 22:00 

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.