....i didn't want to do this, but it looks like i need to in order to move forward.

i'm going to have to ask a win32 SDK question....

only had one more feature to add before posting for early feedback, should have taken 5 minutes..



alright - my app has a main window. a dialog is selected from the menu to set height field params. i wanted to create a second dialog that also opens from the menu to set params associated with water. i haven't created a windows app with mor ethan one ancillary dialog before.

despite providing a unique name for *every* variable associated with the 2nd dialog, when it opens it displays the same gui as the first dialog. i can't seem to discretise it, even by going to silly lengths to provide a different name for everything.

certainly, i understand it less now than i did an hour ago (...)


so.... perhaps someone can guess where i've erred from that. otherwise, here's the horrible-to-pick-through code... as you'll observe, every hwnd et c. has it's own silly name... i've also tried using different #'s for the WNDCLASSEX wwc = {0}; statement to no avail. it compiles, it just shows the same panel on both dialogs.


Code:
/////////////////////////////////////////////////////////////////
////////////////	HEIGHT FIELD DIALOG
/////////////////////////////////////////////////////////////////

LRESULT CALLBACK HFDlgProc( HWND hdlg, UINT msg, WPARAM wParam, LPARAM lParam ) {
	hhfdlg = hdlg;
	HDC         hdc;
	PAINTSTRUCT ps;
	HFONT		hfont;

	INITCOMMONCONTROLSEX InitCtrlEx;	//	for progress bar
	InitCtrlEx.dwSize = sizeof(INITCOMMONCONTROLSEX);
	InitCtrlEx.dwICC  = ICC_PROGRESS_CLASS;
	InitCommonControlsEx(&InitCtrlEx);

	switch(msg) {
//DELETED DOESN'T MATTER
	}
	return (DefWindowProc(hdlg, msg, wParam, lParam));
}

void RegisterHFDlgClass(HWND hwnd) {
  WNDCLASSEX wc = {0};
  wc.cbSize           = sizeof(WNDCLASSEX);
  wc.lpfnWndProc      = (WNDPROC) HFDlgProc;
  wc.hInstance        = ghInstance;
  wc.hbrBackground    = GetSysColorBrush(COLOR_3DFACE);
  wc.lpszClassName    = TEXT("DialogClass");
  RegisterClassEx(&wc);
}

void CreateHFDlgBox(HWND hwnd) {
  CreateWindowEx(WS_EX_DLGMODALFRAME | WS_EX_TOPMOST,  TEXT("DialogClass"), TEXT("Height Field"),
        WS_VISIBLE | WS_SYSMENU | WS_CAPTION , 0, 21, 192, 285,
        NULL, NULL, ghInstance,  NULL);
}










/////////////////////////////////////////////////////////////////
////////////////	WATER DIALOG
/////////////////////////////////////////////////////////////////

LRESULT CALLBACK WaterDlgProc( HWND hwdlg, UINT msg, WPARAM wParam, LPARAM lParam ) {
	HDC         hdc;
	PAINTSTRUCT ps;
	HFONT		hfont;

	switch(msg) {
//DELETED DOESN'T MATTER
	}

	return (DefWindowProc(hwdlg, msg, wParam, lParam));
}






void RegisterWaterDlgClass(HWND hwwnd) {
  WNDCLASSEX wwc = {0};
  wwc.cbSize           = sizeof(WNDCLASSEX);
  wwc.lpfnWndProc      = (WNDPROC) WaterDlgProc;
  wwc.hInstance        = whInstance;
  wwc.hbrBackground    = GetSysColorBrush(COLOR_3DFACE);
  wwc.lpszClassName    = TEXT("DialogClass");
  RegisterClassEx(&wwc);
}

void CreateWaterDlgBox(HWND hwwnd) {
  CreateWindowEx(WS_EX_DLGMODALFRAME | WS_EX_TOPMOST,  TEXT("DialogClass"), TEXT("Water"),
        WS_VISIBLE | WS_SYSMENU | WS_CAPTION , 0, 306, 192, 285,
        NULL, NULL, whInstance,  NULL);
}