|
Thats what I thought at first. But then, if reading online MSDN documenation about GDI+, on the one hand it seems like a C++ Win32 API interface, on the other hand it is also touted as part of the .Net framework. Also, if you look at the Visual C++ section in the following article,
http://msdn.microsoft.com/vstudio/productinfo/whitepapers/default.aspx#vs%20languages%20playbook_msdnwp%20temp_topic3
it implies that full access to the Win API will be available only through Visual C++.Net.
Man learns from History that he NEVER learns from History
|
|
|
|
|
LasVegasGuy wrote:
But then, if reading online MSDN documenation about GDI+, on the one hand it seems like a C++ Win32 API interface, on the other hand it is also touted as part of the .Net framework.
This is because the .NET Framework BCL has a wrapper for the C++ GDI+ class library.
LasVegasGuy wrote:
it implies that full access to the Win API will be available only through Visual C++.Net.
C# and VB.NET can use the Windows API, but they can only do so through P/Invoke. MC++ can access the Windows API the same way that VC++ does. With Longhorn, all .NET languages will have equal access to the Windows API, because it will be in the form of a managed class library.
|
|
|
|
|
|
Tom Archer wrote:
Justin is correct. Remember also that MS wants people to move to .NET so everything is going to have a .NET spin to it.
Tom,
Does that mean that VC++ will not have the access to the win32API that it now enjoys? If true, will that cause a performance hit that doesn't exist now?
Assuming that is also true, what could PC game developer do to overcome this hit if indeed one will exist?
Best,
Jerry
The only way of discovering the limits of the possible is to venture a little past them into the impossible.--Arthur C. Clark Toasty0.com
|
|
|
|
|
Toasty0 wrote:
Does that mean that VC++ will not have the access to the win32API that it now enjoys?
Even if it can't access the WinAPI any other way, it can certainly do it through COM interop.
|
|
|
|
|
What about legacy code which directly makes API calls?
|
|
|
|
|
It'll still be supported through a compatibility wrapper, but nothing new will be added to it.
|
|
|
|
|
Thanks!!
Hopefully, by then managed C++ will have been standardized and brought in tune with ISO C++.
|
|
|
|
|
|
Hello everybody!
I'm a beginner developer in .Net and I need to know if I can convert Bitmaps to Metafiles in anyway. ( The Save method of the Image Class does´nt work beetwen vectorial images and pixelized images ).
Advanced Thanks!
|
|
|
|
|
Hello everybody!
I'm a beginner developer in .Net and I need to know if I can convert Bitmaps to Metafiles in anyway. ( The Save method of the Image Class does´nt work beetwen vectorial images and pixelized images ).
Advanced Thanks!
|
|
|
|
|
You could, but it takes a lot more than just a simple save. The reason for this is that whereas a bitmap is a map of individual pixels, a metafile is a series of drawing instructions. These drawing instructions can be executed to create a bitmap, but it's very hard to convert a bitmap into drawing instructions.
|
|
|
|
|
Thanks for reply. I think I'm going to try it, surely it´s going to be a hard work, but sure there is a right solution in .NET.
|
|
|
|
|
Hi All
i have defined a __value type class.How can i declare and create it in UnmanagedC++ class using new operator on the C runtime heap?
For example
public __value MyClasss
{
public:
int a;
}
//my unmanaged classs
class MyUnmanagedCPP
{
void SomeMethod()
{
MyClasss *pMyClass = new MyClasss();// here i'm getting error C3828
}
}
|
|
|
|
|
This is explained in depth in my book, Extending MFC Applications with the .NET Framework, but the main issue is that managed objects are dynamically allocated on the CLR heap (not the C++ free store). In your particular situation, you're probably getting C3828 because you're writing an MFC applications and running it in Debug mode where the new operator is being #define'd as a placement new operator. You need to do the following where 1) the new operator is being undefined and 2) __nogc is forcing a GC heap allocation instead of a C++ heap allocation:
void Cdeletethis3Dlg::OnBnClickedOk()
{
#pragma push_macro("new")
#undef new
MyClasss *pMyClass = __nogc new MyClasss();
#pragma pop_macro("new")
}
Cheers,
Tom Archer
* Inside C# -Second Edition
* Visual C++.NET Bible
* Extending MFC Applications with the .NET Framework
|
|
|
|
|
Hi everybody!
I am looking for a parser to read vCalendar and vCard streams.
Any Suggestions?
Thanks for help in advance!
|
|
|
|
|
I am having a trouble of getting image from the hard disk.
|
|
|
|
|
System::Drawing::Image.FromFile (static method)
The graveyards are filled with indispensible men.
|
|
|
|
|
If you are using managed C++ here is an article which may help you...
http://www.thecodeproject.com/managedcpp/mcppwinforms02.asp
|
|
|
|
|
He said under c. I assume that means Win32 API only and this is the wrong forum...
John
|
|
|
|
|
I am having trouble with a Forms application I'm writing. I have 3 forms: a main form, Form1, and two modal dialogs, Forms 2 and 3, that are called from the main form. The two dialogs are intended to change certain "control parameters" that are used by the main form to run a control algorithms. So I need the two dialogs to be able to set certain variables that are used by the rest of hte program. Also, when I open one of hte dialogs, the controls on that from should reflect the current state of those variables. I cannot figure out how to do this.
I thought I could declare global variables that could be accessed by all three forms. That way, when I open a dialog, its controls would be set based on the current values of those globals. Then, when I close the dialog and apply the changes, those changes would be saved back to the global variables. I tried this, and I can't seem to define variables that are accessible to all the dialogs.
Am I going about this all wrong? Can anyone help guide me in the right direction? ANy help would be greatly appreciated.
Andrew Krajnik
|
|
|
|
|
I cant remember if windows forms has the OnInitDialog(), if so override that and for the closing of the dialog you can override OnClose().
when you overwrite onclose make sure you call DestroyWindow() from the parent class.
|
|
|
|
|
Hello All,
I trying to call an unmanged code function from managed code and the unmanaged code function requires a type of WCHAR. How can I convert a __GC String to type of WCHAR so it be passed to the function. If I type out the value, such as const WCHAR *pdn = L"Some value"; It works; however I need the "Some value" to be passed in as a variable. By the way this unmanged code is in unicode, if that helps. Thanks, DC
|
|
|
|
|
|
Thanks,
When I try this I get the following:
cannot convert parameter 1 from 'const wchar_t __pin *volatile ' to 'WCHAR *' Conversion loses qualifiers: Here is the code
Unmanaged Code
UserStatus* WaitForChanges(WCHAR* dn)
{
UserStatus* status = new UserStatus();
MonitorLDAPChanges(pdn);
return status;
}
Managed Code
const __wchar_t __pin * str = PtrToStringChars(dn);
WaitForChanges(str);
|
|
|
|