|
-
Mar 7th, 2002, 06:34 AM
#1
You create the dialog in the dialog editor and then use the DialogBox function to show the dialog. You also need to write a DlgProc for the dialog and pass it's name to DialogBox.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Mar 7th, 2002, 09:44 PM
#2
PowerPoster
Juz some add on infor,
DialogBox will create a modal dialog and close the dialog with EndDialog(hDlg, LOWORD(wParam));
CreateDialog will create a modaless dialog and close the dialog with DestroyWindow (hDlg);
-
Mar 7th, 2002, 09:52 PM
#3
PowerPoster
Just to clear this up... I have NO experience with windows programming in C++. I don't know how to make windows or anything. I just want to learn how to create a window that I can draw on or print text to. Is the dialog what I want? I saw Vlatko's tutorial type post, and I used that code to create a window, but I didn't know what to do with it. I couldn't even figure out how to change the background color.
-
Mar 8th, 2002, 11:48 AM
#4
Frenzied Member
Well since you dont want to use MFC you have to do that manually. I can tell you are a VB person. I do not want this to sound rude, but once you start doing this it will make you C/C++ life better. STOP THINKING IN VB
Nothing you do in C/C++ from a window stand point is as easy as VB was. You have to do many things yourself. A good example is a button on your window. Its not like VB where you just plop a button down, set your code and be done. In C/C++ (with some exceptions MFC, dialogs, etc) you have to code in your button, you can't just draw it.
Example:
PHP Code:
//Create Run Button
g_hWnd_RunButton = CreateWindow("Button", "Run", BS_PUSHBUTTON | WS_CHILD, 152, 1, 75, 35, g_m_hWnd, (HMENU)ID_RUNCLICK, g_m_hInst, NULL);
Then you have to catch the window message for when the button is clicked and have it fire off the function, code, or whatever you want it to do.
Example:
PHP Code:
switch(message)
{
case WM_COMMAND:
{
switch(LOWORD(wParam))
{
case ID_RUNCLICK: //Run Button Click
{
SENDMSG("Started Running .");
ClientRefresh(); //Refresh The Client Just Encase
At first it is going to seem really hard, but once you get the basics down it will start to click. Then it will get a whole lot easier for you.
MSVS 6, .NET & .NET 2003 Pro
I HATE MSDN with .NET & .NET 2003!!!
Check out my sites:
http://www.filthyhands.com
http://www.techno-coding.com

-
Mar 8th, 2002, 11:51 AM
#5
Frenzied Member
Oh and here are some great tutorials. You might want to start with the C++, then move up to the VC++.
Tutorials
MSVS 6, .NET & .NET 2003 Pro
I HATE MSDN with .NET & .NET 2003!!!
Check out my sites:
http://www.filthyhands.com
http://www.techno-coding.com

-
Mar 8th, 2002, 04:53 PM
#6
PowerPoster
The thing is, I already know C++. I had an AP class last year and we learned all the basics like Arrays and pointers, etc. I can make console programs pretty decent, but you can't really do much with a console program. I want to convert this one program I made from VB to C++ so that it is smaller and easier to distribute to people without the VB runtimes. Thanks for that link to those tutorials. I'll have a look at them.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|