BeefJerky8732
asked on
How to create ::DialogBoxIndirectParam( ) 2nd parameter
How do I create the second parameter in ::DialogBoxIndirectParam function?
I need a Win32 method that will work on VC++ and Bordland C++ which will create the DLGTEMPLATE parameter for DialogBoxIndirectParam.
Please NO MFC or VC++ IDE methods. I need a method that is code only, and I need to know the signaficants of the values entered.
This is related to the following question:
https://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=cplusprog&qid=20189278
Thanks in advance
I need a Win32 method that will work on VC++ and Bordland C++ which will create the DLGTEMPLATE parameter for DialogBoxIndirectParam.
Please NO MFC or VC++ IDE methods. I need a method that is code only, and I need to know the signaficants of the values entered.
This is related to the following question:
https://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=cplusprog&qid=20189278
Thanks in advance
Here is a class that is overkill for your needs (simple InputText box), so I did not mention it in the previous Q.
http://www.codeguru.com/dialog/DynDlg.html
Also there is a sample in MSDN I did not review:
Dialog Templates in Memory (Q155257)
http://support.microsoft.com/support/kb/articles/Q155/2/57.asp
And of course, it is thoroughly documented in MSDN. These two links:
http://msdn.microsoft.com/library/en-us/winui/dlgboxes_8nzm.asp
and
http://msdn.microsoft.com/library/en-us/winui/dlgboxes_971u.asp
...describe all that you need to know.
-- Dan
http://www.codeguru.com/dialog/DynDlg.html
Also there is a sample in MSDN I did not review:
Dialog Templates in Memory (Q155257)
http://support.microsoft.com/support/kb/articles/Q155/2/57.asp
And of course, it is thoroughly documented in MSDN. These two links:
http://msdn.microsoft.com/library/en-us/winui/dlgboxes_8nzm.asp
and
http://msdn.microsoft.com/library/en-us/winui/dlgboxes_971u.asp
...describe all that you need to know.
-- Dan
And I did no mention how I got the data for the previous Q: I just used the dialog editor to create a dialog box. Then ran the program and used:
HRSRC hrsrc = ::FindResource(NULL, MAKEINTRESOURCE(IDD_DIALOG 1), RT_DIALOG);
DWORD nSize= SizeofResource( NULL, hrsrc );
HGLOBAL hglb = LoadResource( NULL, hrsrc);
DLGTEMPLATE * prDT= (DLGTEMPLATE *)LockResource(hglb);
Then I used the binary memory viewer to get the hex codes for the data. Also I found that the value of nSize was larger than necessary.
-- Dan
HRSRC hrsrc = ::FindResource(NULL, MAKEINTRESOURCE(IDD_DIALOG
DWORD nSize= SizeofResource( NULL, hrsrc );
HGLOBAL hglb = LoadResource( NULL, hrsrc);
DLGTEMPLATE * prDT= (DLGTEMPLATE *)LockResource(hglb);
Then I used the binary memory viewer to get the hex codes for the data. Also I found that the value of nSize was larger than necessary.
-- Dan
ASKER
The Master,
>>Second, it sounds like you're asking for someone to
>>write a function for you to generate a DLGTEMPLATE
>>in memory from scratch.
No where in my question did I ask for a function to be generated.
>>See the documentation for DLGTEMPLATE in MSDN for more
>>info.
The MSDN site provides almost the same information that you get in the VC++ help file.
Both the MSDN site and the help file do not explain how to create the required parameter.
If you don't know the answer, then don't participate, because this type of input is not useful nor desired.
>>Second, it sounds like you're asking for someone to
>>write a function for you to generate a DLGTEMPLATE
>>in memory from scratch.
No where in my question did I ask for a function to be generated.
>>See the documentation for DLGTEMPLATE in MSDN for more
>>info.
The MSDN site provides almost the same information that you get in the VC++ help file.
Both the MSDN site and the help file do not explain how to create the required parameter.
If you don't know the answer, then don't participate, because this type of input is not useful nor desired.
ASKER
Dan,
I'll review the links and get back to you.
I'll review the links and get back to you.
hi BeefJerky8732,
Do you have any additional questions? Do any comments need clarification?
-- Dan
Do you have any additional questions? Do any comments need clarification?
-- Dan
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Second, it sounds like you're asking for someone to write a function for you to generate a DLGTEMPLATE in memory from scratch. That's not only a fairly tedious task, but the function would completely depend on what you wanted the dialog to look like. A DLGTEMPLATE is just a block of memory in a certain format - and what it looks like depends on the number of controls in the dialog, the type of controls in the dialog, whether or not the dialog has a menu, etc.
See the documentation for DLGTEMPLATE in MSDN for more info.
Good luck!