|
I guess that got it
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
I want a sample program to create two threads & only one thread access the CList object at a time. that is, one thread uses some(i don't know which) synchronization object to lock the CList object & writes to it and then releases the CList object. Next another thread does the same process, but instead of writing, it reads from the CList.
can anybody help?
Rsh
|
|
|
|
|
I'm sorry but time is not my friend right now to make an example, but you can start searching for this on MSDN: CMutex or CCriticalSection.
Hope this helps.
PS: if you have installed the MSDN Help from Visual Studio.NET then use this address:
ms-help://MS.VSCC/MS.MSDNVS/vccore/html/_core_Multithreading.3a_.How_to_Use_the_Synchronization_Classes.htm
Andres Manggini.
Buenos Aires - Argentina.
|
|
|
|
|
You should use something like this:
CCriticalSection cs;
void CMyClass::FunctionThatAccessTheCList ()
{
cs.Lock ();
cs.Unlock ();
}
Best regards,
Alexandru Savescu
|
|
|
|
|
Pretyy cool one
Thanx Alexandru
Rsh
|
|
|
|
|
This post of mine explains a convenient approach to synchronizing access to a data structure.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thank u Joaquín
This made my life more easier
Rsh
|
|
|
|
|
|
I always thought the whole thing's max length would be MAX_PATH (plus 1 for the terminating NULL)? But this is only true on 9X systems - I think there are ways of getting Windows NT-based systems to have UNICODE paths much longer than MAX_PATH.
But since I never compile in Unicode, I always just use MAX_PATH + 1 and hope for the best.
No generalization is 100% true.
Not even this one.
|
|
|
|
|
i want to add icons on desktop programatically, if someone having idea how to add them. plz do share knowledge
|
|
|
|
|
Search for "Shell Links" on MSDN, or for this interface: "IShellLink".
Sorry, I have no samples.
Hope this helps.
Andres Manggini.
Buenos Aires - Argentina.
|
|
|
|
|
I am trying to reposition the Cursor inside of the Edit Box in a ComboBox in my Application. I've tried SetCaretPos, but it doesn't seem to affect the ComboBox Control.
What I'm doing is trying to get an autocompleting ComboBo that Set the Cursor to the Beginning of the Selected string that holds the completed text instead of the end. Right now when I auto complete the text the control scrolls to the end of the text and so you can no longer see what you are typing.
|
|
|
|
|
CEdit * pMyEdit = (CEdit *)m_myCombo.GetDlgItem(1001);
this will get the CEdit part of the combo box. you can do the SetCaretPos on that.
-c
Cheap oil. It's worth it!
|
|
|
|
|
I've tried that or at least something simillar. I have the Edit Box subclassed. I put this code inside of the OnEditChange of my ComboBox
class and the Cursor never Budges from the end of the string.
CEdit* lpEdit = static_cast<cedit*>(GetDlgItem(1001));
lpEdit->SetCaretPos(CPoint(0,0));
|
|
|
|
|
How do you know that it is 1001?
|
|
|
|
|
i don't know, it just is...
-c
Cheap Oil. It's worth it!
|
|
|
|
|
|
There is a restore classview addin available in CP. That will explain you everything. See under addins section.
|
|
|
|
|
What is CP, and in what addins section?
|
|
|
|
|
CP stands for Code Project
And he pointed you to http://www.codeproject.com/macro/restoreclassviewaddin2.asp
Michel
It is a lovely language, but it takes a very long time to say anything in it, because we do not say anything in it, unless it is worth taking a very long time to say, and to listen to.
- TreeBeard
|
|
|
|
|
I would caution using that version and use http://www.codeproject.com/macro/restoreclassviewaddin.asp instead. I tried the new version and it totally messed up (lost) my class view.
Also you must do this to save the classview before VC++ has crashed if it has already lost your classview their is no way to recover it.
John
|
|
|
|
|
I'm trying to call the DllMain funcion explicitly after the DLL is already loaded. I have an handle to the DLL but I have no idea how can I get the DLL function from it.
Thanx
Didi Gurfinkel
|
|
|
|
|
Why do you need to do that? I think a simpler idea would be to export another function which does what you do in DllMain. You can call that explicitly and also from DllMain. You can export DllMain too but it will be nice to keep the sanctity of the function.
|
|
|
|
|
I need it for backward compatibility issue.
|
|
|
|
|
I am considering writing some of the classes for our project using C++ rather than VB in order to gain some speed benefits.
Has anybody done this (successfully) ?
Does anybody have any examples I could peruse ?
David R Hancock
The Heinekin Uncertainty Principle: You can never be sure how many beers you had last night
|
|
|
|