|
The compiler does not know who calls the function! The only thing he knows is that this is a pointer!
|
|
|
|
|
Using VS-2005, when creating a dialog control using the resource editor and toolbox, all windows are created with a 3-D/sunken type border instead of a basic flat border. No combination of border property settings (StaticEdge, ModalFrame, ClientEdge, Borders) will allow the basic flat border. If I create the controls in code the borders are as advertised so it appears somewhere the VS is overriding my properties. Anyone know where this is done?
Thanks in advance,
Tracy Hanahan
tsh5@psu.edu
|
|
|
|
|
Hi all,
I am writing a namespace extension and have run into a little problem. I havea a context menu handler that gets called with 'open' when the user double clicks on a subfolder of my namespace extension. At the moment I take the PIDL of the subfolder, turn it into a real path and call ShellExecuteEx on it. However, this always opens the subfolder in a new window- I want it to open in the existing window.
Is there a function of IShellFolder I can call to open the desired PIDL? I've tried BindToObject but it doesn't work.
Any help would be much appreciated, this is really holding my work back now...
Thanks in advance,
Dave Kerr
codechamber@hotmail.com
http://www.codechamber.com
|
|
|
|
|
Hi, i have a small problem i hope to get some help with.
I am working with the SerialPort class in .NET 2.0. I want to use the SerialPort's write() method as defined below with the following overloaded arguments.
public:
void Write (
array<unsigned char="">^ buffer,
int offset,
int count
)
The program on the other end of the serialPort is using C code. The serialPort on the other end uses a serial port read function which takes in a unsigned char array.
ie. void read(unsigned int i)
Does anyone have any ideas how i can pass my data through? (ie from a CLR array to a function that takes native arrays). I am stuck as there are no overloaded write methods in SerialPort class which allow me to pass a native array. I can only think of one solution at the moment, and that is deriving my own class inherited from SerialPort and overload the write method to take in a native array, but i have no idea to write a method which will write data to a serial port.
PS. most of my work is already completed in .NET so there is no chance of starting over in unmanaged C++, and the other end cannot be changed to .NET as it is legacy system.
|
|
|
|
|
The SerialPort class does NOT send a managed array. It writes the contents of the array to the port.
flackjack wrote: which takes in a unsigned char array.
flackjack wrote: ie. void read(unsigned int i)
unsigned char is NOT EQUAL to unsigned int
so whatever it actually is, you need the data in your managed array to be of the same byte size so the read() function will work correctly. Once you are clear what the read() signature is you can find documentation on MSDN that shows the managed to unmanaged byte size mapping. Also PInvoke.net[^] might be another source of useful information.
led mike
|
|
|
|
|
sorry that was a typo, it should be
void read (unsigned char c)
now that i think of it, it makes alot of sense now that it does not send the array and only writes the bytes.
can anyone point me to "managed to unmanaged byte size mapping" information?
Regards
|
|
|
|
|
can anyone point me to "managed to unmanaged byte size mapping" information? I've tried looking through MSDN but I'm not completely sure where to find it.
Thanks
|
|
|
|
|
Hi,
I try to send a WM_CLOSE to shut down an application, but the problem is that the program crash if there is o modal dialog opened
I get an assertion inside the DoModal() function!!
Help please..
Thanks
|
|
|
|
|
hatemtaleb wrote: try to send a WM_CLOSE to shut down an application, but the problem is that the program crash if there is o modal dialog opened
Show some code !
|
|
|
|
|
Its not sufficient can you be more specific
|
|
|
|
|
Hi all
Can anyone tell me definition of Smartpointers in simple
by
G. Palani samy
|
|
|
|
|
They are classes that wrap a pointer and delete it when the object goes out of scope. Typically, you pass in the pointer in the constructor of a smart pointer, and the destructor will delete it. There are also some smart pointers that do reference counting and will only delete the pointer once the count has reached 0.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
|
I am working with old Visual C++ 6 and cannot leave it for new version. I am not satisfied by its debugger – it is uncomfortable. For instance, I cannot resize window Quick Watch; and so on.
The question is: is there an extension (as plug-in, maybe) that gives Visual C++ 6 additional debugging abilities?
|
|
|
|
|
KellyLynch wrote: For instance, I cannot resize window Quick Watch; and so on.
Yes you can.
VC6 was the best debugger of its day. VS.Net has a more powerful debugger with some new bells and whistles. What is it you want to do?
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
>Yes you can.
You meant I can resize the Quick Watch window? How?
|
|
|
|
|
KellyLynch wrote: You meant I can resize the Quick Watch window? How?
The same way you resize any other window. It just doesn't have the nifty gripper icon in the corner when its undocked.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
how can i Remove leading spaces and trailing spaces from my database ?
Bravoone
|
|
|
|
|
Bravoone_2006 wrote: Remove leading spaces and trailing
How are you going alongwith the insertion of the data. You can just trim your string or remove the unwanted spaces at the time of insertion of the values in the database. For this you can use functions from the CString classs CString::Replace(), CString::Right(), CString::Left(),CString::Trim(), CString::TrimLeft(),CString::TrimRight() etc.
Bravoone_2006 wrote: my database ?
If the values already persist in your database try asking the same question in the SQL / ADO / ADO.NET forum here on CP where you would be having more chances of getting the answer accurately.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
If you actually need to remove trailing spaces from CString string values got from database, I think you should try the Trim member:
CString s = getFromDatabase();<br />
s.Trim();
(In case of older MFC use TrimRight and then TrimLeft ).
If you actually need to remove spaces in the database using an SQL query, I think this question should be post to appropriate SQL section. The query probably will look like this:
UPDATE MyTable SET myField=LTRIM(RTRIM(myField))
I hope this help.
|
|
|
|
|
I have a membervariable of the type LARGE_INTEGER. This type is a union. I can assign it a value of -100000 (i'm using this for a WaitableTimer's DueTime) via the QuadPart-Member and everything works fine. But if i multiply this value with another variable of type unsigned int with value 5, the LARGE_INTEGER contains some crazy value, and the timer is non-stop signaled. Any ideas how to get him to do the multiplication correctly ?
|
|
|
|
|
Just need to cast the unsigned int to int, then it works fine.
|
|
|
|
|
Hi all,
I am writing a COM server program. In that I created a interface "MyIDL". Here is the source.,
import "Unknwn.idl";
//My Interface
[
object,
uuid(E0985393-CD6E-4a1f-8737-C250238FC8FC),
helpstring("My Interface"),
pointer_default(unique)
]
interface IX : IUnknown
{
HRESULT Function([out]char *str)=0;
};
When I compile I am getting these errors.
1] error MIDL2311 : statements outside library block are illegal in mktyplib compatability mode : [ Interface 'IX' ]
2] error MIDL2096 : duplicated attribute : [helpstring] [ Interface 'IX' ]
3] error MIDL2096 : duplicated attribute : [uuid] [ Interface 'IX' ]
How can resolve this? I know these questions might be silly. But please anybody help me. So that I could learn COM Components.
|
|
|
|
|
COM[^] forum is appropriate for such questions.
Sakthiu wrote: When I compile I am getting these errors.
1] error MIDL2311 : statements outside library block are illegal in mktyplib compatability mode : [ Interface 'IX' ]
2] error MIDL2096 : duplicated attribute : [helpstring] [ Interface 'IX' ]
3] error MIDL2096 : duplicated attribute : [uuid] [ Interface 'IX' ]
It seems that you have used /mktyplib203 options. Which is obsolete now. Try compiling, without this option using MIDL compiler.
See this[^] link for more information.
|
|
|
|
|
hi der..
my project uses a keybord hook to handle the multimedia keys on the keyboard.but the system becomes stuck on pressing those keys..the program works fine for all the other keys..me tried WH_JOURNALRECORD and WH_KEYBOARD hooks..for the multimedia keys the hook procedure not even getting the message..
the system hanging in a peculiar way..mouse movement is ther but cant click buttons..for the keybord only window is working..plz help me..
thanks in advance
joe
|
|
|
|