|
Hi
I have a C# application which makes use of an unmanaged C++ DLL.
Some of the DLL calls return pointers to dynamically allocated memory.
My question is this : can I release that memory with C# (and how) or do I have to release it in the context of the DLL - that is, call C++'s delete on the pointer) ?
I'd appreciate any kind of help with this.
thanks,
p.
|
|
|
|
|
Hello,
Do you know how to set invisible column.
For example, There is a list view class, this has the following 4 columns.
user, password, class, data
And, I made other column, named check. I would like to hide this.
If you have some ideas, please tell me.
cheers,
yu-yu
|
|
|
|
|
You can set the width of the column to 0. But be aware that if you allow the user to change the width of the columns it's possible to make your 'hidden' column visible.
|
|
|
|
|
Another approach: Keep that "column" out of the listbox/listview.
a) Data Collection with 5 columns
b) VISIBLE list with 4 columns
c) If changes occur in the visible list (events), update the data collection accordingly. If you need data from the 5th column, retrieve it directly from your "in-memory"-data-collection.
Cheerio
|
|
|
|
|
Hello,
Thank you for your advice.
Now, I will try them.
cheers,
yu-yu
|
|
|
|
|
I have to use the SetupDiGetDeviceRegistryProperty API, some of its parameters are pointers,such as void*,int* and byte*.but C# compiler said that void* is pointer may only be used in an unsafe context.
what should I do?
|
|
|
|
|
If an image is inserted in the RichTextBox at runtime, how to drag/move it inside the RichTextBox with the help of mouse, just like we can move any control on the form during design time.
Please guide
|
|
|
|
|
I am trying to develope a small RTF writer to generate project report at runtime, with a limited RTF writing capability. RTF by default is only one page document, untill we intentionally put page breaks in it, on the other hand Project report consists of number of pages.
Thus, what should the criteria to decide page break insertion? How to keep track of page's empty area before inserting anything? Is there any way to identify exactly how many characters I can print before I run out of room in the current page.
RTF specification 1.6 to 1.8 doesn't give any example regarding this issue.
Please guide.
|
|
|
|
|
Hi all,
I have a .h file that includes simple constant declarations.
I need those constants in a C# project, so I figured I can wrap those in a C++ .NET project and reference to it.
The problem is I can't do the simplest things.
Here is a sample:
public __gc class SmDefines
{
public String* getObjData() {return NFMDEFS_XML_VAL_DATA_OBJ;}
...
}
I tried everything: String, String*, but I alwyas get the error:
C2144: Syntax error: 'System::String' should be preceded with ':'
Does anybody know what is the matter? or if there's another way to do what I wanted.
Thanks!
|
|
|
|
|
Has anybody tried implementing GLOBAL cbt hooks in c#?
I keep getting a .net framework runtime error as soon as the hook is activated...however it works fine LOCALY...
I just keep getting the command prompt screen with a "Runtime" error message i hate it!
|
|
|
|
|
I just want to design a web control.
My object is,In the top of my control there is a ‘+’ sign with a title [ + Title Name].When the user click on the ‘+’ sign there is a drop down menu with a image box and the ‘+’ sign change to the ‘ – ‘.when the user click on ‘-‘ the image frame should go to up side and hide.
|
|
|
|
|
hi i don't know any thing to help you except the control name and you can search it is name is nodeList or Node
|
|
|
|
|
Hi,
How do I check whether the user has M$ Word installed, and how do I check which version of Word that the user has installed?
thanks
|
|
|
|
|
What I do is call Registry.LocalMachine.OpenSubKey to read the registry at:
"Software\Microsoft\Windows\CurrentVersion\App Paths\Winword.exe" and use regKey.GetValue to get the value of the key "Path"
If it returns null then word is not installed.
Otherwise it gives you the path to winword.exe and then you can call FileVersionInfo.GetVersionInfo to get the version number.
|
|
|
|
|
How do i plot 2D LineGraph using GDI+ on Windows Form?
Chris
|
|
|
|
|
You could search CodeProject for controls made by others. Some of those look really cool.
If you want to make it yourself:
Override the OnPaint method in your Control or Form class, get the Graphics object from the event arguments and play around with the DrawLine method.
|
|
|
|
|
how do i change just the selected date in dateTimePicker to a different color based on a certain condition?
Chris
|
|
|
|
|
Hi all,
I read some books that manipulating the window form components using a thread other than a main thread can cause bugs that are not repeatable. Is there any example code of how to get around this ?
And next, the documentation in MSDN often have the following statement. Its confusing for me. So when is a member public static and when is it an instance member?
Thread Safety
Any public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Any instance members are not guaranteed to be thread safe
|
|
|
|
|
You can use the Invoke method of the Control class to safely call a piece of code that does a UI task.
There's a lot of other things to learn about thread safety. Have fun
|
|
|
|
|
A member is public static when it is declared public static and therefor can be accessed without an instance of the class. An instance member on the other side can only be accessed by using an object of the class. A short example:
public class Test
{
public static int StaticMember;
public int InstanceMember;
}
Test.StaticMember = 5;
Test obj = new Test;
obj.InstanceMember = 5;
www.troschuetz.de
|
|
|
|
|
As title
If yes, when is the data type in mfc dll?
Thanks
|
|
|
|
|
I'm trying to find a subclasses Textbox with transparent background or a replacement for the textbox that supports transparent bg. I don't know win api well enough so I'm looking for some clean code.
I've searched and keep running into an article on CP on AlphaBlendTextBox. BUT, that article is P.O.S. I've tried using it and it doesn't work properly. The author made a hell of a messy implementation. He tried to give the user the ability to set background images for the textbox. I do not want to have a mess implementation that requires a PictureBox docked inside the TextBox control. I just need to have a transparent bg.
|
|
|
|
|
i have documents scaned as bitmaps and they are scaned as legal documents but not all of them are legal is there a way i can read the bottom of the bitmap and see if the last 3 in are white cut off the last 3 in and print on letter papper instead of legal
thanks
chad
|
|
|
|
|
I have a legacy windows application that needs to automated. I have no access to the source code.
I would like to write a seperate (new) C# application to interact with the legacy app.
Basically the legacy app presents graphical data to the user and the user classifies the data. Classifaction is done by clicking one of a couple of buttons.
When the legacy app was written there was, apparently, no widely known/good method to classify this data, though humans (once trained) are able to do it quickly.
I've come up with and algorithm that should make the job easier, as it can classify maybe 70% of all cases automatically. The other 30% still require human intervention, but that's still a big improvement.
The goal then, is to have both apps running, both minimized and out-of-sight _unless_ the algorithm is unable to correctly classify the data (in which case it can just um-minimize the legacy app and make the user deal with it)
Basically, there are a two things I need help getting started with:
1. Getting graphical data from a minimized window 2. Programatically clicking buttons on a minimized window
Could anyone provide pointers to APIs or techniques I might look in to? I'm not asking for a solution (though I'd take them if you've got them ), but more along general pointers.
Thanks
|
|
|
|
|
Poor you. I really hate the way you're going be using automation, but I guess ur kinda stuck. The ultimate solution is to rewrite the program but that obviously is not feasible.
You're going to have to do some stuff with win32 api. Look into MSDN... you need to know how to
- get a handle to a window (this is used to "identify" what you are sending a message to)
- use SendMessage() - this is used to send a message to the windows/control u want to send a message to
- know what messages to send - there are a lot of messages you can play around with
A good tool to use for messing around is Micorosft Spy++. Also, google is your friend. You can search for "programatically click button" and u will find it in a snap.
|
|
|
|