Results 1 to 5 of 5

Looking for C++ gurus here! Need help.


This discussion is about "Looking for C++ gurus here! Need help." in the "Programming" forums.
naa koy project sa ako work.... na lipung nko.... dugay na jd ni cy.... how to access the events for the dynamic controls I created ...

  1. #1
    Senior Member
    Join Date
    Jun 2004
    Posts
    640

    Default Looking for C++ gurus here! Need help.


    naa koy project sa ako work.... na lipung nko.... dugay na jd ni cy....


    how to access the events for the dynamic controls I created on the fly using C++?

    late-bound activeX control
    sa client side ni cya na problem
    not using ATL
    i cant change anything sa control
    kabaw ko sa interfaces / event interface
    i can get the IID of the control, IID sa event interface
    ok pud ang GetIDsOfNames

    tnx

  2. #2
    C.I.A.
    Join Date
    Sep 2004
    Posts
    2,290

    Default Re: Looking for C++ gurus here! Need help.

    paghimo ug class na mo inherit sa control then i declare didto sa imong class ang mga
    events na imong gusto i capture.

    example.
    Code:
    class CMyEdit: public CEdit
    {
      DECLARE_MESSAGE_MAP()
      afx_msg void OnLButtonDown(UINT nFlags, CPoint pt)
      {
        // place code here to handle left button down event
      }
    public:
      CMyEdit(){}
    };
    BEGIN_MESSAGE_MAP(CMyEdit, CEdit)
    // ibutang dinhi ang mga events na imong gusto na i-capture
      ON_WM_LBUTTONDOWN()
    END_MESSAGE_MAP()
    
    then sa pag create sa control:
    
    CMyEdit *m_pEd = new CMyEdit;
    CFont *pFont = GetFont();
    m_pEd->Create(WS_CHILD | WS_VISIBLE | ES_AUTOSCROLL,CRect(4,40,60,60),this,-2);
    m_pEd->ModifyStyleEx(0,WS_EX_CLIENTEDGE,SWP_DRAWFRAME);
    m_pEd->SetFont(pFont);



  3. #3
    Senior Member
    Join Date
    Jun 2004
    Posts
    640

    Default Re: Looking for C++ gurus here! Need help.

    tnx Stym....

    I get the picture...

    pero MESSAGE_MAP lagi imu gamit? Abe nako EVENT_MAP?

    Ok imu suggestion kung known ang IID.

    Ang situation man gud nko kay naay 2-types of controls. Mga COM ni sila package as a DLL.

    control #1
    control #2

    I would need to create one of them depending kinsa ang existing sa registry nko.
    Kani nga mga controls kay same functional pero ang #2 kay naay additional feature.

    In this situation, ang IID kay dili mahibaw-an until runtime. Kay wa man ta kabaw kinsa nga control ang existing pud.

    Ang imu code kay mu-work cya if kabaw ka unsay IID. And besides murag d namn cguro knahanglan ang IID kay kabaw
    naman sad ka unsa nga klasi nga control ang gamit.

    ================================================== ===========

    Mao na ang problem.....

    since unknown ang control, unknown pud ang IID then samut na ang IID sa events...

    waahhhhhhhh..............!!!!!!!

    Duh! Nganung nag C++!!!

    Matsalams au StyM! Pero kulang pa....

  4. #4
    Elite Member samokan's Avatar
    Join Date
    Apr 2004
    Gender
    Female
    Posts
    1,846

    Default Re: Looking for C++ gurus here! Need help.

    you can search sa www.codeguru.com

  5. #5
    Senior Member
    Join Date
    Jun 2004
    Posts
    640

    Default Re: Looking for C++ gurus here! Need help.

    been there na, code experts, msdn forums, google, etc....

    walay runtime binding of events....

  6.    Advertisement

Similar Threads

 
  1. newbie here! need help for comp specs..
    By marktingson510 in forum Computer Hardware
    Replies: 20
    Last Post: 08-25-2013, 10:42 AM
  2. looking for piso2x computer...i need 10-15 units this week please...here's my #09224988244...
    By binang in forum Business, Finance & Economics Discussions
    Replies: 3
    Last Post: 03-04-2013, 11:25 AM
  3. For samsung software rebooting here! Need help.
    By Kevin Co in forum Windows Software
    Replies: 1
    Last Post: 02-16-2012, 11:46 PM
  4. Help Im Looking for a Loan I need ASAP
    By rcm0722 in forum Business, Finance & Economics Discussions
    Replies: 8
    Last Post: 11-08-2008, 05:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top