Re: CDialog contructor with nIDTemplate

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



You are suggesting that you are doing this in a DLL. Regular or extension? You need to
give a bit more context to make it an intelligible question. Where does this get
instantiated, for example? Is it or is it not in a DLL? Are you sure the template is in
the resources? There is not enough context here ot answer the question.
joe

On 14 Jun 2006 15:28:55 -0700, "Patanish" <anishpatankar@xxxxxxxxx> wrote:

Hi,

I have a dervied class from CDialog. In the constructor for that
derived class, I call -
CMyDlg::CMyDlg(CWnd* pParent ) : CDialog(IDD_FC_SPLASHSCREEN, pParent)

In the CDialog contructor, however the template is not found.
m_lpszTemplateName = MAKEINTRESOURCE(nIDTemplate);

The nIDTemplate (some int value) is the correct one defined in the
resource.h file, which is included in the project. The code compiles
and links fine.
But the m_lpszTemplateName remains null in the constructor and hence
the DoModal call on CMyDlg fails as well!

What is being done wrong here? I also tried using the AFX_MANAGE_STATE
macro, but that does not help (all code in the same dll)...

Please advise...
Thanks in advance,
Anish.
Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.



Relevant Pages

  • Re: Simple inheritence question
    ... by eliminating 'bool b' from the constructor in the second example and letting the constructor set the value of is_blank based upon the value of letter. ... Note that with DbC, we can put a contract on the constructor that keeps the input to the constructor within the bounds, or a space. ... The problem with the DbC approach is that one has to make an evaluation of whether there will be an inconsistency in the data _in every access context_ whenever there is a change to the way the data is modified. ... If one eliminates the dependency via normalization that complication is /never/ an issue so it doesn't even need to be considered during DbC analysis. ...
    (comp.object)
  • ATAPI Driver Issue WinCE 6.0
    ... prefix DSK, index 1, dll atapi.dll, context 0xd02ccf68 ...
    (microsoft.public.windowsce.platbuilder)
  • Re: CEPC image not getting loaded?
    ... 0x83fd1b20: DEVICE!LaunchDevice: Init() failed for device 0x0004ba00 ... 0x83ec8d2c: PCCARD: DEBUGCHK failed in file ... index -1, dll pcmcia.dll, context 0x625f6e8 ...
    (microsoft.public.windowsce.embedded)
  • RE: WinCE 5.0 CEPC image: Loading but not Booting.
    ... 0x83fd1b20: DEVICE!LaunchDevice: Init() failed for device 0x000474d0 ... 0x83ee49ac: PCCARD: DEBUGCHK failed in file ... index -1, dll pcmcia.dll, context 0x620f6e8 ...
    (microsoft.public.windowsce.embedded)
  • Re: BSP bringup in WinCE 6.0
    ... prefix DSK, index 1, dll atapi.dll, context 0xd02ccf68 ...
    (microsoft.public.windowsce.platbuilder)