|
Yes, I have referenced the assembly in my second project. I found that I was unable to fire the ResolveEventHandler because there was a copy of the first executable in the same directory as my second executable. When I removed this first executable from the same directory, the ResolveEventHandler gets fired. However, now I am having issues with Assembly::Load. It appears that this Assembly::Load is getting called over and over without ever returning the assembly. Eventually, I get a stack overflow exception error. Any ideas?
|
|
|
|
|
I'm pretty new to C++/CLI so please bare with me. I have a header "MyThread.h" that contains a Thread class. I added an include directive at the top of my frmMain.h so i can create an instance of this class. Everything is fine with that but when i include frmMain.h to MyThread.h i get alot of compile errors. I read somewhere of where you could add something like:
#ifndef FRMMAIN_H
#define FRMMAIN_H
#endif
to fix the issue but it isn't working. Any ideas?
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
In one of the header files, you'll probably need a forward reference to avoid circular reference
problems.
Here's one way:
#pragma once
class CfrmMain;
class CMyThread
{
CfrmMain *pMainFrame;
};
#include "stdafx.h"
#include "MyThread.h"
#include "frmMain.h"
...
#pragma once
#include "MyThread.h"
class CfrmMain
{
CMyThread *pMyThread;
};
#include "stdafx.h"
#include "frmMain.h"
...
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hi,
I have observed that, when we create an empty class, it takes 1bite space. I don’t know why it takes 1bit space. Will there be any implicit function created when we create an empty class??
Thanks,
Nandu.
|
|
|
|
|
This is using C++/CLI, or are you in the wrong forum ?
I don't see how you can decide that an empty class takes up one byte. One byte where ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: One byte where ?
He said one 'Bite'. Maybe it's an animal class or something.
led mike
|
|
|
|
|
Hi Nandu,
There will not be any implicit functions created. However it just follows the simple rule
"Types can not be of ZERO size".
Cheers,
Suresh
|
|
|
|
|
Function does not need space (data)...
|
|
|
|
|
|
Hi everyone,
I am using mysql 5.0.
I have a problem with my c++ application using mysql.
I compiled everything without any trouble.
Localy appliction works perfectly but when I upload it crash comes emediately.
Remotely I cannot use any function regarding mysql.
When I use mysql_init() application crashes.
Whitout mysql application is working.
On the server installed version of mysql is 5.027.
I cannot understand mistake.
If anyone can help me I would appreciate it very much.
an-arhos
Edit/Delete Message
|
|
|
|
|
What do you mean by crash?
How does this relate to managed C++?
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
The first three posts in this forum invoke a giant and produce visions of Fish Filet
led mike
|
|
|
|
|
Definitely! I'm torn - I'm not sure if the first or the third is "better"!
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
|
O M G
Thanks man!
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
I was thinking we should start a FFOTD Award (Fish Filet of The Day) but I became concerned that McD's might not be able to keep up.
Also did you see my reply where I offered this Google Search[^]
I think I will be using that fairly often.
led mike
|
|
|
|
|
led mike wrote: I became concerned that McD's might not be able to keep up.
Yeah - I'm not sure about them keeping enough in stock, but there should be no shortage of
employees to prepare them!
led mike wrote: this Google Search[^]
Excellent! It's so good I'm not sure if I should laugh or sigh
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Is there any link which talks about file handling in mc++.
I have to specify the write mode for the file. I mixed both managed and unmanged code. From managed code i have to call unmanged code with the first parameter file name second parameter file mode(write mode)..How to specify the file mode.
pOap->Open(szTemp,FileWriteMode);
|
|
|
|
|
Hello ...If I have values for "H","D" given from the interface and I want put a message if the value for D from the interface is grater then 2*H
(let say I give value from the inteface for H=230 and for D=700 but 700>2*H to show me an error that "You must specify D less than 460 "
if (D > 2*H)
{
MessageBox::Show("You must specify D less then ......2*230(2*H).... ", "Error", MessageBoxButtons::OK, MessageBoxIcon::Error, MessageBoxDefaultButton::Button1/*, MessageBoxOptions.DefaultDesktopOnly*/);
return;
}
Y don't know if I can use MessageBox for this..can you help me...please
|
|
|
|
|
You could use String.Format() to format the string...
MessageBox::Show(String::Format("You must specify D less then {0} (2*H)", (H*2).ToString()),
"Error", MessageBoxButtons::OK, MessageBoxIcon::Error, MessageBoxDefaultButton::Button1/*,
MessageBoxOptions.DefaultDesktopOnly*/);
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
if (D > 2*H)
{
AfxMessageBox(CString("You must specify D less then ......2*230(2*H).... "));
return;
}
It will work.
Anurag Gandhi.
Bangalore, India.
|
|
|
|
|
|
When i compile my application in release mode i am getting the below warning
Warning 1 warning LNK4248: unresolved typeref token (0100001E) for 'CRawChro'; image may not run FConvert.obj
But there is no class or variable or struct whi the name CRawChro.
Where to look for this kind of warning.
Thanks in advance.
Regards, Eswari
|
|
|
|
|
when i looked into the google it said provide stucture definitions. I have two structures in the class and they are as follows:
public ref struct FConvertRecord
{
public:
String^ szSourceName;
String^ szSourcePath;
String^ szDestName;
String^ szDestPath;
String^ szError;
ConversionStatus eStatus;
ConvertFileFormat eSourceFormat;
ConvertFileFormat eDestFormat;
bool bSourceIsRemote;
bool bDestinationIsRemote;
bool bCommandLineProcessing;
int iReserved;
int iErrorId;
};
public ref struct FConvertFileFormatInfo
{
public:
ConvertFileFormat eFormat;
String^ szFormatName;
String^ szFilter; // should be NAME.EXT or *.EXT or NAME.* etc
unsigned long ulAttribs; //Can Be SFGAO_FILESYSTEM to indicate FILE or SFGAO_FOLDER to indicate Directory.
};
But there is no CRawChro in the project. What is the warning pointing to?
Regards, Eswari
|
|
|
|
|
I am looking for examples on how to do this. I found one article in CP that looks like what I want, except that it is done using CSS (http://www.codeproject.com/useritems/Outlook_Style_Menu.asp[^])
What I want is a menu bar that collapses into the side of a dialog window and can be pulled-out when needed - like what one sees in video/media players.
Thanks,
Johnny
|
|
|
|