GetWindowText() 개인적인 메소드

private GetWindowText ( IntPtr hWnd, StringBuilder lpString, int nMaxCount ) : int
hWnd System.IntPtr
lpString StringBuilder
nMaxCount int
리턴 int
예제 #1
0
        /// <summary>
        /// Inits this instance.
        /// </summary>
        protected void Init()
        {
            this.hostWindow = GetMsiForegroundWindow();

            this.Opacity = 0.0005;
            this.Text    = Win32.GetWindowText(this.hostWindow);

#if DEBUG
            //System.Diagnostics.Debugger.Launch();
#endif
            foreach (Process p in Process.GetProcessesByName("msiexec"))
            {
                try
                {
                    this.Icon = Icon.ExtractAssociatedIcon(p.MainModule.FileName); //service process throws on accessing MainModule
                    break;
                }
                catch { }
            }
        }
예제 #2
0
 void WixDialog_Load(object sender, EventArgs e)
 {
     this.Text = Win32.GetWindowText(this.hostWindow);
 }