SPONSORS:






User Tag List

Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    Mar 2001
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    AfxWnd42 & AfxControlBar42 Window Classes

    I have an application that uses the following
    AfxWnd42 & AfxControlBar42 window classes.

    My problem is this, the AfxWnd42 class contains a tree view.. Looks very similar to a tree view you would see in windows Explorer. However the getContents and getEverything Methods do not return anything for the Tree View..
    I get the following result for a getEverything ().
    [-] Testcase test - Passed
    [ ] (local) Contents:
    [ ] (local) Enabled: TRUE
    [ ] (local) Selected item by index: 0
    [ ] (local) Selected item by text:

    I would really like to be able to 'Select' items from this TreeView, but I can't get SilkTest to see any item on the tree.

    I have even tried :
    List of String lsContents = Launcher.CustomWin("[AfxWnd42ud]Navigation Bar|#1").CustomWin("[AfxWnd42ud]#1").getEverything (), basically with none of these custome AFX classes mapped to anything, and I still get nothing..

    Has anyone at all ever seen this before?
    Any ideas would be greatly appreciated..


    ------------------
    Jason B. Archibald
    Jason B. Archibald

  2. #2
    Member
    Join Date
    Oct 2001
    Posts
    93
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: AfxWnd42 & AfxControlBar42 Window Classes

    Jason,

    Generally Afx controls are proper custom controls (ie do not expose anything to windows). However, have you tried class mapping the AfxWnd to a treeview? If you have and still do not get anything, ask your developers if there is a dll that you could hook into to get and set properties for the control. If there is you may be able to use this method. If you can, you may also want to try using the 'inprocess' keyword in your dll declaration (this tells silktest to use the currently running instance of the dll instead of creating its own instance - it can be useful but you won't find it in the help anywhere!)

    Good luck,

    Paul

    ------------------
    Paul Tucker
    Merit AT
    www.merit-at.com

  3. #3
    Junior Member
    Join Date
    Jun 2001
    Location
    Germany
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: AfxWnd42 & AfxControlBar42 Window Classes

    Hi,

    I got the same class types in my application under test. I did the following class mappings plus declarations and I can work with the treeview.

    Originally, the recorder showed this class hierarchy:

    [-] CustomWin ApplicationWorkspace
    [ ] msw tag "[AfxControlBar42]Application Workspace"
    [-] CustomWin ApplicationWorkspace
    [ ] msw tag "[AfxWnd42]Application Workspace"
    [-] CustomWin AfxFrameOrView421
    [ ] msw tag "[AfxFrameOrView42]#1"
    [+] TreeView TreeView1
    [ ] tag "#1"
    [+] PushButton PushButton2
    [ ] tag "#2"
    [+] PushButton PushButton1
    [ ] tag "#1"
    [+] PageList PageList1
    [ ] tag "#1"

    =====>

    a) AfxControlBar42* I mapped to 'ignore' with the Class Mapping option (note: this affects the whole test application!, however was the only way to get through to the treeview.)

    b) I have defined certain winclass declarations:
    [-] winclass DockableWnd : AnyWin //
    [ ] tag "[AfxWnd42*]" //
    [+] FrameWndClass FrameWnd
    [ ] tag "#1"

    [-] winclass FrameWndClass : AnyWin
    [ ] tag "AfxFrameOrView42*"
    [-] TreeView TreeView
    [ ] tag "#1"


    The declaration for the above mentioned window now looks like this:

    [-] DockableWnd ApplicationWorkspace// docked window
    [ ] tag "Application Workspace"

    And a code line:
    MyMainWnd.ApplicationWorkspace.FrameWnd.TreeView.S elect ('#1')

    Good luck!


    ------------------

    Angelika

    Angelika

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 07:11 AM.

Copyright BetaSoft Inc.