Sign in to follow this  
Renegadeandy

C++ Dialog problem!

Recommended Posts

Ok! This is a biggy so bare with me! You may need this file: http://files-upload.com/271503/UpsetPC.zip.html In order to understand this problem, in fact you most definately will need it! Right, so I have a project, it currently has a GUI-RESOURCE.cpp file and a .rc file linked with this using Dialog Controls. This all worked fine - compile and run the gui-resources.cpp file and the program is fine. Now i decided to use an already developed chat application as part of my original UpsetPC project. So i simply included the resources and various source files and all now compiles fine with a bit of name changing etc *that was hell*. Now, the crooks of the problem are as follows: In gui-resources.cpp there is a handle for IDC_CHATCALL, which when clicked should * and i mean, i want it to * open the IDD_CLIENT form which is in the second .rc file which i have included in the project. This currently is not the case and does not work. I am a beginner with Dialog and there is code there, which i believe to be correct - but im probably missing something obvious. Could somebody please download that file, have a look inside the Example folder where all the source is , and give me another pair of eyes to help with this problem! Thanks very much in advance, Andy

Share this post


Link to post
Share on other sites
A lot of people here will not download a random zip file off the internet. Use source tags (see FAQ) and post the code. It's not a lot of work but it will result in you getting more replies.

Share this post


Link to post
Share on other sites
The download link didn't work.

Your best bet is to step through the code with the debugger and see where it goes wrong.

Share this post


Link to post
Share on other sites
dam it must have gone out of date - i will reload it up in next 45 mins when i get home if you could check back thatd be great. Its not crashing though, its just not working thats the problem! It aint a huge problem, im just inexperianced in this field!

I would be very appreciated towards anyone who can help me when i get back and reload it!

I will keep you posted!

Andy

Share this post


Link to post
Share on other sites
The problem is that you're not exactly making it easy for people to help.

Saying "here's the program, please fix my problem" isn't the best way to get help.
People here aren't paid tech supporters.
Anyone who even reads this thread are doing you a favor.

Asking people to download a random file off the internet(which they have to wait 30 seconds to be able to download, even, and then wait a further 10+ minutes because of the insanely slow host you uploaded it to), run it, see if they can guess what particular problem you're worried about, guess at how it was coded, guess at what a solution might and explain it to you.... might just be a bit more work than most people are willing to put into it. [grin]

If you want help with your problem, you either have to
A: Be extremely lucky and run into someone who doesn't mind doing *a lot* of work to help you, or
B: Be specific about your problem.

You've tried A without much luck... Time for option B then. [wink]
So, exactly what are you trying to do?
Exactly how are you trying to do it? (show relevant code snippets)
What happens when you try it? (And "it's just not working" isn't a very helpful error description)
What have you done to trace down the problem?

The more specific you can be, the easier it is for people to help you, and the easier it is for people to help you, the more inclined people will be to help you.

Share this post


Link to post
Share on other sites
his problem is he doesn't know how to use WM_COMMAND correctly (it took more than 30 secs to download tho, lol a 5 MB file dling at 7 KB/s i can just strangle the crazy kid). next time just post your wndproc code!

for WM_COMMAND to respond to control identifiers he is using:


if(wParam==MAKEWPARAM(IDC_CHATCALL,BN_CLICKED)){
// handle message
}


should be something like


if(LOWORD(wParam)==IDC_CHATCALL){
// handle message
}


EDIT: ah you're right Endurion lol, now that i think about it the WM_COMMAND code should still work, it's just a strange way of doing the same thing.

[Edited by - yadango on June 16, 2007 3:06:33 PM]

Share this post


Link to post
Share on other sites
The problem is (quite) easy: You've got a rich edit text box in the dialog. If you don't load the richedit dll the dialog cannot be created.

Put the line LoadLibrary( "Riched32.dll" ); somewhere before the CreateDialog call or better once at app start.

The hint yadango gave is a good one; it does not make a difference this time though.

Hint: If you put up the source next time remove unnecessary files line the .ncb (a whopping 13 MB!).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this