| View previous topic :: View next topic |
| Author |
Message |
nwongfeiying Grandmaster Cheater
Reputation: 2
Joined: 25 Jun 2007 Posts: 695
|
Posted: Thu Dec 18, 2008 5:21 pm Post subject: [C++] Managed and Native Data Types |
|
|
| How do I convert native data types to managed and vice-versa. The most important one for me is the string (native data type) and the String^ (managed data type).
|
|
| Back to top |
|
 |
Noz3001 I'm a spammer
Reputation: 26
Joined: 29 May 2006 Posts: 6220 Location: /dev/null
|
Posted: Thu Dec 18, 2008 5:48 pm Post subject: |
|
|
| How do you mean? They are pretty much the same.
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Thu Dec 18, 2008 7:52 pm Post subject: |
|
|
I can already see where this is goin
Don't use managed C++
|
|
| Back to top |
|
 |
nwongfeiying Grandmaster Cheater
Reputation: 2
Joined: 25 Jun 2007 Posts: 695
|
Posted: Tue Dec 23, 2008 12:03 pm Post subject: |
|
|
| slovach wrote: | I can already see where this is goin
Don't use managed C++ |
It's hard to design programs without managed code I'm trying to use native functions by converting managed input into native data because native functions only accept native data types.
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Tue Dec 23, 2008 2:00 pm Post subject: |
|
|
| Use C#, managed C++ has no support any more.
|
|
| Back to top |
|
 |
TraxMate Master Cheater
Reputation: 0
Joined: 01 Mar 2008 Posts: 363
|
Posted: Tue Dec 23, 2008 2:11 pm Post subject: |
|
|
| What's managed C++?
|
|
| Back to top |
|
 |
tombana Master Cheater
Reputation: 2
Joined: 14 Jun 2007 Posts: 456 Location: The Netherlands
|
Posted: Tue Dec 23, 2008 4:54 pm Post subject: |
|
|
| TraxMate wrote: | | What's managed C++? |
C++ with the .NET Framework.
|
|
| Back to top |
|
 |
nwongfeiying Grandmaster Cheater
Reputation: 2
Joined: 25 Jun 2007 Posts: 695
|
Posted: Wed Dec 24, 2008 7:02 am Post subject: |
|
|
| slovach wrote: | | Use C#, managed C++ has no support any more. |
Can I use FindWindow in C#? If you want to get an idea of what I'm trying to do, I'm trying to get input from a textbox and convert it into something FindWindow and other functions accept.
|
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Wed Dec 24, 2008 7:13 am Post subject: |
|
|
| nwongfeiying wrote: | | slovach wrote: | | Use C#, managed C++ has no support any more. |
Can I use FindWindow in C#? If you want to get an idea of what I'm trying to do, I'm trying to get input from a textbox and convert it into something FindWindow and other functions accept. |
Import it from user32.dll.
http://pinvoke.net/default.aspx/user32/FindWindow.html
| Code: | [DllImport("user32.dll", SetLastError = true)]
static extern IntPtr FindWindow(string lpClassName, string lpWindowName); |
_________________
|
|
| Back to top |
|
 |
nwongfeiying Grandmaster Cheater
Reputation: 2
Joined: 25 Jun 2007 Posts: 695
|
Posted: Wed Dec 24, 2008 1:06 pm Post subject: |
|
|
| I really really really wanted to do it in C++, but I'll see what I can do with C#.
|
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Wed Dec 24, 2008 1:45 pm Post subject: |
|
|
Then do it in C++, but don't use CLR. Stick with Win32 if your going to be using C++.
_________________
|
|
| Back to top |
|
 |
nwongfeiying Grandmaster Cheater
Reputation: 2
Joined: 25 Jun 2007 Posts: 695
|
Posted: Wed Dec 24, 2008 5:30 pm Post subject: |
|
|
| I fear the GUI coding is going to be hell for me. I've tried doing GUI with native and it looks crap compared to managed.
|
|
| Back to top |
|
 |
Noz3001 I'm a spammer
Reputation: 26
Joined: 29 May 2006 Posts: 6220 Location: /dev/null
|
Posted: Wed Dec 24, 2008 5:54 pm Post subject: |
|
|
| nwongfeiying wrote: | | I fear the GUI coding is going to be hell for me. I've tried doing GUI with native and it looks crap compared to managed. |
Lookup manifests
|
|
| Back to top |
|
 |
ElJEffro Grandmaster Cheater Supreme
Reputation: 0
Joined: 15 Apr 2007 Posts: 1881 Location: La Tierra
|
Posted: Wed Dec 24, 2008 6:14 pm Post subject: |
|
|
| If you insist on C++ and want an easy-make GUI you can use CodeGear C++ builder or QTDesigner
|
|
| Back to top |
|
 |
nwongfeiying Grandmaster Cheater
Reputation: 2
Joined: 25 Jun 2007 Posts: 695
|
Posted: Wed Dec 24, 2008 7:51 pm Post subject: |
|
|
| I'll try finding out what manifest is because I like Microsoft Visual Studio and I don't want another IDE on my laptop.
|
|
| Back to top |
|
 |
|