开发者

regarding mfc dialog bar

开发者 https://www.devze.com 2022-12-22 21:38 出处:网络
开发者_StackOverflow中文版I am new to MFC and VC++ programming. I have two questions: How do I make a resizable dialog bar?
开发者_StackOverflow中文版

I am new to MFC and VC++ programming. I have two questions:

  • How do I make a resizable dialog bar?
  • How do I give background color for a dockable dialog bar?

Thanks!


So i assume we are working in visual studios 2008 or similar and i assume you have an MFC SDI or MDI application that you are working on.

  • Open the resource viewer (View->resource view).
  • Expand the project that you would like to place the dialog in.
  • Expand to the dialog folder.
  • Right click this folder and click add resource.
  • Expand and add a new dialog bar.
  • Give it any properties you like using the properties window.
  • To (display/ give context) your dialog bar, instantiate and get the handle of the dialog. Like

    GetDlgItem(ID)-> ShowWindow(SW_SHOW);//show

Where ID is the id of the dialog. You can obtain this by going into the resource viewer, right click on the dialog, properties, and the ID is given in there.

0

精彩评论

暂无评论...
验证码 换一张
取 消