|
manish.patel wrote: If possible then provide some code Snippets.
I refuse your demand!
I will however point you in the right direction... (OK, *a* direction). A B.E. in information technology can surely read documentation for the details.
You can use GetDesktopWindow to get the, um, desktop window.
Then either GetWindow with parameters GW_CHILD or GW_NEXT .
You can check with functions such as IsWindowVisible etc to filter out various states.
Alternately, you could use EnumChildWindows to do some of the work for you, at the expense of writing a second function.
Iain.
CPallini no longer cares if Iain Clarke appears or not. /sad
|
|
|
|
|
Iain Clarke wrote: CPallini no longer cares if Iain Clarke appears or not. /sad
Who did tell you it? He cares for sure.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Well, I had by "special request", then "in spite of being asked not to", so it seemed about time for a different variation!
Iain.
Iain Clarke appears because CPallini still cares.
|
|
|
|
|
Here's a start:
#include "stdafx.h"
#include <windows.h>
#include <tchar.h>
#include <malloc.h>
#include <iostream>
using namespace std;
BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam)
{
int len = GetWindowTextLength(hWnd);
if (len == 0 )
{
return true;
}
LPTSTR pText = static_cast<LPTSTR>(_alloca((len+1)*sizeof(TCHAR)));
GetWindowText(hWnd, pText, len+1);
cout << pText << endl;
return true;
}
int main()
{
EnumWindows(&EnumWindowsProc, 0);
return 0;
}
Steve
|
|
|
|
|
Hey Steve Thanks for your kind reply and providing code for me..
Again Thanks
bye..
Manish Patel.
B.E. - Information Technology.
|
|
|
|
|
try FindWindow and FindWindowEx combination [][^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
Hi
In VC++ ,win32 app. in VS 6
i want to execute some lines of code when i double click on any item in the listbox......tell me how to do it
AbidBhat
|
|
|
|
|
Handle the LBN_DBLCLK Notification.
|
|
|
|
|
Hi friends ..i have one VC++ 6.0 compiled code ..in this source code was good compiled in XP but in vista its not compiled ..then i can change that new code was written and run in vista ...then its compiled good.
my question is :
1. Then how to reuse the compiled vc++ 6.0 code in vista?
Please suggest me!!!
*****THANKS N ADVANCE****
Mathen.K
(I WILL TRY MY LEVEL BEST )
|
|
|
|
|
What?
Let's see if I can decipher this -
You have VC6 source code that compiled fine in XP (with VC6 I presume) but didn't compile in Vista?
You had to re-write the code for Vista and it now compiles and runs fine, right?
Not sure what you mean by "reuse". Please explain.
|
|
|
|
|
Hi thanks to your replay..
yes u r right ..i am asking how to reuse that compiled code in vista?
*****THANKS N ADVANCE****
Mathen.K
(I WILL TRY MY LEVEL BEST )
|
|
|
|
|
rowdy_vc++ wrote: 1. Then how to reuse the compiled vc++ 6.0 code in vista?
That would depend on what code you had to change. Getting it to compile on Vista vs. getting it to run on Vista are separate problems.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
hi friend..thanks to your replay
i am asking is there any possibilities to reuse that compiled code in vista ..but i know "Getting it to compile on Vista vs. getting it to run on Vista are separate problems. "
please suggest me!!
*****THANKS N ADVANCE****
Mathen.K
(I WILL TRY MY LEVEL BEST )
|
|
|
|
|
rowdy_vc++ wrote: i am asking is there any possibilities to reuse that compiled code in vista
Yes, the possibility does exist.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
hi, i need to use the CreateDesktop function and want to change the wall paper... i haven't started coding... i want the basic concepts for the above... like the working of CreateDesktop and changing the wall paper... then msdn is ok... but changing the wallpaper???
Today's Beautiful Moments are
Tomorrow's Beautiful Memories
|
|
|
|
|
what about IActiveDesktop::SetWallpaper() ?
|
|
|
|
|
i am using C language for win32 ... i searched that in google and got a msdn link about IActiveDesktop ... and i am on it... anyway, is there any other function to do that or some other steps with win32 API?
Today's Beautiful Moments are
Tomorrow's Beautiful Memories
|
|
|
|
|
May be you don't know that C langauage can interface with COM.
|
|
|
|
|
ofcourse, i concentrate on files, registry, winsock2 and now struggling with wininet... and not much with appearence... i just know the basic of windowing... by using the basic controls... anyway ... thank you...
Today's Beautiful Moments are
Tomorrow's Beautiful Memories
|
|
|
|
|
Have you tried SystemParametersInfo(SPI_SETDESKWALLPAPER, ...) ?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
how to set non-bitmap images as wallpapers ??
|
|
|
|
|
tina- wrote: how to set non-bitmap images as wallpapers ??
what typeof image, AFAIK, every image is displayed as bitmap image!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
Hi All,
I have developed the project in ATL in which I am getting events from the browser window through Invoke() function of the IDispatch interface.
And my question is that I want to get Mouse Click event with the element id on which event has been fired.How can I do that?
I tried below code to do the same but I m not getting success.
STDMETHODIMP CSimpleTab::Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags,
DISPPARAMS* pDispParams, VARIANT* pVarResult,
EXCEPINFO* pExcepInfo, UINT* puArgErr)
{
switch (dispIdMember)
{
case DISPID_HTMLELEMENTEVENTS2_ONMOUSEDOWN:
{
CComVariant dis_event;
dis_event = (CSimpleTab *)(this);
IDispatch *lpDispatch = pVarResult->pdispVal;
IHTMLEventObj * eventObj;
HRESULT hr = lpDispatch->QueryInterface(IID_IHTMLEventObj,(void **)&eventObj);
IHTMLElement * element;
eventObj->get_srcElement(&element);
}
}
}
in above code I m getting null in to the pVarResult->pdispVal parameter.
Do you have any idea why does this happen?
Thanks in Advance.
Ashish Bhatt,
Indianic,Ahmedabad.
|
|
|
|
|
You've already posted your query in the ATL forum, which is more appropriate. Just have patience and wait for replies.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
ok sorry,
But I got stuck at my work so that's why?
Ashish Bhatt,
Indianic,Ahmedabad.
|
|
|
|