Jump to content
  • Advertisement
Sign in to follow this  
kingpinzs

How to make an Edit box Common control class

This topic is 4613 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How to make an Edit box Common control class. I am trying to make a calss for my edit controll but no matter what I do it wont show. Can any one give me any hints on how to do this?

Share this post


Link to post
Share on other sites
Advertisement
Hello,

Here is how you can create an edit control with the Win32 API


HWND EditHWND = CreateWindow("Edit", "Default Text", WS_CHILD | WS_VISIBLE | WS_BORDER, X, Y, Width, Height, ParenthWnd, NULL, hInstance, NULL);



EditHWND = The window handle returned by the CreateWindow function
"Edit" = Specific class for the edit control
"Defaul Text" = If you want the edit control to have default text (can be "")
WS_CHILD | WS_VISIBLE | WS_BORDER = Edit control window style
X = The position X (Left) of the edit control
Y = The position Y (Top) of the edit control
Width = The position width of the edit control
Height = The position height of the edit control
ParenthWnd = The parent dialog window handle
NULL = No menu
hInstance = Handle to the instance of the module to be associated with the window (From WinMain)
NULL = No create structure (lpparam)

Share this post


Link to post
Share on other sites
It's actually EDIT for CreateWindow(), see:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowfunctions/createwindow.asp

You can also use CreateWindowEx().

Share this post


Link to post
Share on other sites
Quote:
Original post by Mike2343
It's actually EDIT for CreateWindow(), see:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowfunctions/createwindow.asp

You can also use CreateWindowEx().


That would only matter if it was case sensetive, but it is not.

edit
EDIT
eDiT
EdIt
EDit
etc. will all work.

Share this post


Link to post
Share on other sites
Google is your friend

http://www.gamedev.net/reference/articles/article1810.asp
http://codeproject.com/win32/win32windowwrapperclass.asp

Share this post


Link to post
Share on other sites
I'm not that far into my wrapper yet. When I am I will revisit this, but I think you will have solved it by then (this time of the year it will be 2-3 weeks for me to get there, sorry).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!