Sign in to follow this  

2008 VC++ Express and Dialog Box Problem

This topic is 3490 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi i have recently been working on a Map Editing program and i used a program of the 3rd party nature to do my dialog box designing in and then loaded it and compiled it via VC++ Express 2008. The problem arises that when the dialog box comes up on the controls are visible.the actual box itself and its system title bar are not there iv tryed a few differnt styles even one or two differnt programs ResEdit is the one i am currently useing is there a problem with the new MVC++ Express 2008 complier and Dialog Boxs or may this be realted to some other reason. Even hand coded resources dialog box's do not load right menus and thing sof that nature seem fine just the templated stuff half loads well sort of. If anyone has had this problem or knows the posible reason please let me know i am not at my home computer right now and can not post source but i will do tommorow as soon as i can it is just driving me nutz right now and causeing abit of sleep loss ... lol yep im that odd. Regards Jouei.

Share this post


Link to post
Share on other sites
As i posted yesterday it was a general question as to wether or not any other pepole were having problems with it and that i would post what i could today.

my dialog proc is just the base

BOOL CALLBACK DialogProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)

with an empty switch as there is nothing needed in it at the time as i still have not figured out why the dialog box itself and only the controls are showen.

The base rc code is as follows

IDD_DLGFIRST DIALOG 260, 200, 188, 95
style DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Options"
FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK", IDOK, 130, 10, 50, 14
END

There were a few more controls i just limited at the moment in time so i don't have to debug as much

i place a call to DialogBox() and pass in all relavinet information and use the marco for resources to fill in the id filed.

Regards Jouei.

Share this post


Link to post
Share on other sites
You do call return FALSE in your DialogProc though?

That was the last time when someone had an invisible dialog, but visible child controls. The DialogProc was returning random values since his return statement was missing for several messages.

To answer your question: No, there shouldn't be any problem with VC 2008 and dialogs. Your child controls show up, so the DialogBox call itself must be correct. It's either the styles in the resource script or the DialogProc.

Share this post


Link to post
Share on other sites
Yes i do return false from the dialog proc as my vc compiler usaly gives me a warning if i don't :p.

it may be something with res edit itself.

Thanks for your time i figured by msdn's refrences and other tutorials i looked up. Just for refrenceing as i have used dialog boxs before just not with 2008 and it all looked fine there is probaly just some small quirk i need to look at or past over ill let you know if i find out the bug in my code i am currently not at home but when i get there ill post the rest of my code for you to look at.

Regards Jouei.

Share this post


Link to post
Share on other sites

This topic is 3490 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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