Returning Window Position Given Handle



 DEVELOP > c-Plus-Plus > Returning Window Position Given Handle

LINK TO THIS PAGE  


rating :  0   |  0


  Page 1 of 1

1

 
Topic: DEVELOP > c-Plus-Plus
User: "Calum Maciver"
Date: 10 Jan 2008 06:03:10 PM
Object: Returning Window Position Given Handle
Hey Guys!,
I'm very new to c++ and need to write a really simple program. I've
downloaded Visual C++ 2008, on recomendation from a friend and have
the following task to perform. I need to create a program, that given
a window name such as "Internet Explorer" maximises that specific
window and returns the top left co-ordinate. I presume that I need to
use the Windows API however after glancing over a few tutorials I feel
it is taking a long time to discover the answer and I only need a
simple solution. After I have this information I will use JNI and do
the rest in Java. Any pointers and sample code would be much
appreciated.
.

User: "Rui Maciel"

Title: Re: Returning Window Position Given Handle 11 Jan 2008 07:40:50 AM
Calum Maciver wrote:

I'm very new to c++ and need to write a really simple program. I've
downloaded Visual C++ 2008, on recomendation from a friend and have
the following task to perform.

Not a good friend.

I need to create a program, that given
a window name such as "Internet Explorer" maximises that specific
window and returns the top left co-ordinate. I presume that I need to
use the Windows API however after glancing over a few tutorials I feel
it is taking a long time to discover the answer and I only need a
simple solution.

That's the thing. The C++ standard does not define anything related to
window management or GUIs. Therefore, as this group is dedicated to the
discussions regarding the C++ language and the C++ standards, you won't be
able to get much help around here. On the other hand, I do believe you will
get the help you need if you put that question in any newsgroup dedicated
to your target platform and API.
Hope this helps
Rui Maciel
.

User: "Ron AF Greve ron@localhost"

Title: Re: Returning Window Position Given Handle 10 Jan 2008 06:46:42 PM
Hi,
A good starter would be to lookup
http://msdn2.microsoft.com/en-us/library/ms633497.aspx
EnumWindows function.
But from there you are on your own. As somebody else noted not really
something done by a starter in a few minutes. You can do it, but expect to
invest quite some time (and have frustation and fun but for all learn a lot
:-)
Good luck!
Regards, Ron AF Greve
http://www.InformationSuperHighway.eu
"Calum Maciver" <calummaciver@gmail.com> wrote in message
news:b4e2b205-6ae4-4f7f-83d1-69e248f84efb@k2g2000hse.googlegroups.com...

Hey Guys!,

I'm very new to c++ and need to write a really simple program. I've
downloaded Visual C++ 2008, on recomendation from a friend and have
the following task to perform. I need to create a program, that given
a window name such as "Internet Explorer" maximises that specific
window and returns the top left co-ordinate. I presume that I need to
use the Windows API however after glancing over a few tutorials I feel
it is taking a long time to discover the answer and I only need a
simple solution. After I have this information I will use JNI and do
the rest in Java. Any pointers and sample code would be much
appreciated.

.
User: "Calum Maciver"

Title: Re: Returning Window Position Given Handle 10 Jan 2008 08:13:51 PM
How hard can it be? I've programmed in other languages I just don't
have any experience with programming for Windows. I understand the
concepts of programming just not the specific details for making a
Windows program, and it's a pretty simple program I'm looking for so I
thought you guys might give a quick example.
.
User: "Ron AF Greve ron@localhost"

Title: Re: Returning Window Position Given Handle 11 Jan 2008 05:35:31 AM
Hi,
Wel basically you do a
Create a (dialog based app) in VS.
You put in a button, add a handler for the button, in the handler do
something with
FindWindowEx
SetWindowPos
I haven't tried it and this seems an hour of work or so, but in my
experience hooking up different technoligies windows and java, doing things
with other applications (how do they react when you resize from another app)
from the outside often lead to things you don't expect. And that might
result in a lot of reading internet searching etc.
You might get lucky and get it done in a day but it is more likely that it
is going to take a lot more time.
But the above would be a could start, but also browse through the rest of
the windows functions with the link provided earlier.
Regards, Ron AF Greve
http://www.InformationSuperHighway.eu
"Calum Maciver" <calummaciver@gmail.com> wrote in message
news:c4b71ec5-e2f6-427e-952e-b143e00859d2@s12g2000prg.googlegroups.com...

How hard can it be? I've programmed in other languages I just don't
have any experience with programming for Windows. I understand the
concepts of programming just not the specific details for making a
Windows program, and it's a pretty simple program I'm looking for so I
thought you guys might give a quick example.

.

User: "Christopher"

Title: Re: Returning Window Position Given Handle 10 Jan 2008 08:50:36 PM
On Jan 10, 8:13 pm, Calum Maciver <calummaci...@gmail.com> wrote:

How hard can it be? I've programmed in other languages I just don't
have any experience with programming for Windows.

Neither does this newsgroup. While the people on it may or may not
have programmed in Windows, the newsgroup itself does not consider
Windows Programming expertise topical. If you want someone whom may
have Windows programming expertise, than it it best to ask on a
newsgroup where Windows Programming is the topic. There are quite a
few with high traffic in the microsoft.public hierarchy. I frequent a
few myself.

I understand the
concepts of programming just not the specific details for making a
Windows program, and it's a pretty simple program I'm looking for so I
thought you guys might give a quick example.

Every topic one learns in life can be subdivided into sub-topics that
require yet another decade to master. Being good at programming
doesn't mean you will be good at Windows Programming. Being good at
Windows Programming doesn't make you good at DirectX programming.
Being good at DirectX programming, doesn't make you good at Flight
Simulation programming. etc. etc.
It may help, but it won't allow you to jump right in.
C++ does not come with insta-gui capability like some "languages". C++
has no concept of GUI. 3rd Party libraries do. They are all a task
within themselves to learn.
However, you won't learn them here. You will learn the language itself
and get answers about the language itself, because that is what we are
for. Then you can use that to dig into whatever libraries you desire
and ask about them elsewhere where you are more apt to get help and
the help will be of better quality.
.



User: "Christopher"

Title: Re: Returning Window Position Given Handle 10 Jan 2008 06:29:12 PM
On Jan 10, 6:03 pm, Calum Maciver <calummaci...@gmail.com> wrote:

Hey Guys!,

I'm very new to c++ and need to write a really simple program. I've
downloaded Visual C++ 2008, on recomendation from a friend and have
the following task to perform. I need to create a program, that given
a window name such as "Internet Explorer" maximises that specific
window and returns the top left co-ordinate. I presume that I need to
use the Windows API however after glancing over a few tutorials I feel
it is taking a long time to discover the answer and I only need a
simple solution. After I have this information I will use JNI and do
the rest in Java. Any pointers and sample code would be much
appreciated.

Not the type of thing to do at all if you are a beginner. After 6
months to a year maybe...
At any rate it is Off Topic in this newsgroup. I'd recommend one of
the microsoft.public newsgroups
.


  Page 1 of 1

1

 


Related Articles
How to load a class from given class name in a string ?
Constructing a Class Given a String
Given only a pointer to a node to be deleted in a singly linked list, how do u delete it?
Is it possible to call a function which name is given by a string?
" Given BACK what was freely GIVEN "
Best way to find rational for a given float
Help in my program it is not given the right answer
How to completely end a program if some condition given holds true?
Given a date, how to find the beginning date and ending date of that week
How to convert a given local time to UT considering Daylight Saving Times....
max value of a subsequence in a given sequnce of numbers.
How to use functions of given dll?
If you were given a mall would you take it?
implementing constructors given class declarations
to check if the given string is substring using c++
 

NEWER

pg.1232     pg.940     pg.716     pg.544     pg.412     pg.311     pg.234     pg.175     pg.130     pg.96     pg.70     pg.50     pg.35     pg.24     pg.16     pg.10     pg.6     pg.3     pg.1

OLDER