CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Static control

  1. #1
    Join Date
    Apr 1999
    Posts
    8

    Static control

    I want to add a frame/group box at run-time. The class used for that is CStatic. But I am unable to get the 3-D look and couldn't find any style which could set that property and also couldn't set the caption for that control.
    Please help if anyone knows the solution to this problem.



  2. #2
    Join Date
    Apr 1999
    Posts
    57

    Re: Static control

    Try using WS_CAPTION style in the Create method of CStatic and Use SetWindowText to set the Caption. I haven't tried this yet but it may work.
    WS_DLGFRAME may give a 3-D look but Caption can't be set, I think

    You can try ::SetWindowLong API to set Window Styles

    Hope this may help to some extent


    Regards
    Anand

    M.Anand
    Development - Lead ,
    Satyam Infoway Limited,
    Chennai - 600034
    India

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured