New IE Window/Tab code from MSDN Library

ajetrumpet

Banned
Local time
Today, 02:28
Joined
Jun 22, 2007
Messages
5,638
i found this page:

http://msdn.microsoft.com/en-us/library/bb762518(VS.85,loband).aspx


however, I am trying to call the function that I have made in a module, but I cannot figure out the FLAGS argument of the function! Can someone shed some light on what this is? I know it is pretty complicated, but I am lost. All I'm really trying to do is get to a point where I can open another tab in IE7. thanks all!
 
This is an emumerated type. It's a bunch of constants that you can combine...
Code:
typedef enum {
    NWMF_UNLOADING = 0x0001,
    NWMF_USERINITED = 0x0002,
    NWMF_FIRST_USERINITED = 0x0004,
    NWMF_OVERRIDEKEY = 0x0008,
    NWMF_SHOWHELP = 0x0010,
    NWMF_HTMLDIALOG = 0x0020,
    NWMF_FROMPROXY = 0x0040
} NWMF;
You could express this is VBA as
Code:
Public Enum NWMF
  Unloading = 1
  UserInitiated = 2
  FirstUserInitiated = 4
  OverrideKey = 8
  ShowHelp = 16
  HTMLDialog = 32
  FromProxy = 64
End Enum
And notice that the values are all powers of two so you can combine them and always get a unique number, which means you can pass one number to a function and have it represent multiple attributes. Google Bitmask.
You know this from using the MsgBox() function, which allows you to pass ...
Code:
vbYesNo + vbQuestion + vbDefaultButton2
into the Style parameter.
Does that help? What does the function look like?
 
you lost me bro. :) what does the function look like? what do you mean?
 
Lost you where? You were talking about the FLAGS argument of a function...
I am trying to call the function that I have made in a module, but I cannot figure out the FLAGS argument of the function!
Notice how the decimal sequence 1, 2, 4, 8, 16, 32, 64 is equivalent to the binary sequence 1, 10, 100, 1000, 10000, 100000? So leveraging the value of each bit in a binary number you can pass a whole list of boolean values to a function in a single argument. The link you posted appears to be an enumerated type that defines, in advance, what each of the bits in that argument will mean.
To me, this may shed light on the link you posted, but perhaps I've misunderstood your question.
Cheers,
 

Users who are viewing this thread

Back
Top Bottom