Jump to content
  • Advertisement
Sign in to follow this  
nuclear123

Wierd Dialogbox Problem

This topic is 2550 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

dllmain()
{
....
...
DialogBox( hModule, MAKEINTRESOURCE(IDD_DIALOGHACK), NULL,(DLGPROC) MenuProcedure);
...

....
}

BOOL CALLBACK MenuProcedure(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
switch(message)
{
case WM_INITDIALOG:
{
return TRUE;
}
return FALSE;
}

}




Resource Script
------------------------------



/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//

IDD_DIALOGHACK DIALOGEX 0, 0, 316, 183
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Dialog"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "Show/Hide Bombs",ID_BOMBTOGGLE,25,25,74,14
DEFPUSHBUTTON "Autowin",ID_AUTOWIN,26,46,72,14
DEFPUSHBUTTON "Edit Scoreboard",ID_EDITSCOREBOARD,28,73,69,14
DEFPUSHBUTTON "Reset Timer",ID_RESETTIMER,27,99,69,14
DEFPUSHBUTTON "Freeze Timer",ID_FREEZETIMER,30,124,69,14
DEFPUSHBUTTON "Start Timer",ID_STARTTIMER,27,150,69,14
END


/////////////////////////////////////////////////////////////////////////////



What it looks like in editor

http://imageshack.us/photo/my-images/408/captureop.jpg/

What it looks like when i actually run the program

http://imageshack.us/photo/my-images/708/capture1yk.jpg/

any idea on what im doing wrong or why it looks messed up? thanks

NOTE: my program is compiled into a DLL and is to be injected at runtime into another application.

Share this post


Link to post
Share on other sites
Advertisement
I think your return FALSE is in a bad spot for starters. How about making it default case or taking it out f the case/switch entirely? Did you fix your WM_PAINT problem from the previous post?

Share this post


Link to post
Share on other sites
yea the previous problem i simply forgot a beginpaint/endpaint =[

BTW i fixed the problem....i took the dialogbox creation code out of the dllmain and stuck in a new thread

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!