Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by rbarella

  1. rbarella

    Add back color to ListView Control Items

    Try with a Microsoft FlexGrid errebi1941
  2. rbarella

    ActiveX subclassing CEdit: color properties

    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...
  3. rbarella

    How do i pass a string to an exported function ?

    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...
  4. rbarella

    Why my CViews lose their drawings when moving upward?

    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...
  5. rbarella

    How can a dll return a CString?

    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...
  6. rbarella

    How to pass a struct to and from a dll?

    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...
  7. rbarella

    Why Windows NT misplaces my controls?

    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...
  8. rbarella

    How to pass a struct to and from a dll?

    or a pointer to a struct?
  9. rbarella

    Why Windows NT misplaces my controls?

    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...
  10. rbarella

    Why Windows NT misplaces my controls?

    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.
  11. rbarella

    Why Windows NT misplaces my controls?

    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...

Part and Inventory Search

Back
Top