| View previous topic :: View next topic |
| Author |
Message |
nwongfeiying Grandmaster Cheater
Reputation: 2
Joined: 25 Jun 2007 Posts: 695
|
Posted: Thu Jan 01, 2009 11:43 pm Post subject: [C++] Managed and native data types (cont.) |
|
|
I've been trying lurc's and slovach's and everyone's methods to get around the epidemic of managed and data types, but I was wondering if I could do this using a dynamic link library.
The project I'm working on is my alarm clock. I have to start my process in order to close it. Now I want to improve the program by closing a window that the user specified.
The program is mainly .NET except for the closing the window part. How do I read the text from the textbox and use it to specify for the argument in the FindWindow?
|
|
| Back to top |
|
 |
HomerSexual Grandmaster Cheater Supreme
Reputation: 5
Joined: 03 Feb 2007 Posts: 1657
|
Posted: Thu Jan 01, 2009 11:53 pm Post subject: Re: [C++] Managed and native data types (cont.) |
|
|
| nwongfeiying wrote: | I've been trying lurc's and slovach's and everyone's methods to get around the epidemic of managed and data types, but I was wondering if I could do this using a dynamic link library.
The project I'm working on is my alarm clock. I have to start my process in order to close it. Now I want to improve the program by closing a window that the user specified.
The program is mainly .NET except for the closing the window part. How do I read the text from the textbox and use it to specify for the argument in the FindWindow? |
GetDlgItemText? I dont really get the question. Are you using .net to read the textbox or win32. if win32 use GetDlgItemText
_________________
|
|
| Back to top |
|
 |
nwongfeiying Grandmaster Cheater
Reputation: 2
Joined: 25 Jun 2007 Posts: 695
|
Posted: Fri Jan 02, 2009 12:03 am Post subject: |
|
|
| .NET to read the textbox then using the data received from the textbox to use it for the Win32 FindWindow.
|
|
| Back to top |
|
 |
sloppy Expert Cheater
Reputation: 0
Joined: 17 Aug 2008 Posts: 123
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Fri Jan 02, 2009 1:52 am Post subject: |
|
|
| Look at the marshal class for converting to unmanaged types, and stop using managed C++ for the life of christ, and switch to C#.
|
|
| Back to top |
|
 |
nwongfeiying Grandmaster Cheater
Reputation: 2
Joined: 25 Jun 2007 Posts: 695
|
Posted: Fri Jan 02, 2009 9:43 am Post subject: |
|
|
| slovach wrote: | | Look at the marshal class for converting to unmanaged types, and stop using managed C++ for the life of christ, and switch to C#. |
Hey! Managed C++ has feelings too.
|
|
| Back to top |
|
 |
HomerSexual Grandmaster Cheater Supreme
Reputation: 5
Joined: 03 Feb 2007 Posts: 1657
|
Posted: Fri Jan 02, 2009 9:52 am Post subject: |
|
|
| nwongfeiying wrote: | | slovach wrote: | | Look at the marshal class for converting to unmanaged types, and stop using managed C++ for the life of christ, and switch to C#. |
Hey! Managed C++ has feelings too. |
Why not use all win32 then? I dont get why you keep switching back and forth. Make a 100% managed or native function. You could import FindWindow from it's .dll and change the params to managed type?
_________________
|
|
| Back to top |
|
 |
nwongfeiying Grandmaster Cheater
Reputation: 2
Joined: 25 Jun 2007 Posts: 695
|
Posted: Fri Jan 02, 2009 10:18 am Post subject: |
|
|
| I use managed coding simply for the easier to design GUI. Designing GUI in Win32 confuses me and it never looks as good.
|
|
| Back to top |
|
 |
HomerSexual Grandmaster Cheater Supreme
Reputation: 5
Joined: 03 Feb 2007 Posts: 1657
|
Posted: Fri Jan 02, 2009 10:23 am Post subject: |
|
|
| nwongfeiying wrote: | | I use managed coding simply for the easier to design GUI. Designing GUI in Win32 confuses me and it never looks as good. |
You can use ResEdit to create a RC file or direct CreateWindow code.
They look exactly as they do in VC++
http://www.resedit.net/ResEdit-ANSI.zip ANSI Build
http://www.resedit.net/ResEdit-UNICODE.zip UNICODE Build
_________________
|
|
| Back to top |
|
 |
nwongfeiying Grandmaster Cheater
Reputation: 2
Joined: 25 Jun 2007 Posts: 695
|
Posted: Fri Jan 02, 2009 2:13 pm Post subject: |
|
|
| I'll be the judge of that.
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Fri Jan 02, 2009 2:43 pm Post subject: |
|
|
| nwongfeiying wrote: | | I use managed coding simply for the easier to design GUI. Designing GUI in Win32 confuses me and it never looks as good. |
So why are you not using C#? It's superior in every way.
Managed C++ has no support anymore.
|
|
| Back to top |
|
 |
nwongfeiying Grandmaster Cheater
Reputation: 2
Joined: 25 Jun 2007 Posts: 695
|
Posted: Sat Jan 03, 2009 10:49 am Post subject: |
|
|
| slovach wrote: | | nwongfeiying wrote: | | I use managed coding simply for the easier to design GUI. Designing GUI in Win32 confuses me and it never looks as good. |
So why are you not using C#? It's superior in every way.
Managed C++ has no support anymore. |
Fine..you convinced me. I'm going to be using C# for .NET programming from now on
|
|
| Back to top |
|
 |
|