How to make an Edit box Common control class

Started by
10 comments, last by GameDev.net 18 years, 4 months ago
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?
Advertisement
Does any one know what I mean about creating a edit box class?

Just like creating a mian window class.
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)
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().

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety." --Benjamin Franklin

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.
that is not really what I ment. I ment how does some one make a clas wrapper or what ever it is called?
Google is your friend

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

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety." --Benjamin Franklin

ok well I had the win32 class wrapper already I just cant get the edit_box control to work in class form
so noboady can tell me how to make the class
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).

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety." --Benjamin Franklin

This topic is closed to new replies.

Advertisement