Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Creating a dialogbar-> How to make a pointer to it?

This topic is 5589 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

I am using a dialog bar in my application, but my problem is I created it like this: m_hDlg = CreateDialog(m_hInstance, MAKEINTRESOURCE(IDD_TOOLBAR), m_hWnd, (DLGPROC)ToolbarProc); Now I want to read out values from buttons, etc. But since I don''t have a pointer to the dialogbar it doesn''t work too well. (Although there are ways around this) So my question is how do I get a pointer to the dialogbar so I can edit/read the values much easier? I really want to get this to work because handling the dialogbar is really a pain without it. Thanks in advance! | Panorama 3D Engine | Contact me | | MSDN | Google | SourceForge |

Share this post

Link to post
Share on other sites
Create a wrapper around the HWND. Maybe something like: (sorry, I can''t force myself to use Humgarian)


class DialogBar {
HWND hwnd;
DialogBar(HWND parent, HINSTANCE inst, int id);
WNDPROC ToolbarProc;
//Other logical functions to accomplish what you want



DialogBar::DialogBar(HWND parent, HINSTANCE inst, int id) :
hwnd(NULL) {

hwnd = CreateDialog(inst, MAKEINTRESOURCE(id), parent,
if (!hwnd) throw (something);

Hope this helps

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!