|
I can see two things that the for loop might affect.
1) the incrementing of PixelCount . This is used in the dereferencing of Data_0 and Data_1 . Are the arrays large enough?
2) the incrementing of CoX and CoY . Those are used by PixelValue() and GoWatermark() . Can those functions handle values greater than 0?
|
|
|
|
|
Hi all,
i've posted this question before and still no reply.....
when i create a new snap-in project (MMC) , the default menu in the menu bar is "Action, View, Favourties" i want to remove the "Favourites" menu item
i don't know how to do that. i know it is possible, i saw that sql server enterprize manager (which is a snap in object) removed it....so it is possible
can any1 help this time???
thanks in advanced
yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
error C2440: '=' : cannot convert from 'struct cell ** ' to 'struct cell *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Error executing cl.exe.
sortset.obj - 1 error(s), 0 warning(s)
The error appear to be in this line
temproot = (cmp_res < 0) ? &temproot->left : &temproot->right;
Anyone have a clues on how to fix this?
thank you very much ^_^
|
|
|
|
|
mmmm, smells like homework
Try removing the ampersands, assuming that temproot and the left and right nodes are of type "cell *"
For an explaination why, consult someone who can be bothered to explain pointers
--
Ian Darling
If I was any more loopy, I'd be infinite.
|
|
|
|
|
Hello, Can I add my aplication in Internet Explorer Rebar, How??
Visual C++ MFC
|
|
|
|
|
i create a font in the usual way :
first i set the properties (fontname, height, weight, angle, ...) in a LOGFONT struct,
then
myFont.CreateFontIndirect(&logfont);
then
pDC->SelectObject(&myFont);
then i call pDC->GetTextMetrics & pDC->GetTextExtent to to get some useful values
(total height, height of the ascent & descent parts), ... With these values i known exactly the boundaries of the text.
Problem : for a same height specified in the LOGFONT struct, the height values returned by GetTextMetrics vary with the angle of the text.
More precisely : if the angle is precisely 0 or 90 or 180 or 270°, the height is correct : if a draw a rectangle with the width & height computed from these values, it will perfectly fit around the text.
For any other values of the angle, the height is about 10 % too big.
|
|
|
|
|
how do you allocate memory in C? (not C++)
"new" is not supported in C.
|
|
|
|
|
Hi,
try malloc(), realloc() and free()
Greetings,
hph
|
|
|
|
|
In ansi C you allocate memory with
malloc();
and after usage you free the allocated memory with
free();
|
|
|
|
|
erm ...
look at malloc and free ( and associated function, calloc, realloc, ... )
Maximilien Lincourt
"Never underestimate the bandwidth of a station wagon filled with backup tapes." ("Computer Networks" by Andrew S Tannenbaum )
|
|
|
|
|
loud and clear. doing it as we speak.
|
|
|
|
|
For example:
..... // Create 2 threads and save their handles to hThread1, hThread2
rgHandles[0] = hThread1;
rgHandles[1] = hThread2;
while (TRUE)
{
dwIndex = ::WaitForMultipleObjects(2, rgHandles, FALSE, INFINITE);
dwIndex -= WAIT_OBJECT_0;
...... // farther process at here
}
When the thread1 is terminated, the state of thread1 is set to signaled,
then WaitForMultipleObjects() returns the index 0 of the array.
But when the thread2 is terminated, the WaitForMultipleObjects() still returns
the index 0 not index 1.
I want WaitForMultipleObjects() to return the correct index, so I can process for this terminated thread.
who can help me?
Thanks a lot
|
|
|
|
|
Jin Yao wrote:
But when the thread2 is terminated, the WaitForMultipleObjects() still returns
the index 0 not index 1.
Are you sure that thread1 hasn't also terminated at the same time as thread2 ?
|
|
|
|
|
At the first time, thread1 terminates and WaitForMultipleObjects() returns the WAIT_OBJECT_0 + 0. The state of thread1 object is set to signaled.
When the thread2 ends, the thread2 object will also be set to signaled.
but at that time, the state of thread1 object is already signaled. So WaitForMultipleObjects() still returns the WAIT_OBJECT_0 + 0 not WAIT_OBJECT_0 + 1.
I wish WaitForMultipleObjects() can return the WAIT_OBJECT_0 + 1 when
thread2 ends.
Thanks
|
|
|
|
|
when a thread in the handle array becomes signalled and the wait satisfied,
handle the case and then remove that handle from the array (dec. the count,
shift over remaining handles as required..) That handle will remain valid
and signalled until you call CloseHandle on it, so you must remove it from
the wait.
|
|
|
|
|
Hi,
I'm new to all this Home Automation stuff, I would like to know if there are some libraries available ( in C++ or C#) for receiving and sending signals through this protocols ( or any wireless), or which vendors of components give some ActiveX or Dll's stuff to programmatically handle their controls.
Thanks in advance, Greetings
Braulio
|
|
|
|
|
Is there an easy way to format "1000000" so it would appear as "1,000,000"?
I know that the ',' depends on the locale so there should be a way...
Thanks
|
|
|
|
|
|
|
I have a Combo Box als Drop List from 1 to ...10 and a Control edit field.
I want to insert for each combo Box List a Number from Control Edit; just like to save Elements in Array.
For example: for 1 -----> 20.2
for 2------->7.7
for 3---->2.0
...
but if i return to 1 Index my element ist stored as 20.2 ans so ...
How can i do that??
Best Reguards!
|
|
|
|
|
Huh?
Can you rephrase what you are trying to do?
Who is 'General Failure'? And why is he reading my harddisk?!?
|
|
|
|
|
i have a Combo box listed from 1 to 10, and if i insert a number in Edit control it will be refered to combo box index.
just like array a1-->3.5
a2-->7.5
...
a10-->32.5
a1...a10 index of Combo box
Edit control field changed.
Thanks
|
|
|
|
|
So, you mean your combobox opens initially with a list box containing numbers 1..10.
The user can then change (using the Edit field) e.g. the 1 into a 0.5, the 2 into a 1, the 3 into a 1.5 etc.
Is that what you want?
If yes, you probably need to implement a map from combobox-indices to the (number-)strings to display.
You then need to InsertString() the (number-)strings into the relevant place of the combobox.
But I must admit that I never did this myself. So my help may be limited
Who is 'General Failure'? And why is he reading my harddisk?!?
|
|
|
|
|
Hi friends!
I need to use a dll whose VC++ project I don´t have. Because the names of the dll are "mangled" I should use the library in the "__declspec(dllimport) ..." way. But I don´t have the .lib file needed for it, how can i create this file from my .dll file?
I´ve been looking the "lib" command reference in msdn, but the exectution of this tool gives me nothing: no errors, no warnings, no output files.
Does anybody know another tool, or the correct parameters for the "lib" tool?
Thanks in advance.
"When I look into your eyes, there´s nothing there to see, nothing but my own mistakes staring back at me"
|
|
|
|
|
If you don't have the lib file, you can always use the LoadLibrary() and GetProcAddress() functions.
Roger Stewart
"I Owe, I Owe, it's off to work I go..."
|
|
|
|