Click here to Skip to main content
16,007,885 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Multi language Pin
Scott H. Settlemier29-Jun-02 6:20
Scott H. Settlemier29-Jun-02 6:20 
GeneralMessageBox problem - only flashes Pin
David Viggiano28-Jun-02 10:38
David Viggiano28-Jun-02 10:38 
GeneralRe: MessageBox problem - only flashes Pin
Jason Henderson28-Jun-02 16:24
Jason Henderson28-Jun-02 16:24 
GeneralHelp me>>>>>>>>>>>>>>>> Pin
Michael Liu28-Jun-02 8:36
Michael Liu28-Jun-02 8:36 
GeneralRe: Help me>>>>>>>>>>>>>>>> Pin
Mike Nordell28-Jun-02 8:46
Mike Nordell28-Jun-02 8:46 
GeneralRe: Help me>>>>>>>>>>>>>>>> Pin
Jason Henderson28-Jun-02 16:23
Jason Henderson28-Jun-02 16:23 
GeneralRe: Help me>>>>>>>>>>>>>>>> Pin
Christopher Lord28-Jun-02 20:45
Christopher Lord28-Jun-02 20:45 
GeneralProblem with Buttons in Child Windows Pin
AndyO28-Jun-02 7:34
AndyO28-Jun-02 7:34 
Hi. I am trying to create a configuration dialog for an application I am writing. It is (or at least will be) fairly complex, so I cannot fit all the configuration options in one dialog. So, I made the configuration dialog have a list box on the left side of the window, which lists different "sections" of the application. Depending on which section you have selected in the list box, the options on the right side of the dialog change.

One way I could have done this would have been to put all the controls for all the sections in the same dialog, and use ShowWindow() to show some and hide others depending on what is selected in the list box. I've done this before, and it's a big hassle. So, this time, I thought I would put the controls for each section into their own dialogs. I could then would only have to show and hide the dialogs. The dialogs would be child windows of the main configuration dialog.

To test this idea, I made the configuration dialog, which only has the list box, and "Ok" and "Cancel" buttons. The list box does nothing right now. In response to WM_INITDIALOG, it uses CreateDialog() to make the child dialog (and there's only 1 right now). I made a test child dialog which only consists of a few buttons, which do nothing. However, I am getting a weird issue when you click the buttons... after clicking them, they get thick, like a default button does, and stay that way.

To make it easier to understand what I'm saying, I made a little webpage with pictures demonstrating what happens when you click the buttons:

http://serialgaming.com:8080/nnirc/

I also tried deleting the manifest and using regular Windows95 buttons, and the same problem occurs.

I have spent many, many hours trying to get this working. I've looked throughout the web (including things on this website), but the only programs I could find which did something similar to mine were written in MFC (I'm not using MFC.)

Here's the code I'm using to create the dialogs:

To create the main, modal configuration dialog:
DialogBox(hInst, MAKEINTRESOURCE(IDD_CONFIGURE), hWnd, ConfigureDlgProc);

To create the child, modeless dialog (this is in WM_INITDIALOG of ConfigureDlgProc):
hDlg = CreateDialog((HINSTANCE)hInst, MAKEINTRESOURCE(IDD_TEST), hWnd, TestDlgProc);
ShowWindow(hDlg, SW_SHOW);

Here is the child modeless dialog's window procedure:

BOOL CALLBACK TestDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_INITDIALOG:
return true;
case WM_COMMAND:
switch (LOWORD(wParam))
{
case IDOK:
EndDialog(hWnd, IDOK);
break;
case IDCANCEL:
EndDialog(hWnd, IDCANCEL);
break;
}
break;
}
return false;
}

If you have any idea what's wrong, I'd really appreciate it. This has really baffled me more than any other problem I've ever had programming. Or, alternatively, if you have non-MFC source for a program that does something similar, I'd really appreciate it if you can show it to me.

Thank you for the help.

- Andy Oxfeld (andy@serialgaming.com)
GeneralOnly one column in reportview listcontrol Pin
ns28-Jun-02 6:44
ns28-Jun-02 6:44 
GeneralRe: Only one column in reportview listcontrol Pin
Mike Nordell28-Jun-02 8:38
Mike Nordell28-Jun-02 8:38 
GeneralRe: Only one column in reportview listcontrol Pin
ns28-Jun-02 8:57
ns28-Jun-02 8:57 
GeneralRe: Only one column in reportview listcontrol Pin
Shog928-Jun-02 10:23
sitebuilderShog928-Jun-02 10:23 
QuestionHow to remove the title bar from CFormView in MDI? Pin
ns28-Jun-02 6:31
ns28-Jun-02 6:31 
AnswerRe: How to remove the title bar from CFormView in MDI? Pin
ns28-Jun-02 7:34
ns28-Jun-02 7:34 
GeneralOverwriting COM interface Pin
28-Jun-02 6:02
suss28-Jun-02 6:02 
GeneralCommunication between windows Pin
solosnake28-Jun-02 5:55
solosnake28-Jun-02 5:55 
GeneralRe: Communication between windows Pin
Hans Ruck28-Jun-02 6:01
Hans Ruck28-Jun-02 6:01 
GeneralRe: Communication between windows Pin
solosnake28-Jun-02 6:21
solosnake28-Jun-02 6:21 
GeneralRe: Communication between windows Pin
28-Jun-02 6:02
suss28-Jun-02 6:02 
GeneralRe: Communication between windows Pin
solosnake28-Jun-02 6:21
solosnake28-Jun-02 6:21 
GeneralRe: Communication between windows Pin
Alexandru Savescu28-Jun-02 8:12
Alexandru Savescu28-Jun-02 8:12 
GeneralRe: Communication between windows Pin
solosnake28-Jun-02 22:21
solosnake28-Jun-02 22:21 
GeneralDynamic creating a Object Pin
RuiSantiago28-Jun-02 5:33
RuiSantiago28-Jun-02 5:33 
GeneralRe: Dynamic creating a Object Pin
Michael Dunn28-Jun-02 16:49
sitebuilderMichael Dunn28-Jun-02 16:49 
Generalsema_t equivalent for Visual C Pin
Steven Gregg28-Jun-02 4:57
Steven Gregg28-Jun-02 4:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.