|
How on earth do you call them? I've tried all sorts of methods, the latest being
MessageBox::Show("Text", "More text");
from a tutorial on the site but I just get compiler errors like
MessageBoxA is not a class or namespace name
or MessageBox is not a part of System::Windows::Forms (when intellisense tells you it is).
The onlt way to do it so far it via
#prgama unmanaged
void CallMsgBox()
{
MessageBox(NULL, "Old style msg box", "Caption", MB_OK);
}
#pragma managed
So how do you call it???
Thanks
Obseve everything, remember more...
|
|
|
|
|
Its silly really MessageBox::Show(S"Text", S"More text");
You need to prepend mamanged strings with a S.
leppie::AllocCPArticle("Zee blog"); Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.
|
|
|
|
|
leppie,
I think his problem is not with strings. Instead it is that the preprocessor sees that MessageBox is defined as either MessageBoxA or MessageBoxU depending on build enviroment.
The solution should be something like:
...
#undef MessageBox
MessageBox::Show(S"Some text",S"Some text 2");
...
Or maybe I am just on crack or something...
Feel free to flame me...
-Nathan
---------------------------
Hmmm... what's a signature?
|
|
|
|
|
Had the same problem and found the solution in one of Microsoft's articles.
At the beginning of the.cpp file, after the includes, I put the following:
#ifdef MessageBox
#undef MessageBox
#endif
The problem seems to be caused by a confliction in MessageBox declarations between the .Net declaration and the one in the windows.h file.
Cheers
|
|
|
|
|
Hi. Is everybody know how resolve NetBIOS name for some IP ?
PS Don't tell me about gethostbyaddr() . Need resolve NetBIOS rather than DNS.
Thanks
---Ranger---
|
|
|
|
|
Hi,
I'm trying to take an old COM component that I have source code to, and convert it to pure ManagedC++.
It makes use of Direct API calls, and I can get the core of it working.
I'm trying to understand the article written by Nish (Implementing Callback functions using IJW (avoiding DllImport))http://www.codeproject.com/managedcpp/cbwijw.asp[^], but I can't seem to adapt the code correctly.
I'm using the RAS api, and as soon as I integrate Nish's code, I get exceptions that new and delete cannot be used.
Is there an article or site somewhere that covers creation of namespace extensions (if this is infact the correct term).
Any help/pointers would be greatly appreciated.
|
|
|
|
|
Hello,
I'm porting an ActiveX control into a .Net UserControl using Managed C++. What is the equivalent of ActiveX property pages in .Net? If you can give me links to articles or samples that might help me.
Thank you in advance
Daed
|
|
|
|
|
Look at the PropertyGrid class And just assign any (not just activx) object to it with ->SelectedObject.
leppie::AllocCPArticle("Zee blog"); Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.
|
|
|
|
|
I need more than a simple PropertyGrid, I need to call a dialog and inside this dialog i want to add controls that do specific functions on the properties. This was very easy in ActiveX controls and i am not sure how possible is this now in MC++!!
|
|
|
|
|
Hello,
I'm porting an ActiveX control into a .net UserControl using MC++. In order to support persistency with MFC based ActiveX controls there was the DoPropExchange function: is there some similar function in MC++ UserControls?
I noticed that the persistency of UserControls properties seems to be embedded inside the .NET framework: if I declare a property of class Bitmap, its contents will be automatically saved inside the .resx file: if I should store a binary based property (for example the contents of a WAV file), what should I do? Any example?
Regards
Severino
|
|
|
|
|
|
Hello:
This article tells how to persist data to a file but is there another way to persist the data using the .NET environment itself like what the MFC DoPropExchange function do (internally and not to a dedicated created file) ???
|
|
|
|
|
Apply the DesignerSerializationVisibility attribute to the Properties you need to "persist" the settings from design time to runtime.
leppie::AllocCPArticle("Zee blog"); Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.
|
|
|
|
|
During the time i compile my VC6.0 project in VC7.0
I get these error during linking process.
TestMC error LNK2001: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@std@@YAXXZ)TestMC error LNK2001: unresolved external symbol "void __cdecl std::_Xran
What are the needed header files or static libraries?
thanks
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
|
MC++?
--
Breaking the law, breaking the law
Breaking the law, breaking the law
You don't know what it's like
|
|
|
|
|
|
--
Breaking the law, breaking the law
Breaking the law, breaking the law
You don't know what it's like
|
|
|
|
|
That is because oftenly, most of project which was developed in VC6 could not be reused in VC7 or Managed C with some problems of could not get most of the libraries link up properly. I just hope to see if there are anyone who came across with the similar problem of which similar linker error could shed some light of pointing out which static libraries or files that I need to additionally include into my project.
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
You need to make sure you're pointing at the correct LIB files. Sometimes you have Visual Studio installed libs and Platform SDK libs. Make sure you're only pointing to one or the other.
|
|
|
|
|
i have made a simple web service which calculate addition of 2 numbers(managed C++ web service), i try to use it in another managed C++ application, the first attempt is successful, i add web reference to project and put url to the directory where myProgram.asmx resides, it works, i try to run the application and runs smoothly.
But i try it again by creating another managed C++ application and just do the same thing...now i can't add web reference....when downloading files in progress.....boom....it can't find any web reference in the url i typed before(same url)....sometimes..if i try many times....then error message appear is IIS has encounter a problem and need to close...
I wonder if i need to install something or change setting to overcome this problem.....
Finally...i wonder whether i can create MC++ web service and consumed it in C# application....if yes, how?...is there any tutorial or resources for this?
Thx for answers....sorry for the wordy question
|
|
|
|
|
This sounds more like a ASP.NET than a MC++ question to me.
Probably you could get an answer there.
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
it shouldn't be asp since i'm using C++ , no asp.net at all
|
|
|
|
|
But if you are developing web services with .NET, then it should involve ASP.NET, unless you are using J2EE.
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
hi...
I am using oracle 9i forms API in my DLL. Dll is working perfect except some time it gives error that is related to memory when the flow return from DllMain().
in DLL i am using the oracle 9i forms for the loading of oracle forms and using the object of those forms.
I am not using 'NEW' operator inside the DLL.
..please explain how to overCome the Problem...
thanks
utkarsh sharma
"Not everything that counts can be counted, and not everything that can be counted counts."
|
|
|
|