Re: Passing array argument to constructor

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



dev_15 wrote:

Hi Stuart, thanks for that, i need to use method 2 you suggested as
CReportScreen is a modal dialog. I'm not that experienced on MFC
so how do i pass the the array via lpCreateParams to the CReportScreen
object and where do i pick it up inside the dialog. Basically i'm
sending some
logo bitmap handles that have already been loaded in my main screen
to
a modal dialog (didn't want to unload and reload same images).

Sorry, I confused two concepts here. The CREATESTRUCT is only used by the document/view architecture (where your CView derived classes must have a default constructor because it is the CDocTemplate class that creates your view class).

Plain old dialogs are usually created by your code, so you can use whatever constructors you like (in contrast to views, dialogs do not have to use the DECLARE_DYNCREATE macro).

Please consider all I have written in the last posting non-sense. All you have to do is to swap the parameters of your constructor, so that the pointer to the parent window is the second parameter.

Regards,
Stuart
.



Relevant Pages

  • Re: s4u2proxy
    ... What happens if you use the constructor that just takes the UPN? ... actually sure what the second parameter does in the other constructor (docs ... Joe K. ... call works fine if I take out the impersonate, (but then I am running as ...
    (microsoft.public.dotnet.security)
  • Re: JavaMail Question
    ... Use a FileInputStream and provide it to the constructor of MimeMessage ... that takes an InputStream as the second parameter. ...
    (comp.lang.java.programmer)
  • Overloading/Overriding Dialog Constructor
    ... I have an application where i want 2 dialogs to share the same class. ... Can anyone tell me the best way to overload / override a dialog constructor? ...
    (microsoft.public.vc.mfc)
  • Re: Passing in different int context on same signature?
    ... You know it is an employee if this constructor is used: ... Class1(int employeeid, int justaflagforemployee) ... second parameter. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: How does the constructor of vector work?
    ... >> Yes but it calls the copy constructor. ... >> The second parameter Ais copied into each of the vector elements. ... You could use a for loop ...
    (comp.lang.cpp)