|
Hello!
I want to write a program that releases files that are in use by something I don't know...
Actually, I don't know where to start... If someone could help, I would be very thankful...
Thanks in advance!
|
|
|
|
|
check for CTL_E_FILEALREADYOPEN.
If the file is already open you would need to create a custom method for
CUSTOM_CTL_SCODE and then you can release the file you intend to use.
May be this can help you.
Vision is Always important and so is your ATTITUDE.
Wishes.
Anshuman Dandekar
|
|
|
|
|
I didn't understand what you mean... Maybe you can better explain yourself?
Thanks!
|
|
|
|
|
hey
can someone assist me with a small problem.
i have a project which has to be implemented in english as well as japanese.
in english i have a string on which a check of 64 characters is applied. but when japanese characters are stored in it it accepts only 34 characters.
_T macro did not work as well as the string is defined to be of CString type.
please help......
Amita Sapra
|
|
|
|
|
Get the Buffer from the Cstring and apply the
_mbslen function on it
hope it works
Knock out "T" from CAN'T
You 'CAN' if you think you 'CAN'
|
|
|
|
|
I debug a c++ program and the program supposed to write out a numerical (float type) array into a file. The number should be decimals with 3 digits, but I got the file looks like:
test Point# 1
-1.#IO -1.#IO -1.#IO
-1.#IO -1.#IO -1.#IO
-1.#IO -1.#IO -1.#IO
-1.#IO -1.#IO -1.#IO
-1.#IO -1.#IO -1.#IO
-1.#IO -1.#IO -1.#IO
-1.#IO -1.#IO -1.#IO
-1.#IO -1.#IO -1.#IO
-1.#IO -1.#IO -1.#IO
-1.#IO -1.#IO -1.#IO
-1.#IO -1.#IO -1.#IO
What is the problem ? How to fix it ?
Thanks
|
|
|
|
|
please post the code as well, will get an answer quickly that way
(seems like a formatting problem to me incorrect %d may be, hard to say without looking at code)
*radio crackle*
The cucumber has left the salad
- I say again -
The cucumber has left the salad
David in soapbox
|
|
|
|
|
The problem appears not to be due to the formating because when I use stop points to
print the value during debug I got the same problem: -1.#indo
........................
..............
fprintf (f_ptr5, "%s %i \n", "testor#", m_p_testor_no+1);
for (i=0;i
|
|
|
|
|
would it like to know how to divide at several quadrants a Form ? would like to know how to count Label of Panel, not Form? would it like to know how to divide at several quadrants a Panel?
All this using C++ Builder 6
I can learn mora about c++
|
|
|
|
|
Try "C++ Builder forums", like this[^].
Maxwell Chen
|
|
|
|
|
if i type code why doe it not work what would be the right way
int a;
a=5;
textBox1->text = a;
it does not display 5 it gives an error
thanks
morgus
|
|
|
|
|
your text box would be containing the sring value. you can assign
textBox1->text="5";
Cheers
"Peace of mind through Technology"
|
|
|
|
|
in addition to previous answer, you can convert an integer to a string using itoa[^].
-Saurabh
|
|
|
|
|
After assigning value, call UpdateData(false);
We Believe in Excellence
www.aqueelmirza.cjb.net
|
|
|
|
|
Hi Scientest ,
you need to convert from int to string for use in CEdit
you can use:
CString str;
int i;
i=5;
str.Format("%i",i);
textBox1->SetWindowText(str)(if textbox is CEdit)
or
TCHAR Buffer[15];
itoa(i,Buffer,10);
textBox1->SetWindowText(Buffer);//(if textbox is CEdit)
|
|
|
|
|
Hi,
I have a problem using the delete operator on an object. I have been debugging the code for hours and have run out of ideas. My code is similar to the following:
MyClass *MyClassPointer;
MyClassPointer = new MyClass(PointerParam1, PointerParam2);
delete MyClassPointer;
The code "delete MyClassPointer" cause a Debug Assertion saying that line 1044 of dbgheap.c caused an error at the expression _CrtIsValidHeapPointer(pUserData).
I'm completely stumped as to why I can't delete this particular object. I am dynamically allocating and deleting lots of other objects without any problem but this one is causing me grief.
Any ideas as to what I should be looking for ?
Thanks
Ethann Castell
|
|
|
|
|
can you show us destructor for MyClass, it seems that in its destructor you are either trying to delete something that isn't allocated or already deleted.
-Saurabh
|
|
|
|
|
A failed assert in a delete call means you either already freed that memory, or you wrote outside the block of memory allocated for the object. Either way, it's a bug.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | NEW!! PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
Thank you both for your help.
The problem was caused by trying delete a non existant object in the destuctor of a base class. I got put off because I was tracing in the debugger but tracing into the delete does not seem to take you through the destructors. Once I put an explicit breakpoint in the destructor of the base class, the problem became clear.
Thanks again.
Ethann
|
|
|
|
|
this is not a VC question.
my friend gave me a video card - i am a dummy for hardware.
info on card is:
---------------------
MGI G4+ MDH4A32G
FC ... with FCC standards
CE N408 SA
405B
---------------------
do you know what the info mean (conpany etc)?
where to download driver of the video card?
thx
A special image tool for C++ programmers, don't miss it!
The world unique Software Label Maker is here for you and me ...
A nice hyper tool for optimizing your MS html-help contents.
|
|
|
|
|
This really belongs in the hardware section... but since this is my area of expertise... I'll answer it and let someone else decide to move it.
MGI G4+ MDH4A32G is a Matrox Millennium G400
link to drivers if you need them: http://www.matrox.com/mga/support/drivers/latest/home.cfm[^]
It's pretty old, but it was one of the first dual head (dual screen) video cards produced which made it unique. You'd probably be better off with the lowest end of a current generation at about $50 cash, but that is up to you. It had limited performance even for its time, but for dual screen windows, artists, developers type stuff, it was great. My boss had one of the first ones released and had it for a very long time, and used it primarily for dual-screen Visual C development/debugging, not for graphics. For that it did him well.
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
In my header file I am trying to declare and initialize an array,
float front[4][3] = {{1.0f, 1.0f, 1.0f},{-1.0f, 1.0f, 1.0f},{-1.0f,-1.0f, 1.0f},{1.0f,-1.0f, 1.0f}};
I have tried it with and without ',' between the rows.
I have even tried it with only {,} (commas between entry which should just fill up the array in order)
I get syntax error from visual studio .net
Error 1 error C2059: syntax error : '{'
thanks,
kuroiryu
|
|
|
|
|
Tried it on my VS2005 and it seems to compile without a problem. Are you sure the error is at the same line listed above?
gmileka
|
|
|
|
|
I think you doing this inside a class, which is not allowed. Instead initialize array in the constructor.
-Saurabh
|
|
|
|
|
if i declare variable in the header
float front[4][3];
can i still initialize it with {} in the constructor?
front = {{1.0f, 1.0f, 1.0f},{-1.0f, 1.0f, 1.0f},{-1.0f,-1.0f, 1.0f},{1.0f,-1.0f, 1.0f}};
kuroiryu
|
|
|
|