|
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
|
|
|
|
|
|
FilthyZombie wrote:
our project using C++ rather than VB in order to gain some speed benefits
Be very sure of whether the classes will give you performance benefits or not. It is not necessary that converting to C++ will give you some performance benefits. If the code is data-access code then don't even bother.
The ways to access VC++ code thru' VB is COM Automation. You need to create a COM component in VC++.
|
|
|
|
|
Rama Krishna wrote:
If the code is data-access code then don't even bother
Yeah, it'd be funny if someone created a C++ component to use ADO
For 5 times the coding effort you get zero speed benefits and possibly buggy code.
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Buy it, read it and admire me
|
|
|
|