|
|
I recently downloaded the XListCtrl demo and the "uxthme.h" and "tmschema.h" files are not there.
Also can someone explain where one is to place the "lib" files (in DETAIL please!).
I'm using VS 6.0.
A C++ programming language novice, but striving to learn
-- modified at 15:26 Saturday 2nd December, 2006
|
|
|
|
|
These are in the Platform SDK, but as Christian indicated above the current PSDK is not compatible with VS 6.0. (I think you have to go back to 2002 or so to get one that is.)
Visual Studio 2003 and 2005 both ship with a compatible Platform SDK. If you are learning, I suggest biting the bullet and getting either. 2005 has a much better C++ implementation, but the IDE is rather flakey for C++ development. (Still, it's enough of an improvement that I use it for all of my new C++ development; I use 2003 only for legacy apps where it isn't cost effective to move to 2005.)
If you can get hold of a copy of the full MSDN CDROMs from at least October 2001, it will have the material you need on it (somewhere in the back of my mind, I'm thinking the February 2002 is the last that will work, but I may be remembering something else.)
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Joe Woodbury wrote: (somewhere in the back of my mind, I'm thinking the February 2002 is the last that will work, but I may be remembering something else.)
Indeed you are. MSDN October '01 is the last one that works with VS6.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
According to PJ's reference, the Platform SDK from February 2003 was the last one to support VC 6. (http://www.qmedia.ca/launch/psdk.htm[^])
PS. I don't have VC6 installed and have no way to confirm the accuracy of this site.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
I ordered the Feb 2003 PSDK from that site in order to reinstall VC6 so I could maintain an old app of mine. The PSDK was free but they charged S&H to send out the CD.
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
Joe Woodbury wrote: ...the Platform SDK from February 2003 was the last one to support VC 6.
True, as far as the PSDK goes. I understood your comment to be about MSDN.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
Actually there are more than 100 dialogs and for displaying a static text on the top of the dialog i have to resize the dialog, accordingly i have to reposition all the controls in it.
can somebody give me solution to reposition controls without much work.
|
|
|
|
|
Raj Gopal wrote: can somebody give me solution to reposition controls without much work.
You can save alot of work by letting someone else do it!
Does the text vary in length? If so then it's probably easiest to render the text yourself.
You're going to have to calculate all the text rects anyway so using static controls would just
add another layer of coding.
To calculate text draw rects there's GetTextExtentPoint32() (CDC::GetTextExtent() in MFC).
To draw the text (perhaps in response to WM_PAINT) there's DrawText() (CDC::DrawText() in MFC)
Mark
|
|
|
|
|
You could write a function that runs through all controls (except, perhaps, ones passed in an exception array) and move them. You'd call this from OnInitDialog, passing the window handle.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
is it required to pass handle of all controls in a dialog for moving them?
if so itz quite a big task bcoz thr r more than 100 dialogs.
is thr ny better solution?
|
|
|
|
|
I think you misunderstood.
I suggest using David Crow's code (see his post below) as a starting point to write just one function that will cycle through the controls in the dialog, moving them one by one. (David's article shows how you can move the controls.)
This function would take the window handle of the dialog box and a pointer to the string (or a resource ID) that must be displayed. With that dialog box handle, you can calculate the size of the string and the delta for moving the controls. You then get each control in succession and move it. At the end, you add the static control for your string.
You would then call this function in OnInitDialog(). (Since m_hWnd--or GetSafeHwnd()--is common for each dialog box, the only variable is the resource ID or string pointer. Once you get this working for one dialog, it shouldn't take long to paste this in the rest and do the ID/pointer fixup.)
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Yes david's article is good and its useful.
Thank you for your response joe.
|
|
|
|
|
Raj Gopal wrote: can somebody give me solution to reposition controls without much work.
See the Extras section of this article.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
thank you david. its good article.
|
|
|
|
|
Hi!
I have a question concerning the use of delete keyword in C++ programs.
First, I do something like this:
int *pInt = new int [16];
delete pInt; All the documentation I have read about delete sais that you must use delete [] when the allocated memory is an array. But if I run the small program containing these two lines of code in Debug mode, the _CrtDumpMemoryLeaks function tells me that the is no memory leak. In conclusion, why is there any need to deallocate the memory pointed by pInt using delete [] pInt; if it works using only delete pInt?
If anyone can answer my question, I would greatly appreciate it!
Thanks in advance!
|
|
|
|
|
|
Thank you! It helps a lot!
|
|
|
|
|
Eikthrynir wrote: lete [] pInt
actually [] instruct compiler to delete the array of Memory block here.. if you use simple delete then only one memory block will be freed
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
|
A vector is an array internally ( that is, it's continuous memory ). Therefore, if you set up an equivelant class in C# ( assuming it's not just a simple type ), you should be able to pass it through.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Reza Shadmani wrote: How could i pass STL vector params between C# and C++?
No. (Assuming you want to retain the full integrity of the vector, vs. just the data.)
For examples on how to pass arrays of data, look at P/Invoke.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
I want to display a text file , using the CEdit controller.
Though i dont want the user the be able to edit the text, only mark the text if he wants to copy something.
If i set the readonly parameter, it is exactly the way i want it, except its color background is greyed, i want the white.
This is the code i have now:
CEdit * p = static_cast<cedit *="">(GetDlgItem(IDC_Readme));
p->SetWindowText("Text");
p->SetMargins(2,2);
|
|
|
|
|
You don't need to make the edit-box to be read-only. You only have to manage the WM_KEYDOWN message, like this:
BOOL CTestDlg::PreTranslateMessage( MSG *pMsg )
{
if ( pMsg -> message == WM_KEYDOWN )
{
CEdit *p = (CEdit *) GetDlgItem( IDC_Readme );
if ( GetFocus( ) == p )
return TRUE;
}
return CDialog::PreTranslateMessage( pMsg );
} I don't know what is the name of your application's main dialog class. In my example it's CTestDlg. Don't forget to declare this overriden function in that class.
Good luck!
|
|
|
|