|
To get the high nibble, you shift the value four bits to the right.
To get the low nibble, you mask out the lower four bits.
hi = myByte >> 4;<br />
lo = myByte & 15;
---
b { font-weight: normal; }
|
|
|
|
|
Dear All,
How can I marshall the following attributes in the following structure;
typedef struct IplImage
{.
.
struct _IplROI * roi;
void * imageid;
}
where _IplROI is itself a structure?
Another question is that the function unmanaged prototype is ;
IplImage * cvvLoadImage(const char * filename);
do I have to marshall the return type after defining the IplImage or I just write "IplImage *" after marshalling the structure??
Please Help,
Thanks and Best Regards,
E.A.
|
|
|
|
|
can anyone kmow how to program my problem about looping and factorial in c programming? please....ill w8 for your reply...
|
|
|
|
|
What is the problem, then?
---
b { font-weight: normal; }
|
|
|
|
|
Non-recursive version (not tested):
-----------------------------------
<br />
int Calc(int i) {<br />
<br />
int fact = 1;<br />
for (int j = i; j > 1; j--)<br />
fact *= j;<br />
<br />
return fact;<br />
}<br />
Recursive version (from MSDN):
------------------------------
<br />
int Calc(int i) { <br />
return((i <= 1) ? 1 : (i * Calc(i-1))); <br />
}<br />
|
|
|
|
|
|
I’ve mad an application (or apart of an app) in C++ that I’d like to use in .NET C# Windows Application.
The thing I like to accomplish is to build some kind of component of my existing C++ app and expose some functions that I later can call from the C# app.
The application I like to encapsulate can be seen ass a window (MFC CWnd in my case).
My fist question is if this is possible? If, then my second Q is How..?
I’ve made som COM and ActiveX programming but I don't (if it's possible) want to solve my problem that way.
I’m not expecting a total solution of my problem but Ideas where to start would be great.
Articles about this would be great. (Have not found any of them myself…)
_____________________________
...and justice for all
APe
|
|
|
|
|
Hello gurus,
As the subject of this topic says, I wish to know how to concatenate 2 nibbles to give 1 byte in C#?
Thanks for the help.
Best regards.
There is no spoon.
|
|
|
|
|
Multiply the most significant nibble by 16 and add them together.
---
b { font-weight: normal; }
|
|
|
|
|
hi guffa,
a code snippet maybe? thanks
There is no spoon.
|
|
|
|
|
|
ah, just what I needed
Thanks
There is no spoon.
|
|
|
|
|
Use the following code :
byte nib1,nib2,finalByte;
finalByte = (nib1 << 4) | (nib2 & 0x0f);
-Atul, Sky Software http://www.ssware.com
Shell MegaPack For ActiveX & .Net - Windows Explorer Like Shell UI Controls
|
|
|
|
|
Thanks!
There is no spoon.
|
|
|
|
|
When I dispose Control calling Control.Dispose() method, deactivate window and then re-activate window, I get ObjectDisposedException .
Does anybody know how to avoid Windows.Forms creating handle of a disposed control?
|
|
|
|
|
If I'm reading this right. You have a form with a control, and then in your code you dispose of the control? So when you try to activate the window it throws the exception about the disposed object? That's because your form thinks it still exists when you go to re-activate the window. Before you dispose the object, you should remove it from the form with form.controls.remove(yourControl). Then you can dispose of the object all you want.
|
|
|
|
|
When I use Controls.Remove(Control), the form start to working weird. It seems to be inactive (light blue) and blinking when clicked, but still keeping inactive.
I also tried to use SuspendLayout() and ResumeLayout() methods. Nothing changed.
And when all things worked (I had to remove more controls), Windows.Forms already tried to access correctly REMOVED and DISPOSED object calling its CreateHandle() method.
The last thing I've done was to change design of my app. I have no more time to solve these bugs, maybe later.
Thanks for answer!
|
|
|
|
|
Hi Every Body
I want to use Visual Studio.Net Code Editor in my Winform Application to make a script editor. Is it possible to use Visual Studio.Net Code editor.
I need text highlighting and auto expression completion in my script editor.
Thank you for your help.
|
|
|
|
|
|
I would like to develop a Clock Application. It should not depend upon the System clock. That is when the System time changes the clock tmie should not change. The clock should run independantly. Please give me the code or Logic. Thanking You
Suseel Kumar P
-- modified at 3:44 Saturday 3rd September, 2005
|
|
|
|
|
You can use System time as well. Only difference between system and your time could be a shift.
Look at the DateTime structure at MSDN or somewhere else. Your can set your clock to any time you want, then compute a shift between your time and system time. Everywhen you want to update your time, just compute: system time + difference. It's not extremely accurate (in the mean of milliseconds), but it may be enough for your application.
|
|
|
|
|
having the typeof(something), can I create a new (default constructed) instance from that?
Pandoras Gift #44: Hope. The one that keeps you on suffering. aber.. "Wie gesagt, der Scheiss is' Therapie" boost your code || Fold With Us! || sighist | doxygen
|
|
|
|
|
Yes, see the Activator.CreateInstance method.
-Atul, Sky Software http://www.ssware.com
Shell MegaPack For ActiveX & .Net - Windows Explorer Like Shell UI Controls
|
|
|
|
|
Yes, use the Activator.CreateInstance method.
-Atul, Sky Software http://www.ssware.com
Shell MegaPack For ActiveX & .Net - Windows Explorer Like Shell UI Controls
|
|
|
|
|