Electronでアプリを開発している際にBrowserWindowを生成している処理部とBrowserWindowのhtml上でと通信したいことが多々あります。 そこでElectronではプロセス間通信を用いて通信し、処理を受け渡すことが可能です。 そのやり方についてご説明いたします。 また、なぜプロセス間通信なのかという部分もこの後ご説明していきます。 プロセス間通信 ElectronではBrowserWindowを生成する側でappの制御を行う処理をメインプロセス(main process)。 BrowserWindowをappが生成して動作するプロセスをレンダラープロセス(renderer process)と呼ばれます。 メインプロセスは一つしかプロセスが存在しないのですが、レンダラープロセスはBrowserWindowが複数生成された際に複数のプロセスを持つことになります。 これ
オーナーと子ウィンドウ Windows は、特定の処理を専門とする動作をパッケージ化し ひとつのウィンドウとして扱い、操作することができます これまで多くのアプリケーションで見たことがあると思いますが ボタンやチェックボックスなども全てウィンドウ(コントロール)なのです ボタンなどのコントロールは CreateWindow() 関数がデフォルトで用意しています これらの定義済みコントロールクラスは、WNDCLASS を設定する必要がありません また、ボタンが押された時などの描画処理やメッセージの処理は 全てデフォルトの状態でサポートされているので、何も設定する必要がないのです これらのコントロールは、トップのウィンドウの子ウィンドウとして登録します そのためには、CreateWindow() 関数のスタイルに WS_CHILD を指定します また、第8引数の hWndParent に、オー
連載目次 PC用のWindows 10は、システムが[戻る]ボタンを表示するようになった。モバイル用のWindows 10には、Windows Phoneの時代から[戻る]ボタンがある。これらの[戻る]ボタンを、Windows 10のユニバーサルWindowsプラットフォーム用のアプリ(以降、UWPアプリ)ではどのように扱えばよいのだろうか? 本稿ではその方法を解説する。なお、本稿のサンプルは「Windows Store app samples:MetroTips #113」からダウンロードできる。 事前準備 デスクトップ用とモバイル(=Windows 10を搭載したスマートフォン)用のUWPアプリを開発するには、以下の開発環境が必要である。本稿では、無償のVisual Studio Community 2015を使っている。 SLAT対応のPC*1 64bit版*2 Windows 10
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く