|
Sorry. When you look in explorer at the .exe file you only see the default icon... it looks like an icon for a console app. I want to use the icon I used in the winform. My problem is, after installing the app the default icon (the console one) shows up in the start menu. I just need to change that icon in the project. In C# I can change this in the project properties pages under General|Application Icon. Sorry about not being more clear. I'm more of a C# person or I sould say, that I have only written console apps in C++ and not really any WinForm apps. Thanks for the help.
|
|
|
|
|
No problem. In order to replace the default icon with another:
- Locate and delete the project's app.ico file
- Copy your desired icon file to the same folder
- Rename your icon file to app.ico
- Build the project and you will see your desired icon as in Explorer.
Cheers,
Tom Archer
Never be afraid to try something new. Remember that a lone amateur built the Ark. A large group of professionals built the Titanic.
* Inside C# -Second Edition
* Visual C++.NET Bible
* Extending MFC Applications with the .NET Framework
|
|
|
|
|
Great thanks for the help. Out of all the C++ books I have I could not find that anwser.
|
|
|
|
|
You're very welcome. I think the reason you don't see this covered is that it doesn't fit neatly into most any chapter. However, I'm thinking that if I revise the VC++.NET Bible that I'll add it to Chapter 1 as that's kind of a "Introductory, Let's write your first app" type of chapter.
Cheers,
Tom Archer
Never be afraid to try something new. Remember that a lone amateur built the Ark. A large group of professionals built the Titanic.
* Inside C# -Second Edition
* Visual C++.NET Bible
* Extending MFC Applications with the .NET Framework
|
|
|
|
|
I have following code:
DataTable __gc *dt = xyz(); // xyz returns a pointer to a DataTable obj
DataRow __gc *dr = dt->NewRow();
dr->Item [S"txtCode"] = S"Test";
int nValue = 171; // OK
dr->Item [S"intValue"] = nValue; // GENERATES ERROR DURING COMPILATION
I have following error from the compiler:
ZWS.cpp(317) : error C2664: 'void System::Data::DataRow::set_Item(int,System::Object __gc *)' : cannot convert parameter 2 from 'int' to 'int'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
I tried with DOUBLE values and similar problems occurr. Am I missing something here.. Why cast 'int' to 'int'?
I cuoldn't put DataRow working for types diferent from String.
I couldn't find help on WEB.
Alexandre R Oliveira
a.r.o.f@uol.com.br
|
|
|
|
|
|
I have a problem and don't know what to do.
I've written some unmanaged code and made managed wrappers for classes. Project loads in VS 2003 on my computer (first it was created by VS .NET), but on other computers VS doesn't open it. So I created new project and inserted all code there. It compiled ok, but new assembly doesn't load
with error message "procedure imported by some.dll could not be loaded".
Do someone had same troubles and how to fix this?
Thanks
|
|
|
|
|
I need some suggestions on starting an MDI project using managed C++. Note that there will be at least three different document types(and different menus.)
thanks
|
|
|
|
|
Use MFC. You may check possibility of having managed Form/UserControl hosting MFC MDI app.
Just possibility.
"...Ability to type is not enough to become a Programmer. Unless you type in VB. But then again you have to type really fast..."
Me
|
|
|
|
|
R U in Vegas?
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
|
|
|
|
|
|
|
Didnt know about it. Thanks. I will check it out
|
|
|
|
|
All,
I am converting a server TCP based software from C++ to Managed C++ and .NET. I want to use C++ as less as possible and use mainly __gc classes and data. I have some problems though. The server communicates with commands encapsulated in structs. For example:
struct SomeStruct
{
int i;
int j;
long int p;
};
So my question is how to convert the managed char array which I receive from the Socket or NetworkStream class to this struct. I want to declare my struct as managed -- __gc struct.
So if we summarize I need to cast managed char array to managed struct or at least copy the contents of the char array to a newly allocated managed struct.
In straight C++ this was pretty easy - we use cast and treat the char buffer like a struct or we use memcpy and copy the contents of the char array to the struct. However I did not found any way to do this fast in managed C.
Can anyone help me with this?
Nick
Visuall
|
|
|
|
|
Does anyone know how to get a pointer to a managed class in the Document (MFC architecture).
The whole project is in C++ except the class to which I want to get a pointer.
Everything compile fine but when I do a #include "MyManagedClass.h" in the Document it doesn't work.
Thanks
ad
|
|
|
|
|
I know that I have Data in the clipboard with the DataFormat::MetafilePict.
But I can't get it. My code is more or less the next:
/////////////////////////////////////////////////////////////
if ( iData->GetDataPresent( DataFormats::MetafilePict) )
{
System::Object * obj;
System::Drawing::Imaging::Metafile * pMetafile;
obj = Clipboard::GetDataObject()>GetData(System::Windows::Forms::DataFormats::MetafilePict ); pMetafile = dynamic_cast< System::Drawing::Imaging::Metafile * > (obj);
}
/////////////////////////////////////////////////////////
Obviusly in the Debug, I enter inside the first if condition, so the code executes but the System::Object obj can't keep the data of clipboard and keeps a undefined value after the asignation.
It seems a contradiction, isn't it ?
Can anybody say me anything about get MetafilePict Data from Clipboard ?
Advanced Thanks, everybody.;)
|
|
|
|
|
I'm building a DLL with Visual C++ .NET that needs to be portable back to Win98. However, the DLL simply fails to load (using depends.exe) even when all required (MSVC 7.1) DLLs are provided in the search path.
Win98 will successfully load a barebones DLL if we disable Managed Extensions, but the full project does not link without Managed Extensions due to nafxcw/msvcrt conflicts.
Is it even possible to run Managed Extensions code on Win98 given the appropriate DLLs? And/or does anyone have any pointers to solving link errors (see below) when Managed Extensions are removed?
Thanks...
-----------
nafxcw.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) already defined in MSVCRT.lib(MSVCR71.dll)
nafxcw.lib(afxmem.obj) : error LNK2005: "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z) already defined in MSVCRT.lib(MSVCR71.dll)
nafxcw.lib(afxmem.obj) : warning LNK4006: "void __cdecl operator delete(void *)" (??3@YAXPAX@Z) already defined in MSVCRT.lib(MSVCR71.dll); second definition ignored
nafxcw.lib(afxmem.obj) : warning LNK4006: "void __cdecl operator delete[](void *)" (??_V@YAXPAX@Z) already defined in MSVCRT.lib(MSVCR71.dll); second definition ignored
nafxcw.lib(apphelp.obj) : error LNK2001: unresolved external symbol __mbctype
nafxcw.lib(filelist.obj) : error LNK2019: unresolved external symbol __mbctype referenced in function "void __stdcall _AfxAbbreviateName(char *,int,int)" (?_AfxAbbreviateName@@YGXPADHH@Z)
nafxcw.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argv
nafxcw.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argc
|
|
|
|
|
Defining _AFXDLL seems to have helped. Not quite sure why.
|
|
|
|
|
Is it considered part of the OS? Or is it treated on par with someting like the Java JIT compiler?
|
|
|
|
|
LasVegasGuy wrote:
Is it considered part of the OS
Not yet. It will be integrated into the os when longhorn arrives though...
LasVegasGuy wrote:
Or is it treated on par with someting like the Java JIT compiler?
Yes.
John
|
|
|
|
|
Would that mean it would encompass the full full depth and breadth of the Windows API?
|
|
|
|
|
No. Two different ani-mules.
HTH.
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
|
|
|
|
|
|
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.
|
|
|
|