Creating Controls with APIs


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Creating Controls with APIs

  1. #1
    Duncan Campbell Guest

    Creating Controls with APIs

    I'm trying to create controls at run time using the CrerateWindowEx
    function. I have managed to create certain controls without a problem.
    However I can't seem to be able to figure out how to create a simple label.
    Does any one know what parameters I should use to do this.

    My other question is this. I have managed to create and display control such
    as a text box and a button and when I create the control I set the text of
    the text box or the caption of the button but how do I change the text or
    caption proerties after the controls have been created.

    If someone could lead me to some sample code that would be great.

    Thanks
    Duncan.



  2. #2
    Ray Mercer Guest

    Re: Creating Controls with APIs

    "Duncan Campbell" <duncanc@appsoft.co.za> wrote in message
    news:392a3b68@news.devx.com...
    > I'm trying to create controls at run time using the CrerateWindowEx
    > function. I have managed to create certain controls without a problem.
    > However I can't seem to be able to figure out how to create a simple

    label.
    > Does any one know what parameters I should use to do this.


    Check out Ben Baird's site for tutorials on doing just this ;-)
    www.vbthunder.com

    > My other question is this. I have managed to create and display control

    such
    > as a text box and a button and when I create the control I set the text of
    > the text box or the caption of the button but how do I change the text or
    > caption proerties after the controls have been created.


    You need to send Window msgs (usually by using the SendMessage API). If you
    really want to understand this method of doing things, I recommend getting a
    copy of Charles Petzold's classic tome "Programming Windows [3.x, 9x]" and
    learning to think a bit in C/C++.

    FWIW,
    Ray Mercer
    www.shrinkwrapvb.com




  3. #3
    Ray Mercer Guest

    Re: Creating Controls with APIs

    "Duncan Campbell" <duncanc@appsoft.co.za> wrote in message
    news:392a3b68@news.devx.com...
    > I'm trying to create controls at run time using the CrerateWindowEx
    > function. I have managed to create certain controls without a problem.
    > However I can't seem to be able to figure out how to create a simple

    label.
    > Does any one know what parameters I should use to do this.


    Check out Ben Baird's site for tutorials on doing just this ;-)
    www.vbthunder.com

    > My other question is this. I have managed to create and display control

    such
    > as a text box and a button and when I create the control I set the text of
    > the text box or the caption of the button but how do I change the text or
    > caption proerties after the controls have been created.


    You need to send Window msgs (usually by using the SendMessage API). If you
    really want to understand this method of doing things, I recommend getting a
    copy of Charles Petzold's classic tome "Programming Windows [3.x, 9x]" and
    learning to think a bit in C/C++.

    FWIW,
    Ray Mercer
    www.shrinkwrapvb.com




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center