|
nish, it seems that the thread was moved from the VC++ forum, but it's not a managed question actually...
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
toxcct wrote: nish, it seems that the thread was moved from the VC++ forum, but it's not a managed question actually...
He wants to use MessageBox::Show which seems to indicate that he's using Windows Forms. Probably mixing that with MFC too - so most likely a mixed mode app.
Regards,
Nish
|
|
|
|
|
yeah, it's what at thought at first, but finally, nothing indicated he want to use MessageBox::Show() above all.
i think much that he doesn't really know what he does, and is a little lost with all the existing APIs. maybe he say somewhere on the internet that MessageBox::Show() existed, thinking that it would work in every situation. though, when he asked me what Managed C++ was, it became obvious that he was absolutely not aware of the difference between managed and unmanaged code, and lesser what mixed code could be...
don't you feel it like this ??
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
toxcct wrote: it became obvious that he was absolutely not aware of the difference between managed and unmanaged code
I got that impression, too. So that is why I put up a link to wikipedia about managed code.
PJC
|
|
|
|
|
Perhaps, it's so. Let him ask a clearer question on the VC++ forum if he wants to. Let this thread remain here, so people will know how to use MessageBox::Show in a mixed mode app. Helps to improve search results.
Regards,
Nish
|
|
|
|
|
Nishant Sivakumar wrote: Helps to improve search results.
Good point. I am sure others will have a similar question and hopefully they find this thread
PJC
|
|
|
|
|
Yup! I'm absolutly confused!
I have no clue what so ever what I'm doing when it comes to GUI design with Visual Studio.
I've been taught how to do console type design using emacs and compiling it with gcc but I've never used visual studio b4.
I'm sorry I'm asking so pretty dumb questions, it's just that there's no simple getting started with gui book.
I'm still trying to figure out MFC vs. windows form. I know with the windows form you can add dialogs and controls. With MFC it gives you a project whether it's MDI or SDI you choose but you also have the option to change the base class to CFormVew and then you can play with the dialog that way. Other wise I don't know how else to add dialogs and controls to and MFC...
Thanks
Kitty5
|
|
|
|
|
|
I've created a Button and what i'm trying to do is when I click the button I want a message box to pop up...
void ksclass::OnBnClickedButton1()
{
::AfxMessageBox(_T("Hello Wolrd !"));
// TODO: Add your control notification handler code here
}
the ::AfxMessageBox(_T("Hello Wolrd !")); helped with the errors but when I run then click the button... nothing happens...
Thanks
Kitty5
|
|
|
|
|
If this is an ordinary C++ application, you can use:
::MessageBox( 0, "Hello, World!", "", 0);
|
|
|
|
|
why do you have :: in front of Message Box?
|
|
|
|
|
kitty5 wrote: why do you have :: in front of Message Box?
It is the global scope operator. Instructs the compiler to use the global MessageBox function.
Regards,
Nish
|
|
|
|
|
You need to #undef the MessageBox macro definition before using the .NET MessageBox class.
#undef MessageBox<br />
MessageBox::Show("hello");
Regards,
Nish
|
|
|
|
|
You'll need #undef MessageBox after #include "stdafx.h" - it's trying to use the standard MessageBox rather than the .net one.
Mark
|
|
|
|
|
Hello,
I played a bit with the vcCodeModel and it is a great tool to gather information.
However, the one functionality I couldn't find is the one that's already supplied by the ObjectBrowser: Discovering which functions calls to which, the way ObjectBrowser does.
Anyone has an idea?
|
|
|
|
|
In the good old days I believe people were using the arcane technology which came to be known as COM+ to embed other application's document in their own document.
Like a Word with document a Windows Media Player or Excel or Visio document inside, double click on it and *bang* you coud start edit it using Excel/WMP/Visio toolbar.
Apparently even OpenOffice could do that.
Now here is my question:
I'm a new generation programmer. Blissfully ignorant of such thing.
But I would like to know and embed Word, Excel or other kind of document in my application's own document!
How could I do that?
And is there an up-to-date technology (i.e.: .NET API) to do that?
|
|
|
|
|
hi..
please give me example of threading
Rahul Kulkarni
|
|
|
|
|
I have just browsed the msdn[^]...
<code>
using namespace System;
using namespace System::Threading;
ref class Work
{
public:
Work(){}
void DoWork(){}
};
int main()
{
Work^ threadWork = gcnew Work;
Thread^ newThread = gcnew Thread( gcnew ThreadStart( threadWork, &Work::DoWork ) );
newThread->Start();
}
</code>
|
|
|
|
|
I seem to have a problem using the DataGrid/DataGridView within a MFC dialog (using the CWinFormsControl< > template).
I create a DataSet from a Xml file and then set it to the DataSource. I also set the DataMember to the appropriate table name, but nothing is displayed in the grid view. I tried other various approaches, but nothing seems to work.
I have no problem setting this up in WinForms - it just won't display in MFC. I know the data's there because I can actually step right into it from the DataGrid object - it just won't display - the ColumnCount is still 0.
What's the problem? Has anyone else experienced this? If so, has anyone found a way around this?
I just don't understand why this won't work.
|
|
|
|
|
Hi there!
Newbie question: I want to develop an app using managed C++ and Windows Forms, is it possible to use some of the nice C# controls I see on this page in my app?
|
|
|
|
|
If this question is about "is it easy to use them", the answer is yes. As most C# controls are compiled into assemblies(DLLs), you should be able to use them in your C++ applications with no or little problems.
If your question is about copyright, consult with the author or CP staff about terms and conditions.
- It's easier to make than to correct a mistake.
|
|
|
|
|
Hi..
actually what the thing is i have a project in console application working properly.
Now i want to make it windows application. I have copied all the file of the console
application to new Window application. now main is in call_main.cc file. I want to call the main
and replace the console.writeline() by messagebox::show. Can i do this.
Else give me suggetion to make console application to windows application simply.
Thanks in Advanced
Rahul Kulkarni
Rahul Kulkarni
|
|
|
|
|
RahulRKulkarni wrote: I want to call the main
and replace the console.writeline() by messagebox::show. Can i do this.
Yes.
RahulRKulkarni wrote: Else give me suggetion to make console application to windows application simply.
There is no one-size-fits-all solution.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I have a Unmanaged Dll.
signature of the function is :
Err_code f1(char** return_name);
what marshal types can i use for this?
the eq unmanged code is :
char* name = NULL;
f1(&name);
printf("%s",name);
i do not know how to use the marshal types for this situation?
thanks in advance
^-^
@|@
- redCat
|
|
|
|
|
Hello everybody, I am a newcomer and I would like to ask:
What is the relation between MFC and C++/CLI?
At first I was interested in MFC but I figured out that programming with C++/CLI is a lot easier.Is it necessary to learn MFC to make a decent application?Can I use both MFC and C++/CLI to make a programm, or there are other C++/CLI libraries that I can use instead of MFC?
|
|
|
|