|
I write a program,when I configure it to compiling using static libaray in release version,the program would crush at runtime somewhere.
But it works well in debug mode.
Someone would tell me why?
GOOD LUCK
|
|
|
|
|
then you should probably start by reading This[^]...
|
|
|
|
|
What error you got and can you more explain about your program?
|
|
|
|
|
there has a listen socket,when new connect come in,it create a new thread with a socket can communicate with the remote PC.
But if it runing at release mode,it would crash.
|
|
|
|
|
Hi,
I have created a SDI application with Document/View
architecture. Now every time the app starts, it displays
the title "Untitled: SampleApp" in the Title Bar. What I want
to do is to display only software name there. (e.g. "Sample App")
How should I do that.
---
Why buy the cow when milk is free?
|
|
|
|
|
|
override PreCreateWindow
BOOL CMainFrame::PreCreateWindow (CREATESTRUCT& cs)
{
cs.style &= ~FWS_ADDTOTITLE;
return CFrameWnd::PreCreateWindow (cs);
}
Judy
|
|
|
|
|
Hey,
thanks
it's just what i wanted....
i guess i need to read a lot...
Regards,
Abhijeet
|
|
|
|
|
Hello !!
I have encountered some problem to make a project in MFC .
There is a particular text(T) is displayed in a text box control.
I want to create an window(W) as the mouse pointer focues at that particular text (T).
This window(W)pane should display some string data .
Would you please give me some solution ?
GargiBag
|
|
|
|
|
hi...
i am doin files drag & drop operation. in that i have a dialog box,which include treectrl. i need to drop a file in the treectrl... I already did this using view class...
but now i need to do it in a dialog class...
how to do that....
Thanks in advance
|
|
|
|
|
Has anyone have any thoughts on converting a Borland C++ Builder project to MS VS 2005 ? I don’t know anything about Borland’s environment but we have acquired a company that does all it’s software using Borland. We are strictly an MS environment group. The project is a simple MDI application, no .NET.
Are there any blogs, papers, etc on the subject ?
Thanks in advance
Tony Teveris
Gerber Scientific Products
Senior Software Engineer
Phone: 860 648 8151
Fax: 860 648 8214
83 Gerber Road West
South Windsor, CT 06074
|
|
|
|
|
Depends on the size of Borland project, if it is really simple rewriting is good but if the project is a complex application at least I don't recommend that.
|
|
|
|
|
Tony Teveris wrote: converting a Borland C++ Builder project to MS VS 2005 ?
Well when you say "converting a project" do you mean the IDE project management files? I know it might be tedious but you should be able to just create an empty VS project and add all the files and libraries by hand. If that is not what you are asking about could you be more specific?
|
|
|
|
|
This is exactly what I have been doing for the last 4.5 months. I was hired on to port an application from Borland to VS 2005 with some C# sprinkled in there. To be more specific, I am porting from Borland OWL.
Are you using OWL? Sorry, I am not familiar with Borland C++ Builder or the Borland tools. I'm just porting code and we use a makefile to compile the Borland code.
I can give you some pointers if you are using OWL. A lot of the classes and methods transfer quite easily to MFC. Things like TDC is a CDC, TPen is a CPen. There are other portions of Borland which are nice and make you wish MFC had the same thing. For example, Borland has an actual color class (TColor). There is no equivalent in MFC so I had to use a COLORREF and the RGB macros in place of TColor.
There are other helpful Borland classes which you just need to figure out how to do the equivalent in MFC.
Since you will be working with MDI, you should be aware of Borland's window structure. Do you have a background in MFC and how the window classes relate? In MFC, a window contains a MainFrame which itself controls the MDIClient window. These are one-in-the-same when it comes to MFC classes. In Borland, you actually have two separate classes. A TMDIClient class and TMDIFrame/TDecoratedMDIFrame. You will need to convert the two classes into the one CMDIFrameWnd.
Does the project use STL? The STL is different between the two and requires some minor name changes. A compile error will point this out and you can usually figure out the equivalent just looking it up on MSDN.
Unfortunately, there is really no information on-line for Borland information. I use their OWL help documentation if I ever get stuck.
This should at least give you a heads up. Let me know if you have any more questions or concerns. We can take this to e-mail if necessary.
|
|
|
|
|
Hi
For example i have a dll code like this:
class __declspec(dllexport) CDllTest<br />
{<br />
public: <br />
CDllTest(){}<br />
~CDllTest(){}<br />
<br />
public:<br />
void SayHello();<br />
};<br />
<br />
<br />
void CDllTest::SayHello()<br />
{<br />
printf(_T("Hello C++"));<br />
}
Here:
After exporting classes how do I access it's member function from another module by using run time dynamic linking (LoadLibrary, GetProcAddress...)?
What are the techniques/ways calling a class member function from exe?
Thanks..
|
|
|
|
|
sawerr wrote: After exporting classes how do I access it's member function from another module by using run time dynamic linking (LoadLibrary, GetProcAddress...)?
You won't be able to import classes using explicit linking (meaning by using LoadLibrary and GetProcAddress). Instead you need to use implicit linking: link to the lib file that was generated with the dll and include the header file in which the class is declared (in that case, you need to import the class).
There is a bunch of articles here[^] to help you.
|
|
|
|
|
Cedric Moonen wrote: You won't be able to import classes using explicit linking
why that ?
i think you say so because of the mangled names, but if the .DEF file is present, no pb anymore...
am i right ?
|
|
|
|
|
Actually I don't even get the OP's question...
Does he really want to have the function body in the EXE, but the declaration in the DLL?
Would that even compile?
I wonder what ::GetProcAddress() would return...
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
no, i think he just wants to load his DLL dynamically, but he doesn't know what to put as the parameter to ::GetProcAddress() when the function is a member of a class.
but the trick is that he only has to load the class...
|
|
|
|
|
toxcct wrote: am i right ?
I don't think so. Using GetProcAddress, you can get the address of a function, but you are not able to import a complete class (as far as I know). How would you that ? Or maybe I am missing something...
|
|
|
|
|
|
Do you need to use explicit linking ? Why don't you go for the standard way, e.g. implicit linking ?
Of course, you have a little more things under control but do you really need that ? It is only really usefull when you develop a kind of plugin...
|
|
|
|
|
ahhhh, codeguru... lol
see here[^] if that helps.
|
|
|
|
|
hum, yeah, you're right... a class to be used must be known its definition at compile time...
|
|
|
|
|
Hello,
Can you tell me how to use InitModalIndirect() function of CDialog class?
And what exactly is the meaning of the first parameter of this function.
Prithaa
|
|
|
|