1. A simple-type-specifier (7.1.5) followed by a parenthesized expression-list constructs a value of the specified type given the expression list. If the expression list is a single expression, the type conversion expression is equivalent (in definedness, and if defined in meaning) to the corresponding cast expression (5.4). If the simple-type-specifier specifies a class type, the class type shall be complete. If the expression list specifies more than a single value, the type shall be a class with a suitably declared constructor (8.5, 12.1), and the expression T(x1, x2, ...) is equivalent in effect to the declaration T t(x1, x2, ...); for some invented temporary variable t, with the result being the value of t as an rvalue.
Sometimes I need to display a bitmap much smaller then its original size, by using the StretchBlt API I get sadly ugly outcomes, I've noticed many picture-viewer applications have the ability of stretch-displaying pictures while maintaining high quality, some of them(IE 6.0, etc) can even do that job absolutely perfect. I wonder if I too can implement that in my own projects? Any help are appreciated.
No, the Combobox have an Edit (if the style isn't CBS_DROPDOWNLIST),
and a dropdown list.
I call the Edit Create in the OnCreate of the Combobox,
but if i use DDX_Control to create Combobox, than the OnCreate function
in not called.
Where can i call the the edit create function in this case?
Hope I understood your question
I see you use DDX_Control then (I think)you can't use Oncreate for create edit
I suggestion(Im not sure that is very good) you enter your code in the
function in classs derived(ccombobox) but with one if (if m_Eidt.m_hwnd==NULL then create)
i am defining a bunch of exception classes from a dll that are supposed to be thrown from within the DLL code to the GUI which loaded the dll.
it seems that i'm having trouble with the STL std::string::c_str() function when releasing its string.
here is my code :
and at last, i catch this exception thrown from the dll in my GUI MFC project :
when i look at the call stack, i see that the destructor of the std::string object is call at that point (it didn't leave the scope yet), and sope other functions are called down, until i get a dark message, that seems to say that i have a pointer that's been invalidated.
when i put a breakpoint on the line which contains that c_str() call and watch the ex exception object, all his datas (exception description message, position and error code) are correctly set.
i'm really stuck about that, because that behavior weren't happening when the code that i moved in the DLL was in the same project as the GUI.
Probably what's happening (not sure at all) is that the string is allocating dynamically memory for its internal purpose. Then, when firing the exception, it will be catched in your exe and upon calling the destructor of this string, it will try to delete this memory. Unfortunately, as it hasn't been allocated by the same module (by the dll and not by your exe) this will crash.
But this is difficult to understand because you don't know how it works internally. A thing is sure: when you allocate memory in a dll and try to delete it inside your exe, this will crash the program. That's why classes exported from a dll have a Destroy method (it is just a delete this).
But here, I don't know how it works when an exception is fired...