Menu

#335 TPrintDialog constructor no longer accepts integer resource identifiers (regression in 6.32)

6.36
closed
1
2026-04-03
2016-02-06
No

While adding string support to TPrintDialog [r513], the ability was lost by which the constructor parameters printTemplateName and setupTemplateName accepted an integer resource identifier masquerading as a string pointer (typically created by the MAKEINTRESOURCE macro). This change may cause legacy code to crash.

Workaround: Use a true string as the dialog template identifier in your resource file. Or manually circumvent the problem in a derived class.

See [discussion:09f652cb].

Related

Commit: [r513]
Discussion: 09f652cb
Discussion: Print template for TPrintDialog
Discussion: PrintDialog is crashing
Wiki: Frequently_Asked_Questions
Wiki: OWLNext_Stable_Releases

Discussion

  • Vidar Hasfjord

    Vidar Hasfjord - 2016-02-09
    • status: open --> pending
    • Group: unspecified --> 7
     
  • Vidar Hasfjord

    Vidar Hasfjord - 2016-02-09

    To circumvent this problem for affected versions (version >= 6.32 && version < 6.36 || version >= 6.40 && version < 6.44), change your resource file to use a true string as your dialog template identifier. For example:

    :::C++
    // Replace this:
    
    #define IDD_PRINT 123
    
    // by this:
    
    #define IDD_PRINT _T("IDD_PRINT")
    


    Alternatively, you can derive a new class from TPrintDialog, and then manually circumvent the problem in the constructor of your new class. See [discussion:09f652cb] for example code.

     

    Related

    Discussion: 09f652cb


    Last edit: Vidar Hasfjord 2017-01-10
  • Vidar Hasfjord

    Vidar Hasfjord - 2017-01-10
    • Group: 7 --> 6.36
    • status: pending --> open
     

    Last edit: Vidar Hasfjord 2017-01-10
  • Vidar Hasfjord

    Vidar Hasfjord - 2017-01-10
    • status: open --> pending
     
  • Vidar Hasfjord

    Vidar Hasfjord - 2017-01-15
    • Status: pending --> closed
     
  • Vidar Hasfjord

    Vidar Hasfjord - 2026-04-03
    • labels: API, Crash, Strings --> API, Crash, Strings, Regression
     
  • Vidar Hasfjord

    Vidar Hasfjord - 2026-04-03

    The fix for this issue was released in OWLNext 6.36.0 and OWLNext 6.44.0.

     

Log in to post a comment.

MongoDB Logo MongoDB