User Profile
Collapse
-
If you truly want to draw to the tab page itself, you need to create your own version of the tab by deriving a new class from it. From there you can override the OnPaint method that belongs to the tab. This will ensure that anything drawn will be inside the client area of the control, and not spill off the side of the tab onto the form. -
I've tried this many times but failed. Look into DirectSound. However, Microsoft doesn't support managed (C#) DirectX any more so you'd have to download an older DirectX SDK to use it. Microsoft replaced it with XNA, and more precisely, the Xact API. If you download and install the XNA framework, you can add reference to 'Microsoft.Xna. Framework.Xact' in your project to access the libraries. This is done through Project -> Add Reference, XNA will...Leave a comment:
-
The ShowDialog routine will return a DialogResult enumerated value. For cancel it will be DialogResult.Ca ncel. If you have implemented this box yourself (C# doesn't support the standard 'input' box, you have to make one yourself) then on inside your cencel button click event you need to put:
Code:this.DialogResult = DialogResult.Cancel; this.Close();
Leave a comment:
-
You have to put a closing brace '}' at the end of the function.Last edited by Niheel; Feb 27 '11, 02:38 AM. Reason: Please stick to the question asked. You can always report bad questions.Leave a comment:
-
-
Looks like CSV to me. Its not a language, just a way of storing data.Leave a comment:
-
Jason Mortmer replied to why #if defined(SOLARIS) is not detecting solaris operating system in my source ?in CWhats your problem? __sun works fine, you already fixed it? If you are that desparate to use SOLARIS, do #define SOLARIS __sunLeave a comment:
-
Like I said, Mem2 and Mem both point to the same block of memory. If you call delete on any of those, and ANY time, the memory will be freed. Doesn't matter if you make another pointer point to the same memory within a function, it's just so you have reference to an object inside the function rather than passing all of the memory to the function, you just pass the address of the allocated memory.
The following program is perfectly fine,...Leave a comment:
-
Right, I would call them classes instead of modules. Module is an old VB term.
And this all depends on where you want the indentation to appear. Then searching for this instance and placing a '\t' character after it. If you wanted to indent the line after the user has entered a '{' for example, you would need to send the string of text to this class, the class will detect if the user has entered a '{' followed by a new line, then insert...Leave a comment:
-
-
You have the wrong idea about how memory is manipulated in C/C++. First of all, in your program, you have no HEAP variables, so this information is useless in your program.
When you 'free' memory, a very low level operating system command is called. It tells the OS's memory management unit that the memory block that you freed can be used again. The pointers in your program are simply references, they have no physical tie-ins with the...Leave a comment:
-
DELETE pointers in the same scope/class in which they were created with the NEW keyword. You are already passing a pointer to the function and simply copying the reference. You need to free the pointer OUTSIDE the function:
Code:// The pointer. int *MyPointer = NULL; // Create a NEW int in memory. MyPointer = new int; // Pass the pointer to the function. myFunction(MyPointer);
Leave a comment:
-
Think of it this way, one thread per stream of data. There's no point having another thread running if you are going to handle two different interrupts. If you do that, you might aswell put it all in the single program thread.Leave a comment:
-
Any form of hardware interfacing will benefit greatly from multi-threading. This is because any data received from the hardware is not instant like normal calculations in a program. When hardware returns data to a PC, it uses Interrupt Request Lines (IRQs) which the device driver handles when they are triggered. Checking for hardware interrupts can be performed on another thread and this is my preferred way of doing it. It breaks up the program into...Leave a comment:
-
Maybe you should read more closely into the compiler output. 'Events' does not exist, it is NOT a function. I'm not sure what you are trying to do but this is a common generic error, the function simply doesn't exist in the context at which you are trying to use it in.Leave a comment:
-
If it's file stream you are using, you can only read and write, that's how streams work. In order to delete some data from the file, you need to load the entire file into memory, ie. into a byte[] array. Then search for the data in that array, use 'removeat' method to remove the data from the array. Then write the entire amount of memory back to file.Leave a comment:
-
Dont use Sockets directly, use TcpClient and TcpListener for TCP. You can run the receive on a separate thread, theres no issue will running that thread and sending data elsewhere in the program.Leave a comment:
-
The official Ribbon SDK is made for CLR IIRC but you can use InteropServices to import the DLL functions. Having said that, seeing as it's a managed DLL, you can simple add reference to Ribbon.DLL. I know I tried it once.Leave a comment:
-
There is actually no need for the export.def file but it requires you to add a few more preprocessor directives that allow the DLL to be imported into another assembly.
Yes, every function has to have the DLLImport attribute attatched to it, this is the nature of attributes in C#.
My DLL compiled with the default cdecl calling convention and thats why i had to specify that in the dllimport attribute. The default attribute...Leave a comment:
-
You are getting that error because you are declaring the prototype OUTSIDE the namespace. C# works in a different way to C/C++, everything needs to be within a namespace in order for the compiler to know where to put the function, and what it has access to.
My working example:
(Inside Visual Studio 2010: Empty Windows DLL Project)
TestDLL.cpp
Code:#include <stdio.h> // Exported DLL function.
Leave a comment:
No activity results to display
Show More
Leave a comment: