|
Is there any method to dismiss the system modal dialog box programmatically?
|
|
|
|
|
|
to delete modelless dialog window
void CRVDlg:: OnExit()
{
OnCancel();
}
void CRVDlg::OnCancel()
{
DestroyWindow();
}
void CRVDlg::PostNcDestroy()
{
CDialog::PostNcDestroy();
if(m_pParent)
{
(CVCDlg*)m_pParent)->Obj=NULL;
}
delete this;
}
JAYARAJ
|
|
|
|
|
mfc42.dll 2.1k
mfc42d.dll 1.466k
why? debug version should large than release version.
|
|
|
|
|
The debug version has a list of all the named symbols in the file and their addresses, as well as line number information so the debugger can relate machine-code instructions to their line number in the source file.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
so debug version is large than retail.
but did you see that?
debug is smaller than retail.
|
|
|
|
|
Your message title... mfc42.dll < mfc42d.dll
If the debug version is smaller, then there's a problem with your installation.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
MFC71 depend many lib :msvcr71.dll kernel32.dll gdi32.dll etc...
but I use depends.exe look mfc71 ,it no import function. why?
|
|
|
|
|
declaration in vc6 :virtual ~CException();
declaration in vc7 :virtual ~CException() = 0;
try {
if(nCount != sizeof(BITMAPFILEHEADER)) {
throw new CException;
}
if(bmfh.bfType != 0x4d42) {
throw new CException;
}
.................
}
it work in vc6 ,it should pass compile but it should not pass link.
but it all work in vc6.
|
|
|
|
|
#include <iostream>
class ccc
{
public:
ccc(int i)
{
m_i = i;
}
int m_i;
};
void f(bool b) throw( ccc )
{
if(b)
{
throw new ccc(5);
}
}
main()
{
try
{
f(1);
}
catch (ccc)
{
std::cout<<"catch call";
abort();
}
}
the catch not run;
|
|
|
|
|
Because your not catching what you throw:
throw new ccc(5);
catch (ccc)
To fix:
throw ccc(5);
catch (ccc* pC)
{
delete pC;
std::cout<<"catch call";
abort();
}
Steve
|
|
|
|
|
Hi,
We are using Visual C++ 6 with MFC, and require the ability to scan a document and pick up some data that is printed on the forms (like serial numbers etc).
Just wondering if anyone has had any experiences good/bad with any OCR libraries?
I have tried SimpleOCR from http://www.simpleocr.com/ and never got a reply back about request for trial edition.
Currently testing Leadtools OCR solution (leadtools.com) using COM and getting errors. Have emailed them but awaiting a response.
Any others I should try?
|
|
|
|
|
Hi,
I am trying to put a chart in an MFC Dialog. I was told that the best way was to use the Office Web Components and the Chart available through that (adding it by selecting ActiveX componenent). However, I'm not sure how to do it. When I add this control to my Visual C++ 6.0 Project, the program never starts. It gets stuck in a BindControls function.
Does anyone know where I can get an example or article to help me out with this? Or a better way to graph a huge amount of data and display it in a MFC Dialog?
Thanks so much!
Jen
|
|
|
|
|
support.microsoft.com/kb/311765
My blogs:
http://blog.joycode.com/jiangsheng
http://blog.csdn.net/jiangsheng
http://bloglines.com/public/jiangsheng
Command what is yours
Conquer what is not
---Kane
|
|
|
|
|
Hi,
Thanks for the link to the article. It was very helpful, and I now have a chart in my dialog. However, I can't seem to figure out how to put my data into the chart, and select an XY Scatter chart...Any info or code snippets would be really appreciated!!
Thanks again!!
Jen
|
|
|
|
|
Hi! Is there any way I can call a function taking a variable number of arguments without specifying a terminating value? For example, I have this function:
int sum( int a, ... );
that calculates the sum of a variable number of positive arguments and takes as a final argument the value -1.
If I want to get 1 + 2 + 3, I would do something like this:
sum( 1, 2, 3, -1 );
What I would like to do is call this function without having to specify the fourth argument, -1, which tells the function to stop parsing the variable number of arguments and adding them. Is there any possible way to accomplish this? Thanks in advance!
|
|
|
|
|
void va_start(<br />
va_list arg_ptr,<br />
prev_param
);
My blogs:
http://blog.joycode.com/jiangsheng
http://blog.csdn.net/jiangsheng
http://bloglines.com/public/jiangsheng
Command what is yours
Conquer what is not
---Kane
|
|
|
|
|
I know I have to use the va_start, va_arg and va_end macros defined in stdarg.h in order to manipulate the arguments of such a function. But what I don't know is how I can call that function without a terminating value, like this:
sum( 1, 2, 3 );
Instead of:
sum( 1, 2, 3, -1 );
I want to make the function sum( ) "know" when to stop adding its arguments without giving it a terminating negative value argument.
Thanks!
|
|
|
|
|
No, you have to supply some sort of method identifying the number of parameters. va_arg() is a macro that simply advances the pointer to your parameters, it has no way of knowing if the data it is pointing at is valid or not.
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
I am tring to convert a set of values to absolute.
I have the following .
0.0
-0.0125
0.123
-0.476
-2
4
I am using abs(x). For abs(-2) i have 2 which is ok. But for abs(-0.0125) i have 0.0000 and also for abs(0.123) and abs(-0.476) i have 0.000. Why is this?
I need to have abs(-0.0125) = 0.0125. How can i do this?
|
|
|
|
|
You can use the function fabs to compute floating point absolute values. The abs function is for working with integers, which explains why your floating point values were being truncated.
Good luck
Chris Richardson
|
|
|
|
|
For converting the floating values, use fabs() instead of abs() which takes a integer as a argument.
|
|
|
|
|
I have the C source code for a file conversion utility that I want to incorporate into my project.
Ideally, I want to be able to convert this into a .lib to add to my project.
I'm not sure how to go about this. Specifically I'm not sure if there is way to deal with main ()or how to convert that into a c++ library.
I'm thinking of possibly trying to convert the code into c++ and create some classes to clean it all up, but thought I'd post first to see if anyone has any suggestions or thoughts on this.
Or could I just create a header to interface with the existing C code? And maybe change the main () to some other function that is declared in this header?
Thanks for any help.
|
|
|
|
|
Hi! I have created a .dll module called errorHandlers.dll. If I want to use the functions contained by that module, I have to load the dll. For this, I use delayed loading. What I would like to ask you is why must I link errorHandlers.lib to my dll user application too? Doesn't errorHandlers.dll contain all the functions definitions it needs? And the second question I have is: Why doesn't the dll file size modify, if I change some of its functions code? For example, first, my dll has 294.622 KB. After I change the code of one of the functions it contains, the dll file size remains the same: 294.622 KB. But if I use the new dll, the changes in my application actually take place. Can anyone tell me why this happens (what happens)? Thanks in advance!
|
|
|
|
|
1. Linking allows the linker to resolve the locations for the function addresses into the DLL that your program is calling. Otherwise, you need to 'manually' load your DLL - using LoadLibrary and get addresses of functions at runtime using GetProcAddress.
2. Yes, the DLL contains the function definitions.
3. The DLL size increments in blocks of code. You can usually add or remove a few lines of code at times from a module and its image size will not change.
People that start writing code immediately are programmers (or hackers), people that ask questions first are Software Engineers - Graham Shanks
|
|
|
|