|
Hi All,
I am working on a Windows browser sort of a thing and building it in ATL domain. The problem I am facing is that I can't "Cut" a file from a given location. I have "Copied" a file and "Pasted" it but I don't know how to "Cut" a file.
Can anybody help me????
Best regards,
Pious.
|
|
|
|
|
Cut/Paste == Copy + Delete.
Copy from old location to new, then delete from the old location.
-Sean
----
Shag a Lizard
|
|
|
|
|
Is this a MS specific library?
For instance could I use WTL in say Bloodshed C++? I'm not sure if the ming(??) compiler supports templates or not?
Anyways, if I can use WTL in VC++ and bloodshed...that would be super...
Thanks
"Two wrongs don't make a right, but three lefts do!" - Alex Barylski
|
|
|
|
|
I believe ATL is MS-specific - I think it uses some MS extensions, such as __uuidof , in places. Looking at the WTL code, the only thing I can see (in a small sample of the code) is the use of #pragma once .
Best thing to do is to try compiling some WTL code and see what happens!!!!
If you're not tied to GCC, you could try the Borland or Watcom C++ compilers - they're both freely downloadable....
Stuart Dootson
'Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p'
|
|
|
|
|
How can I shift all the items on a stack up by one?
Item1
Item2
Item3
Item4
After shifting up by one you would have
Item2
Item3
Item4
Item5
Do I have to create a temp stack? Or is there any way I can access each item in the stack like vector? A quick hack maybe...I just think swapping the values (except index 0 which would overwritten) would be more efficient the creating a temp stack (or popping the values off into a vector, then copying the vector values over to the new stack)
Anyways...if I made myself clear and you understand what i'm trying to do...can this be accomplished???
Thanks
"Two wrongs don't make a right, but three lefts do!" - Alex Barylski
|
|
|
|
|
One solution is to use a list or a deque container that way you can add elements from both ends.
Kuphryn
|
|
|
|
|
You can use a stack::iterator and iterate through elements in the stack.
Best regards,
Alexandru Savescu
P.S. Interested in art? Visit this!
|
|
|
|
|
i find CArry class in mfc quite convenient to use, then can we use it in wtl?
modified 1-May-21 21:01pm.
|
|
|
|
|
I am not sure if you can without MFC, but I suggest that it is better to learn STL. I have a lot of old code that uses the MFC template classes and I wish I would have switched to STL sooner. The only problem is STL is a lot harder to learn to use, however it is worth the extra time because STL is way more powerful than MFC template classes and also more portable.
John
|
|
|
|
|
|
Michael Dunn wrote:
You can use the STL equivalent, std::vector
:-DI can use CAtlArray instead.
modified 1-May-21 21:01pm.
|
|
|
|
|
Yes, but why would you ? Seriously, why are people so scared of learning STL, when it's so much better ?
Christian
NO MATTER HOW MUCH BIG IS THE WORD SIZE ,THE DATA MUCT BE TRANSPORTED INTO THE CPU. - Vinod Sharma
Anonymous wrote:
OK. I read a c++ book. Or...a bit of it anyway. I'm sick of that evil looking console window.
I think you are a good candidate for Visual Basic. - Nemanja Trifunovic
|
|
|
|
|
CAtlArray has some advantages over std::vector. For one it is a LOT like the old (and crappy) CArray. It also produces a lot smaller code than std::vector.
Now that being said, I have to agree that people should take the plunge and learn STL so they can make intelligent decisions on when to use which container. If I was doing a project with STL already in it, std::vector is a no brainer. However, if I was doing a pure WTL/ATL program with no STL and didn't need all the nice STL features, I would have no problem using CAtlArray.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
STL requires CRT, doesn't it?
|
|
|
|
|
I doubt it.
Christian
NO MATTER HOW MUCH BIG IS THE WORD SIZE ,THE DATA MUCT BE TRANSPORTED INTO THE CPU. - Vinod Sharma
Anonymous wrote:
OK. I read a c++ book. Or...a bit of it anyway. I'm sick of that evil looking console window.
I think you are a good candidate for Visual Basic. - Nemanja Trifunovic
|
|
|
|
|
From "Avoiding the Visual C++ Runtime Library By Matthew Wilson"[^]:
The implementation of some of the STL classes that ship with Visual C++ means that the CRT Library is required for some, but not all, parts of the STL Library. For example, if you declare a single string, with a literal string constructor argument, the linker reports that it cannot see the following symbols:
"void __cdecl std::_Xlen(void)"
(?_Xlen@std@@YAXXZ)
___CxxFrameHandler
__except_list
__EH_prolog
Also, virtually no parts of the iostreams are usable without the CRT Library.
However, other parts of the library are eminently usable without the CRT Library, including auto_ptr, list, map, and vector, along with the algorithms and functionals.
|
|
|
|
|
I`m writing my own thesaurus, and I have some problem:
How to find a word (CString) in multimap and get index (int) of this word?
Can somebody tell me where I can find some examples of thesauruses in VC++
Hegemon
|
|
|
|
|
You can find the word by using the multimap container's find method. As for the index to the word, what do you mean by that? There are no indexes in maps, per-say; however, you can get an iterator that references the matched pair (Which I gather is a CString-to-int), but not an integer (unless you mean the int that is paired with the CString in which case you would just dereference the iterator returned by find and access the second data members).
cheers,
-B
|
|
|
|
|
modified 1-May-21 21:01pm.
|
|
|
|
|
chain to the base class. Reflect to local controls in the class.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
I want to create a HTML control using ATL Wizard. I tried creating it using the ATL HTML Control. But when i tried to test it (both in ActiveX test container and in browser) i am gettting the error 'Object doesn't support this property or method'. (when it tries to call 'OnClick' , i.e when i click the button called 'Red', 'Green', 'Blue') I tried in Win98 and WinXp. I use VC6.
Can any one help with what i can i do to get this working?
Thanx in advance.
Mahesh
|
|
|
|
|
Mahesh,
try sellsbrothers.com/tools/[^]. There's a header file you can download that gives you a bit more information.
"If we knew what it was we were doing, it would not be called research, would it?"
- Albert Einstein
|
|
|
|
|
I built a COM component with ATL and have it tested with a simple VB program. It works fine so I concluded the component is OK. However when I called in a ASP page, it complaint the "Library not registered". I am very confusing because the VB can see the type library so it must be registered. Why the ASP page not seeing it?
I read MSDN article ID: Q221792
PRB: "Library Not Registered" Error When Calling Method in ATL Server and follow the instruction, it doesn't seem help. Can anyone help me out?
|
|
|
|
|
I have my WTL app's menu inside a CommandBar control. Now I want to process some notifications it sends but it doesn't seem to send them to the parent. How can i make it send these notifications to the parent or is there a better way for daeling with this???
|
|
|
|
|
Hi All,
I’m handling events of ADO in an ATL out-of-process server, and for some reasons when I use _ATL_FREE_THREADED declaration event ConnectComplete is not called when I establish an asynchronous connection, thou it is called when I use a synchronous connection. Changing the memory model to _ATL_APARTMENT_THREADED solves the problem, but what is the reason of such strange behaviour anyway, and what’s the
proper solution?
Regards,
Vitaly Tomilov
|
|
|
|