|
The way to find out definitely is to use Spy++ on the control itself. Just run the application, open the dialog that contains the control in question, run Spy++ and drag the finder tool over the control. Note the type of control and its styles.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
It's part of Visual Studio.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Found it, i'll check it out. Thanks
|
|
|
|
|
here,I want to create a roundRectange dialog,I think there are two chioces:
First,owner draw,using the function SetWindowRgn().But I could not set the text of the title when it is minimized to the desktop's bottom.
Second,process none-client area of the dialog.But I could not make the bottom of the dialog to round-conor.
How should I resolve this?
Thanks.
BEST REGARDS
|
|
|
|
|
|
Thanks.The article is good.
But the problem is that,when it runs,there is no text tip in the desktop's status bar.(I mean the bottom of the desktop);
|
|
|
|
|
in another word,we could not set the WS_CAPTION style.
So,the dialog would show appear with no title ,even it is minimized!
|
|
|
|
|
How do I disable Remote debugging setting I had done for a project? Now what is happening is for whichever new project I try to debug the application asks for the path of the remote application.
|
|
|
|
|
in VS 2005
under project -> property pages
(tab) Configuration Properties -> debugging, (drop down) Debugger to lauch -> select Local Windows Debugger
under VS6... something simliar i guess, cant remember though
|
|
|
|
|
Why does a list offer a faster search as compared to a vector while offers a slower lookup. Is the explanation to be given in terms of algorithms?
|
|
|
|
|
Not correct. The speed is depends both the algorithm and the data structure. For example, a binary search algorithm is more likely will work faster on vectors (random access containers) than on lists (sequential access containers). But a sequential search algorithm may not do much difference on either of them.
--
=====
Arman
|
|
|
|
|
You may be thinking of map or multimap . Those collections can offer faster search/find times than a vector with a large number of items. I believe that walking a vector or list end-to-end in results in no significant performance difference (unless you consider memory locality).
If you are asking why certain collections (map , set , etc.) offer their own find(...) members instead of relying on the standard find(...) function, is is because the standard function requires a certain type of iterator (which a collection may not support), and searching some collections by begin() and end() may not take advantage of any optimizations/functionality within the collection itself, which is the case with map::find(...) vs. ::find(...) .
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
a vector will have a faster search because it is index based in const-time, whereas a list operator will be linear based on the size of the list, or in big O notation O(n) for list and O(1) for vector
a vector is good when working with array like properties
a list will be linked and thus you can do other cool suff like inplace merge, splice, add thing to the head or tail, in the middle
Yours Truly, The One and Only!
|
|
|
|
|
I need to know whether push_back when called on a vector pushes the element down the memory. In other words does a vector with push_back grow down in the memory.
|
|
|
|
|
This is, at least IMHO, a unspecified implementation detail.
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.
|
|
|
|
|
Then why not test it? Push back a few elements, create an iterator, and then advance the iterator while looking at its memory location.
|
|
|
|
|
A vector will (is supposed to?) grow only when it needs to, so if has the capacity for 32 items, and you are push_back(...) -ing the 30th item, the vector should not grow (or reallocate).
If you are asking how the elements in the vector are ordered within the memory for the vector , I believe this would be the same as a standard C-style array. That is what allows normal pointers to be used with ::find(...) and interchanged with the iterators returned by vector::begin() and vector::end() (except for the off-by-one for the end() iterator).
So having:
vector< int > vecInt;
int iaInt[ 5 ] = { 0, 1, 2, 3, 4 };
vecInt.pushBack( 0 );
vecInt.pushBack( 1 );
vecInt.pushBack( 2 );
vecInt.pushBack( 3 );
vecInt.pushBack( 4 ); I believe the layout in memory for both would be the same.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Yes, vectors use contiguous memory so you can pass them to functions that take arrays like this.
std::vector<point> vecPoints;
Polyline(hDC, &vecPoints[0], vecPoints.size);
Pax Domini sit semper vobiscum
|
|
|
|
|
you can't assume anything in terms of how the algorithm is implemented, once you do you're headed for trouble when implementation changes!
STL states this, it's not my personal view
Yours Truly, The One and Only!
|
|
|
|
|
Hi everyone,
I am getting some strange error message.
I have a class CCustomUnitList, which i have used in CMainFrame class. I have declare a pointer in the MainFrm.h as
extern CCustomUserList *p_ListUser;
and
CCustomUserList *p_ListUser; in MainFrm.cpp
Also i have defined an attribute of class CCustomUnitList
Everything works fine till here
I now want to access the pointer from another class CCustomUnitList. So i declared included MainFrm.h in the CustomUnitList.h . Now i am getting an error.
d:\source\baker\exp\sizecbar_src\demo2\mainfrm.h(83) : error C2146: syntax error : missing ';' before identifier 'm_ListUnit'
d:\source\baker\exp\sizecbar_src\demo2\mainfrm.h(83) : error C2501: 'CCustomUnitList' : missing storage-class or type specifiers
d:\source\baker\exp\sizecbar_src\demo2\mainfrm.h(83) : error C2501: 'm_ListUnit' : missing storage-class or type specifiers
CustomUserList.cpp
Strange thing is i did the same thing with another class CPackageList and things are working just as intended.
|
|
|
|
|
Did you include the header file of the class ?
|
|
|
|
|
Did you include header file to mainfrm for CCustomUserList for example :
#include "CustomUserList.h"
|
|
|
|
|
yup done that... I know it's not a silly mistake.. That's why i have posted it. The header files and all are in place. I have been tracing that half the day.. only then i have posted it
|
|
|
|
|
Maybe its not your problem but I would want to ask it you said include CustomUnitList.h on the MainFrm.h I want to know did you include MainFrm.h on the CCustomUnitList.h?
|
|
|
|