|
WM_CLOSE asks the model dialog window to close.
You are correct, the WM_CLOSE does not ensure that they end with the IDCANCEL return value.
The WM_CLOSE will close modeless dialogs as well.
|
|
|
|
|
Hello,
I am working in VC++ 6.0 and Windows Xp Professional.
I created an ActiveX control using MFC ActiveX ControlWizard and have drawn a circle
on the control window using CDC (CView) Class. Now I want to print this circle on the
currently installed printer. I already added a method named "PrintCircle" to
the control. I would like to call this method to do the printing.
Now, my question is, how can I invoke the Printing functions
Meantime I done the job with a SDI Application
I try to do this way...
CMyCtrl
CMyCtrl:: PrintCircle()
{
m_pView->MyPrint();
}
CMyView
CMyView::MyPrint()
{
OnFilePrint();
}
This will goes up to OnpreparePrint () and show the print Dialog too
Then shows an Runtime Error 2147417848(80010108)
Hoping to get a reply soon.
Thanks in advance.
|
|
|
|
|
My company develops Object Orienterd software applications (mainly in VC++).
We have always measured our software quality and complexity using standard
metrics (Line Of Code, MCCabe and so on..). Now we are trying to apply Object
Oriented metrics but we have seen that there are many different approaches,
many different type of metrics an few standardized ways to apply Object
Oriented metrics.
Does someone know something about it ? Which Object Oriented metric can be
used to start ? Are there some articles that can be taken as a guide ?
Thanks a lot!
|
|
|
|
|
Hey All,
Does anyone know how to find what arguments were passed to a process?
I can see that the ProcessViewer from sysinternals can do it, but I can not see how.
ideas?
Jules
|
|
|
|
|
|
Can anybody send me sample of source code about TCP programming.........very URGENT........
|
|
|
|
|
|
|
I had read through the website u given, they got alot of example of source code. I dont't understand that to start a TCP programming, which I should start first... Can give me some guide? I really rush on doing this project and only left 6 weeks for me to do....And I also very weak in programming....PLEASE....
|
|
|
|
|
Hi all, I am trying to write a program that runs in background to monitor and kill some running process. I coded it in Visual C++ 6.0 in a Win32 Console Application project. The code works, just that the console window appears when I run it. Can anyone tell me how can I make it a background process without the console window showing up? Thanks and appreciate.
|
|
|
|
|
There are a bunch of functions for dealing with consoles. Search for "Console Functions" in MSDN
Something like this might work ::ShowWindow(::GetColsoleWindow(), SW_HIDE);
|
|
|
|
|
I am trying to load an dll written in vb in my MFC dialog program. Does anyone know how to do this? Thanks.
|
|
|
|
|
Is it a COM dll ? Then the fact that it's VB is irrelevent. Can you #import a VB COM dll ? I don't know, but if you can, that's the nicest way to use a COM dll.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
It is infact an ACTIVEX dll. I've follow the steps from the this article, but I still get errors when compiling. (http://www.codeproject.com/dll/vbactivexwithvc.asp[^]). The generated .tlh file contains a method from the dll file which generates the error.
HRESULT OUT (
unsigned char OUTNUM,
VARIANT_BOOL VALUE );
error: C2027: use of undefined type 'HRESULT'
Thanks for following up.
|
|
|
|
|
ActiveX is COM, that's why it returns HRESULTs. What sort of project are you creating, that it doesn't contain any COM stuff ? afxwin.h defines HRESULT, it's just a long.
This article is showing you how to do things the hard way, unless it's impossible to #import an ActiveX dll and then instantiate it the same way you do other COM dlls.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
You can definitely #import an ActiveX component - I've had to do that many times including a current project that uses the MS Script ActiveX control.
Tom Archer - Visual C++ MVP
Archer Consulting Group.com
|
|
|
|
|
Yes, but can you use code like this:
HRESULT hr = File.CreateInstance(__uuidof(Avi::AVIFileInProc));
or do you need to use the CreateObject type code the article was providing ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Bascially, I just want to import this dll in a vc++ class and use its functions.
Since this dll is given by another person, I cannot change its format nor obtain the orginal source code.
http://www.geocities.com/red90000/TECHNO.zip[^]
|
|
|
|
|
That doesn't matter, I'm saying that if it's a COM dll, I don't see why you need the messy code that article gave you.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hello, is there a way to play multiple sounds (.wav files) using managed C++ in .NET for my application? I am a newbie so I need details.
Mike - I love to program!
|
|
|
|
|
DirectX is what you need. You need to download and install the SDK ( which means the runtime is required for your app ). There is sample code with the SDK.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks for the reply, and this may sound stupid, but I dont know what SDK means, or how to use that with Managed C++ .NET. Would a tutorial be provided?
|
|
|
|
|
SDK stands for software development kit. Basically, it's a load of files that you need to use a library that didn't come with your compiler. Yes, if you google DirectX and go to the Microsoft site for downloading, the installer will give you all you need, docs included.
BTW, if you're starting out, why did you choose managed C++ ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks for the help, and to answer your question, I was provided with Visual Studio .NET, and I wanted to make a forms application. Since I prefer C++ and I heard MFC was hard to understand, so I went the Managed C++ for my forms app.
Mike - I love to program!
|
|
|
|
|
allenmpcx wrote:
I was provided with Visual Studio .NET, and I wanted to make a forms application. Since I prefer C++ and I heard MFC was hard to understand, so I went the Managed C++ for my forms app.
Honestly, you're headed into hell. I love doing winforms in C#, much easier than MFC in C++, but MFC is not really hard, it's just that C# is easy. And doing winforms in MC++ is my personal vision of hell. But if you have a deep understanding of C++ already, and you don't know MFC, it may be a toss of the dice. It's certainly, definately, not going to be easier than using MFC though, and you end up with an app that requires the .NET framework. Why have that if you don't need to ?
Christian Graus - Microsoft MVP - C++
|
|
|
|