hi,
not sure it i have ask before but Position of CONTEXT MENU appear on wrong Monitor
my 2nd Monitor (WQHD) is LEFT of my 1st Monitor (Full-HD) when run app so Position is "negative"
App is running on 2nd Monitor (left Side) but CONTEXT MENU open on 1st Monitor (right Side)
DEFINE CONTEXT MENU OF Win open on wrong Monitor
Moderator: Rathinagiri
- AUGE_OHR
- Posts: 2117
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
DEFINE CONTEXT MENU OF Win open on wrong Monitor
have fun
Jimmy
Jimmy
- AUGE_OHR
- Posts: 2117
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: DEFINE CONTEXT MENU OF Win open on wrong Monitor
hi,
i rember i have fix it ...
on "that" PC was a "clean" HMG Version so my "fixes" are not present
c:\hmg.3.4.4\SOURCE\h_windows.PRG search for all (WM_LBUTTONDOWN, WM_MOUSEMOVE and WM_CONTEXTMENU)
and change it to
Context Menu now Popup on "other" Positon but on 1st Monitor so still Position is wrong ...
c:\hmg.3.4.4\SOURCE\c_windows.c HB_FUNC ( GETCURSORPOS )
IMHO Original is wrong
when change to
it does return right Position on "left" Monitor in right Position
i rember i have fix it ...
on "that" PC was a "clean" HMG Version so my "fixes" are not present
c:\hmg.3.4.4\SOURCE\h_windows.PRG search for all (WM_LBUTTONDOWN, WM_MOUSEMOVE and WM_CONTEXTMENU)
Code: Select all
* _HMG_MouseRow := HIWORD( lParam )
* _HMG_MouseCol := LOWORD( lParam )Code: Select all
// change by Jimmy
aPos := GetCursorPos()
_HMG_MouseRow := aPos[1] // GetCursorRow()
_HMG_MouseCol := aPos[2] // GetCursorCol()c:\hmg.3.4.4\SOURCE\c_windows.c HB_FUNC ( GETCURSORPOS )
IMHO Original is wrong
Code: Select all
hb_storvni( pt.y, -1, 1 );
hb_storvni( pt.x, -1, 2 );Code: Select all
hb_storvni( pt.x, -1, 1 );
hb_storvni( pt.y, -1, 2 );have fun
Jimmy
Jimmy
- AUGE_OHR
- Posts: 2117
- Joined: Sun Aug 25, 2019 3:12 pm
- DBs Used: DBF, PostgreSQL, MySQL, SQLite
- Location: Hamburg, Germany
Re: DEFINE CONTEXT MENU OF Win open on wrong Monitor
hi,
when read what i wrote about c_windows.c / GETCURSORPOS i´m not sure any more about X/Y ...
better when using
you are on "safe" Side
forgot
when read what i wrote about c_windows.c / GETCURSORPOS i´m not sure any more about X/Y ...
better when using
Code: Select all
_HMG_MouseRow := GetCursorRow()
_HMG_MouseCol := GetCursorCol()Code: Select all
_HMG_SYSDATA[ 191 ] := GetCursorRow()
_HMG_SYSDATA[ 192 ] := GetCursorCol()forgot
Code: Select all
* TrackPopupMenu( _HMG_SYSDATA[ 74 ] [ i ], LOWORD( lparam ), HIWORD( lparam ), hWnd )
TrackPopupMenu( _HMG_SYSDATA[ 74 ] [ i ], GetCursorCol(), GetCursorRow(), hWnd )have fun
Jimmy
Jimmy