class Fzeet::PrintDialogEx

Attributes

struct[R]

Public Class Methods

new(opts = {}) click to toggle source
# File lib/fzeet/windows/comdlg/PrintDialog.rb, line 267
def initialize(opts = {})
        _opts = {

        }
        badopts = opts.keys - _opts.keys; raise "Bad option(s): #{badopts.join(', ')}." unless badopts.empty?
        _opts.merge!(opts)

        @struct = Windows::PRINTDLGEX.new

        @struct[:lStructSize] = @struct.size
        @struct[:hInstance] = Windows.GetModuleHandle(nil)
        @struct[:Flags] = Fzeet.flags([:returndc, :usedevmodecopiesandcollate], :pd_)
end

Public Instance Methods

show(window = Application.window) click to toggle source
# File lib/fzeet/windows/comdlg/PrintDialog.rb, line 283
def show(window = Application.window)
        @struct[:hwndOwner] = window.handle

        DialogResult.new((Windows.PrintDlgEx(@struct) != Windows::S_OK) ? Windows::IDCANCEL : Windows::IDOK)
end