Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dialog box stopped working

Status
Not open for further replies.

jennyy

Programmer
Jan 9, 2003
8
US
Help! Using Visual C++ .net: My dialog box (IDD_EXPERIMENT_OPTIONS) was working just fine and I swear I didn't touch any of its portion of the code (uh-huh sure), and all of a sudden it stopped working (gasp)! I've even restored saved copied of correct old code, and those aren't working anymore either. Below are the relevant portions of the code:

The function ExperimentOptions is being called but it never gets the WM_INITDIALOG message, and the window is never shown. I have an about box that still works that is left over from the WinMain "hello world" code. But why has my ID_EXPERIMENT_OPTIONS dialogue box stopped displaying??? (In addition as a side note, the single character underlinings in the menus of my app dont show anymore until I press ALT)!!!!!!! need help!!!!

LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
int wmId, wmEvent;
PAINTSTRUCT ps;
HDC hdc;
TCHAR szHello[MAX_LOADSTRING];
LoadString(hInst, IDS_HELLO, szHello, MAX_LOADSTRING);

switch (message)
{
case WM_COMMAND:
wmId = LOWORD(wParam);
wmEvent = HIWORD(wParam);
// Parse the menu selections:
switch (wmId)
{
case ID_EXPERIMENT_OPTIONS:
DialogBox(hInst, (LPCTSTR)
IDD_EXPERIMENT_OPTIONS,
hWnd, (DLGPROC)ExperimentOptions);
break;
//code removed here

LRESULT CALLBACK ExperimentOptions(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{

switch (message)
{
case WM_INITDIALOG:
InitializeOptions(hDlg);
LoadAllOptions(hDlg, this_total_iterations,
this_lp);
return TRUE;
case WM_COMMAND:

//code removed here
 
Hi Jenny, did you check that the resource ID is still valid in the resource.h file? If you're using Visual C++ then go under the 'View' menu to 'Resource Symbols' and check the ID and number there. Try substituting the resource ID for the actual number in your code - if it works then you probably got a cross reference in your resource.h file.
As for the underlines... I'm pretty sure this is a system wide setting. Perhaps you changed your system settings without realizing it? Does it do this with all applications or just the one you're writing?
tellis.gif

programmer (prog'ram'er), n A hot-headed, anorak wearing, pimple-faced computer geek.
 
Hi Jenny,

To answer the first part:
Just check the Dialog Properties and find out whether the Property "Visible" is Checked or no.

And for the Second Part:
1. Right click on the desktop
2. Select Properties->Effects
and check whether "Hide keyboard navigation indicators until I use the Alt Key" option is checked. If it is then thats the Answer to your side note :)

Hope this answers you question as well as solves your problem.

NJoy,
Sun
 
Visible was checked, and it the menu box still didn't show. The weird part is that when I added an open file dialog box, suddenly the broken menu box started appearing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top