掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
fatal error LNK1120の対応方法について (ID:66088)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
お世話になります。 ビルドエラーの対応方法についてご指導を宜しくお願い致します。 ●Windows XP VC++6 MFC ダイアログベース ●エラー内容 error LNK2001: 外部シンボル "_xGetSystemMetrics@4" は未解決です error LNK2001: 外部シンボル "_xGetMonitorInfo@8" は未解決です error LNK2001: 外部シンボル "_xMonitorFromPoint@12" は未解決です fatal error LNK1120: 外部参照 3 が未解決です。 link.exe の実行エラー ●以下の文法を追加で発生しました。 ※テストとして別プロジェクトで実行時は、問題ありませんでした。 //Append Start #include <multimon.h> #define COMPILE_MULTIMON_STUBS //Append End BOOL CDIDSDlg::OnInitDialog() { // Append Start BOOL blRet = SetDidsDlg(); // Append End } BOOL CDIDSDlg::SetDidsDlg() { // Append Start CRect crectDialog; RECT rectDesktop; HMONITOR MonitorHandle; MONITORINFO MonitorInfo; // ダイアログサイズ GetWindowRect(&crectDialog); // 画面(プライマリ)サイズ:画面下タスクバーを除いたサイズ SystemParametersInfo(SPI_GETWORKAREA, 0, &rectDesktop, 0); // 画面(セカンダリ)サイズ POINT Point = {(long)rectDesktop.right, (long)rectDesktop.top}; MonitorHandle = ::MonitorFromPoint(Point, MONITOR_DEFAULTTOPRIMARY); MonitorInfo.cbSize = sizeof(MonitorInfo); ::GetMonitorInfo(MonitorHandle, &MonitorInfo); // ダイアログの表示位置 SetWindowPos(&wndTop, MonitorInfo.rcWork.left, MonitorInfo.rcWork.top, MonitorInfo.rcWork.right - MonitorInfo.rcWork.left, MonitorInfo.rcWork.bottom, SWP_SHOWWINDOW); //Append END return(TRUE); }
←解決時は質問者本人がここをチェックしてください。
更新する
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.