|
|
is it possible to capture parent window text(title bar text) instead of sending the title text from parent to child.
actually in our project we have more than 200 dialogs, and nw our client needs title bar look like parent text/child text.
for example say suppose we hav 3 dilaogs nd
1st dialog is parent of 2nd and 3rd dialogs and 2nd is parent of 3rd dialog so 3rd dialog is subchild for 1st dialog and child for 2nd dialog.
lets say
1st dialogs - title text is Dialog1
2nd dialogs - title text is Dialog2
3rd dialogs - title text is Dilaog3
and now the title text for each dialog should be as follows,
1st dialogs - title text is Dialog1
2nd dialogs - title text is Dialog1/Dialog2
3rd dialogs - title text is Dialog1/Dialog2/Dilaog3
itz just like directory sturcture which is displayed in addressbar while opening any directory.
as it is difficult to open every dialog and get the title text and send it to child and itz quite a bit confusion if there are sub-sub-sub dialogs so can we write any DLL to simply the problem if ny one hav idea regarding this plz lemme nw.
Raj Gopal
|
|
|
|
|
In a dialog's OnInitDialog() you can call GetParent() to get the dialog's owner, and call GetWindowText() to get the owner window's caption text.
|
|
|
|
|
thnx for reply sir.
But the problem here is there are many sub dialogs, actually for every dilaog the title should be
grandparent
grandparenttext/parent
grandparenttext/parent/child
grandparenttext/parent/child/subchild
grandparenttext/parent/child/subchild/subsubchild.....
so is it good way of creating a dll and pass the handle of the dialog and maintaing all the previous dilaogs handle in it so that we can loop thru the handles and get the title text of each dialog and put the text in the above format?
|
|
|
|
|
You could paint the title bar yourself. This way you would not have to
change the title of your windows. Just would have to walk the parents
using GetParent, and build the new name for each window on the fly.
|
|
|
|
|
To get your main window handle from any of the children/grandchildren/... just put the GetParent() api in a loop, when it returns null you have found the top level window. For each window it returns, get the text and build a title bar string.
|
|
|
|
|
In a "Installer" program I want to present to the user a Dialog with a progress bar and over the progress bar I want to show what file(s) are being copied.
Can someone present me code snipspets of how to do this?
Thanks
A C++ programming language novice, but striving to learn
|
|
|
|
|
Several of these[^] articles show how to have a progress bar with text.
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
Thanks. They helped!
A C++ programming language novice, but striving to learn
|
|
|
|
|
You might want to check out the SHFileOperation API.
Steve
|
|
|
|
|
I'll check it out. Thanks!
A C++ programming language novice, but striving to learn
|
|
|
|
|
I'm going on a bit of a book spending spree to get myself an ultimate C++/Object Oriented reference library and am considering the following books (which all seem to be highly recommended):
Accelerated C++: Practical Programming by Example
Effective C++
More Effective C++
Effective STL
Exceptional C++
More Exceptional C++
Exceptional C++ Style
The C++ Standard Library: A Tutorial and Reference
Beyond the C++ Standard Library: An Introduction to Boost
C++ Templates: The Complete Guide
C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond
Modern C++ Design: Applied Generic and Design Patterns
Design patterns : elements of reusable object-oriented software (Gof)
Head First Design Patterns
Design Patterns Explained: A New Perspective on Object-Oriented Design
1) If I get all three Effective C++/STL books, is it worthwhile me getting all three Exceptional C++ books ?
2) Should I get the Design Patterns Gof book as it is quite old now, and from what I've read it doesn't really explain when patterns shoul;d not be used (plus there are other newer design pattern books) ?
3) Should I get both C++ Template books, or would one suffice ?
4) Any other suggestions or comments would be appreciated ?
|
|
|
|
|
Maybe you should start with Effective C++, read it, and after that see what you
want to do? Have you tried the Stroustrup?
|
|
|
|
|
Yeah, I've got the Stroustrup Special Edition.
I want to start using STL and the Boost libraries in particular to help speed up development time as well as offering portability and improving the quality (compared to custom written classes).
|
|
|
|
|
Hi
I'd like to write a programm to restrict internet sides.
I mean a filter that only allows some sides - maybe working like a virtual proxy depending on the user login name for a machine.
Second function should be to fill in login data into a form. And those data should be non changebal. For example using gmx login only for one given account.
Thanks for any help
Tim
If you believe this is not very usefull then I believe you have not been in my situaltion.
|
|
|
|
|
Does anyone have any good articles on doing these 2 things with c/c++? I see many articles for c# and VB. I would like to do simple everyday tasks but faster without the need of accessing AD Users and computers everytime.
Thanks
|
|
|
|
|
You can use the Win32 functions GetCurrentDirectory and SetCurrentDirectory or the CRT functions _tgetdcwd and _tchdir .
Steve
|
|
|
|
|
I recently downloaded Visual C++ Studio and when I try to compile my project, I get error messages such as these below. I made sure to follow the instructions on setting the VC++ Directories option but I still keep getting errors such as this one
c:\Pam 2\Headers\afxwin.h(19) : fatal error C1083: Cannot open include file: 'AFX.h': No such file or directory
and the problem is that most of these include files happen to be in the Windows Platform SDK / Include/MFC folder. How do I get my the compiler to look in there for these files please.
Tokorie
|
|
|
|
|
Tokorie wrote: recently downloaded Visual C++ Studio
Downloaded the express edition? If so, it doesn't come with MFC
|
|
|
|
|
I did download the express edition and then I downloaded SDK and followed the instructions on this page to get the two integrated http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/default.aspx[^]
but the problem is that it is still not detecting the files in the SDK and I would like to get the two working so I can compile my files without all these errors
|
|
|
|
|
Hmmm the last time I checked, you could only build native apps with the express edition.
|
|
|
|
|
It is able to do more now but needs to have the settings done correctly and that is the problem I keep having.
|
|
|
|
|
Tokorie wrote: It is able to do more now
ok... so what about adding
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\mfc
to the include directories?
|
|
|
|
|
Can you help with this error ??
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\mfc\afxv_w32.h(14) : fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>
|
|
|
|
|
Are you including windows.h explicitly somewhere?
Also make sure you have something like this before any MFC header file includes...
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0400
#endif
Even if you get past this, the MFC included with the platform SDK is from VC 6.
If you get it to compile and run on 2005 express you will be the first I believe.
Even then, you'd be using MFC version 4.x
|
|
|
|