Jump to content
  • Advertisement
Sign in to follow this  

PropertyGrid / PropertySheet

This topic is 2334 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi everyone,

I'm currently making a scene editor with c++ and winapi.

I'd like to make a property grid / sheet in native c++ like in c# (or like in the Visual Studio, the Property Window). I've searched by google and I've found that the PROPSHEETHEADER and the PROPSHEETPAGE are the only (?) way.
I have a main window and I have a groupbox in it. I'd like to put my property sheet into that box (I know the handle of the gb). Here is my first try:

void PropertyGrid::CreateDummy(const HWND& _parent)
HINSTANCE hInstance = (HINSTANCE)GetWindowLong(_parent, GWL_HINSTANCE);

memset(&propSheet, 0, sizeof(PROPSHEETHEADER));
memset(pages, 0, sizeof(pages));

pages[0].dwSize = sizeof(PROPSHEETPAGE);
pages[0].dwFlags = PSP_DEFAULT;
pages[0].hInstance = hInstance;
pages[0].pszTitle = "page 1";

propSheet.dwSize = sizeof(PROPSHEETHEADER);
propSheet.dwFlags = PSH_PROPSHEETPAGE;
propSheet.hwndParent = _parent;
propSheet.hInstance = hInstance;
propSheet.nPages = sizeof(pages) / sizeof(PROPSHEETPAGE);
propSheet.ppsp = (LPCPROPSHEETPAGE)pages;

int ret = PropertySheet(&propSheet);

I want to see an empty property grid, but I can't see anyting.

I hope you could help me,

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!