(API) Right Positioned Dialogs?

API newbie, been writing a program using info from online tutorials etc. I am now working on a modeless child dialog box that I would like to be attached to the right side of the main window.

I've been designing my dialogs using the graphical editor in VC6, but I can't seem to find a way to achieve the right positioning style of my dialog (and I don't mean the "right-aligned" dialog option for text and such).

What I do know is how to adjust an MDI window's size in WinProc's WM_SIZE case, where I calculate certain parameters (parent window size, toolbar size) to alter the MDI window's size.

I tried the same approach using my DIALOG:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
LRESULT CALLBACK WndProc(...)
{
...
CASE WM_SIZE:
{
...

   HWND hDlg;
   RECT rcClient;

   GetClientRect(hwnd, &rcClient);
   Height = // ...
   Width = //...

   hDlg = GetDlgItem(hwnd, DIALOG);
   SetWindowPos(hDlg, NULL, etc ..., SWP_NOZORDER);
}


But while this works fine for my MDI windows, which are created within my program, this method has no effect on my DIALOG.

Something I'm missing?


Topic archived. No new replies allowed.