| | |
Win32 - Controls on main window
Please support our C++ advertiser: Programming Forums - DaniWeb Sister Site
![]() |
during the window's initialization, use the control's Create function, in which you specify the parent HWND, RECT containing the location and height, and the control's ID, among other things. The instance object of the control must NOT be local to a function, but global in the c++ class or program file in which it is used because it must stay in scope during the lifetime of the window.
•
•
Join Date: Aug 2005
Posts: 188
Reputation:
Solved Threads: 3
Oh also, do you have any good links on where I can get lists of styles etc for dialog boxes (Im not sure what they are called) and all fo the other kinds of controls etc for example...
C++ Syntax (Toggle Plain Text)
DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU MB_OK | MB_ICONERROR //and lots more...
well, if the number of controls is small, using global variables is okay. but i prefer to create them locally inside the create function and then use GetDialogItem API to get the handles of the controls when i need them. this eliminates the need of global window handles and makes the program less messy.
the best site regarding the apis is the msdn site itself.
Individual Controls
dialogs
The list of values can be obtained in CreateWindow
as for specyfing the design of the window like a dialog box, i have found a way to do that yet using a resource editor.
the best site regarding the apis is the msdn site itself.
Individual Controls
dialogs
The list of values can be obtained in CreateWindow
as for specyfing the design of the window like a dialog box, i have found a way to do that yet using a resource editor.
•
•
Join Date: Aug 2005
Posts: 188
Reputation:
Solved Threads: 3
Hello again guys, I am having a lot of trouble simply setting the properties of controls on a dialog box, for example setting a command button to enabled and disabled, i have spent hours on msdn looking for ways of doing this but i still manage to get confused....also what is CView and CFormView and do you have any links to download a free decent resource editor? thanks.
![]() |
Other Threads in the C++ Forum
- Previous Thread: How to "delete" this memory???
- Next Thread: File array question
Views: 6417 | Replies: 10
| Thread Tools | Search this Thread |
Tag cloud for C++
6 api application array arrays assignment beginner binary bitmap c++ c/c++ calculator char class classes code coding compile compiler console conversion convert count data database delete developer display dll email encryption error file forms fstream function functions game generator getline givemetehcodez graph homeworkhelper iamthwee ifstream image input int integer java lazy lib loop looping loops map math matrix memory multidimensional multiple newbie news node number output parameter pointer problem program programming project proxy python random read recursion recursive reference return sort string strings struct template templates text tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






