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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SDI application

Status
Not open for further replies.

mpsoutine

Programmer
Jan 6, 2003
87
US
Hi,

Could anyone please explain the procedure for having a dialog box appear in the client area of a SDI application when the application is executed. I created the SDI application and a sample

Thanks,

MPSoutine
 
mpsoutine,

I'm assuming that when you say "appear in the client area", you mean as a child window.

If you are using MFC and the document/view model, use a CFormView as your view class.

If you aren't using MFC, then simply create the dialog after creating the SDI client window.

[tt]// after creating SDI client
HWND hwndDialog = CreateDialogParam(hInstance,
MAKEINTRESOURCE(IDD_BLAH),
hwndSDIClient,
&BlahDlgProc,
0);
ShowWindow(hwndDialog,SW_SHOW);
[/tt]

Whether or not you're using MFC, you need to make sure the dialig has the WS_CHILD set, and not WS_BORDER.

Will
 
>> exactly
Exactly, where ever you want it to go. It's your program, it's your code, it does whatever you tell it to do.
[bugeyed]

In a command handler generally.

-pete
 
Hi,

Thanks for the tip on the CFormView. I was finally able to add the List Control and buttons.

MPSoutine
 
Hi,

Where does this get set? I checked in the Class Wizard. I was able to add the list control but I can't figure out how to add a cloumn. Any insight.

MPSoutine
 
Hi,

That is where does get set: "Whether or not you're using MFC, you need to make sure the dialig has the WS_CHILD set, and not WS_BORDER."
 
A normal List Box doesn't hold columns. A "list view control" (no relation to CListView whatsoever) gives more versatility as far as columns are concerned, even though they are a little more tricky to use. See the articles in the VC++ Programmers Guide for more info on list view controls.

» Where does this get set?
To set WS_xx styles, use the Properties window in the dialog editor.

Will
 
Hi Will,


Done>>
» Where does this get set?
To set WS_xx styles, use the Properties window
in the dialog editor.

Looking at that now>>

>>VC++ Programmers Guide


Thanks

MPSoutine
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top