Stupid newbie needs urgent help =) 
Author Message
 Stupid newbie needs urgent help =)

Hi, I'm just starting to learn VC++ 4.? using plain vanilla win32 api, no
fancy MFC stuff (I have not figured out how all of that stuff works yet).

Im developping a little database program for one of my friends. At startup,
this program will show some kind of window (like a dialogbox or plain
'window') with 4 buttons. These buttons lead to another part of the program
depending on what button is pressed, one for "deleting" posts in the
database, one for searching, one for adding and one for quitting.

Since I've only just started programming for windows, I'm having problems
with this Messageloop thingy. Sure, I've made a few small programs wich all
work fine (with messageloops), but now when I'm trying to create a larger
program using more than one dialog box, I've stumbled into some problems. I
suppose i could probably skip the messageloop compleatly, since all the
dialogs needed to create the program are modal, but that would be bad
style, right?. Another alternative could perhaps be to use nonmodal dialogs
(like those created with CreateDialog), but then I would need a handle to
the currently active dialog in the messageloop for the IsDialogMessage
call, wich leads to further problems - I would have to changle this dialog
handle each time I use a new dialog (like moving from the delete to the
search dialog or something..).
The last non-brilliant idea that just hit me was to use plain windows (not
dialogboxes) throughout the whole program - but hey, how do I use a
dialogresource in a window?

By now, you are probably immensly confused, but all I want to know is how
to implement all my dialogboxes that make up the program.
Thanks in advance.



Fri, 22 Jun 2001 03:00:00 GMT  
 Stupid newbie needs urgent help =)
I don't have an answer to your question, but I would suggest that you learn
MFC.  It's not that difficult, and you wouldn't have to worry about all this
low-level message loop stuff.

-- KDJ

Quote:

>Hi, I'm just starting to learn VC++ 4.? using plain vanilla win32 api, no
>fancy MFC stuff (I have not figured out how all of that stuff works yet).

>Im developping a little database program for one of my friends. At startup,
>this program will show some kind of window (like a dialogbox or plain
>'window') with 4 buttons. These buttons lead to another part of the program
>depending on what button is pressed, one for "deleting" posts in the
>database, one for searching, one for adding and one for quitting.

>Since I've only just started programming for windows, I'm having problems
>with this Messageloop thingy. Sure, I've made a few small programs wich all
>work fine (with messageloops), but now when I'm trying to create a larger
>program using more than one dialog box, I've stumbled into some problems. I
>suppose i could probably skip the messageloop compleatly, since all the
>dialogs needed to create the program are modal, but that would be bad
>style, right?. Another alternative could perhaps be to use nonmodal dialogs
>(like those created with CreateDialog), but then I would need a handle to
>the currently active dialog in the messageloop for the IsDialogMessage
>call, wich leads to further problems - I would have to changle this dialog
>handle each time I use a new dialog (like moving from the delete to the
>search dialog or something..).
>The last non-brilliant idea that just hit me was to use plain windows (not
>dialogboxes) throughout the whole program - but hey, how do I use a
>dialogresource in a window?

>By now, you are probably immensly confused, but all I want to know is how
>to implement all my dialogboxes that make up the program.
>Thanks in advance.



Sat, 23 Jun 2001 03:00:00 GMT  
 Stupid newbie needs urgent help =)

Quote:
>Since I've only just started programming for windows, I'm having problems
>with this Messageloop thingy. Sure, I've made a few small programs wich all
>work fine (with messageloops), but now when I'm trying to create a larger
>program using more than one dialog box, I've stumbled into some problems.

So, what are your problems?

Quote:
>I suppose i could probably skip the messageloop compleatly, since all the
>dialogs needed to create the program are modal, but that would be bad
>style, right?

Not if that's what you want your application to do.

Quote:
> Another alternative could perhaps be to use nonmodal dialogs
>(like those created with CreateDialog), but then I would need a handle to
>the currently active dialog in the messageloop for the IsDialogMessage
>call, wich leads to further problems - I would have to changle this dialog
>handle each time I use a new dialog (like moving from the delete to the
>search dialog or something..).

There's a nice technique for handling this - see Knowledge Base
article Q71450 "Using One IsDialogMessage() Call for Many Modeless
Dialogs".

Quote:
>By now, you are probably immensly confused, but all I want to know is how
>to implement all my dialogboxes that make up the program.

For now, I'd say stick with your multiple modal dialogs. If it fits
what you want, keep it simple and do that.

Dave
----
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.



Sat, 23 Jun 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Newbie - Urgent help needed.

2. Newbie needs urgent help, simple question

3. URGENT! Newbie need help on graphics

4. URGENT URGENT dlopen() help needed...

5. pls help a newbie with stupid string

6. Urgent Help Needed-Calling the help file.

7. Desperately need help with a (probably) stupid question

8. I am stupid, so I need your help

9. URGENT ! HELP NEWBIE plz - easy dialog question

10. URGENT: Stupid Update Problem....

11. Help C newbie need help please

12. Help C newbie need help please

 

 
Powered by phpBB® Forum Software