When subclassing a CEdit (MFC) in my ActiveX I had a problem with the stock properties BackColor and ForeColor, that was partially solved by the article Q148242 (if you are interested, look it up at http://support.microsoft.com/kb/q148242/).
This way, I could enjoy the backcolor and the...
My solution is slightly different
First, even if you use MFC both in the library and in the client application, don't pass CStrings to and from the dll, but a LPCTSTR instead.
Second, pass the LPCTSTR to the dll with an address-of operator (&). This way, you'll get back the LPCTSTR transformed...
My CViews are created with the style WS_CHILD | WS_VISIBLE |WS_CLIPSIBLINGS |WS_TABSTOP.
When the whole MDI is dragged up, toward the top of the screen, they lose some of their drawing (forms and lines), but NOT the writing.
I have somehow fixed up this problem setting a timer every 60...
Any time I tried to to have a dll (explicitly calle with
AfxLoadLibrary) return me a CString or a pointer to it I got a crash.
I've solved the problem making traditional dlls that return a char*, and then, inside the application, I translate the pointer to char into a CString. But it is...
I'm not sure to understand.
Assuming this simple
struct MyStruct
{
int Int;
float flt;
};
and this elementary function in the dll
void DoSomething(void* pv)
{
pv->Int += 3;
pv->flt *=3.14;
}
could you please show me the full code to pass an instance of MyStruct to the dll?
I know...
CMSFlexGrid in fact was built by VB programmers. For I don't know what reason and for my despair, it treats all sizes in twips, even if Win32 APIs and the human eye have no use for them but only for pixels. But this same ActiveX makes a wonderful job, when you have to expose long and complex...
OK, this is the code:
quote
CRect CRbDLLApp::GetCellRect(CMSFlexGrid *pGrid)
{
// this function returns, in pixels, the inside (client) dimensions
// of the Grid's active cell
// The parent window of the control to be put over the active cell is the same Grid...
Whatever the problems with the code calculating position and size of the CEdit, there must be a difference between the Systems, because the same code runs perfectly in Window '98.
Some lines of program written in Visual C++ for covering the active cell of a MSFlexGrid with a CEdit run properly in Windows '98, once solved the problem of translating twips into pixels.
But when the same program is tried in Windows NT or XP, the CEdit is misplaced, a few pixels over and...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.