Click here to Skip to main content
15,888,579 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello all,

so I created a modeless dialog to display some results that update periodically (via resource script). I know that I can get the handle of the dialog by FindWindow("#32772","Results"). But, I want to make the class name to my modeless dialog box unique. I tried adding CLASS "MyClassName" to my resource file and then re-register the class by filling the WNDCLASS structure (with the needed wc.cbWndExtra = 30) and calling RegisterClass and them call CreateDialog with the new class name. However, this always returns the NULL handle. Otherwise, I can keep the default class name and call:

hwndDlg = (HWND)CreateDialog(hInst, MAKEINTRESOURCE(IDRESULTS),
hwnd, DlgResultsProc),

which works fine (absent the CLASS "MyClassName").
Could someone present a solution doing this in C?

Thanks,

John
Posted

1 solution

See this MSDN Documentation[^] on creating custom dialog boxes.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900