I'm not really sure what exactly the error is but it might be something to do with my build, I changed the target to windows 10. There are two actual error codes
E0309morethanoneinstanceofconstructor
and
Error C2440 '<function-style-cast>': cannot convert from 'int' to 'ATL::CString'
But I highly doubt these are the actual error. It does not help that I am not familiar with CString or this whole codebase and coding style. I would love to hear some idea on what might be wrong here. I am using VS 2017 community edition. I don't think missing that function is going to effect my use case but it feels wrong.
The reason I tried building the code was because I wanted the application window to be able to be always on top so I can use JPEGView to open reference pictures and work on other apps with the picture on top. I was able to achieve this by changing a few parameters on SetWindowPos in MainDlg.cpp on line 317, from HWND_TOP to HWND_TOPMOST and removing SWP_NOZORDER.
It seems to be working just fine but I have no idea if this broke anything else. I would love the opinion of someone who know their JPEGView code to share their opinion on this if possible (and maybe even make Always On Top a config toggle somehow?).
Thank you for reading my rambling, would appreciate your help. Have a nice day regardless.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I managed to build the application from source but I had to comment out this function
in FileExtensionRegistry.cpp because of issues with CString on line 212
I'm not really sure what exactly the error is but it might be something to do with my build, I changed the target to windows 10. There are two actual error codes
and
But I highly doubt these are the actual error. It does not help that I am not familiar with CString or this whole codebase and coding style. I would love to hear some idea on what might be wrong here. I am using VS 2017 community edition. I don't think missing that function is going to effect my use case but it feels wrong.
The reason I tried building the code was because I wanted the application window to be able to be always on top so I can use JPEGView to open reference pictures and work on other apps with the picture on top. I was able to achieve this by changing a few parameters on SetWindowPos in MainDlg.cpp on line 317, from HWND_TOP to HWND_TOPMOST and removing SWP_NOZORDER.
It seems to be working just fine but I have no idea if this broke anything else. I would love the opinion of someone who know their JPEGView code to share their opinion on this if possible (and maybe even make Always On Top a config toggle somehow?).
Thank you for reading my rambling, would appreciate your help. Have a nice day regardless.
for some reason the last code line did not show up
here it is
::SetWindowPos(m_hWnd, HWND_TOPMOST, m_monitorRect.left, m_monitorRect.top, m_monitorRect.Width(), m_monitorRect.Height(),
SWP_NOCOPYBITS | SWP_NOACTIVATE | SWP_NOREDRAW);
Update:
I was able to compile with the function uncommented out, it turned it was a casting issue after all. All I had to do was cast after the + 1
Still don't know if this breaks functionality, seems dangerous with it dealing with the registry.
@timmy1029 I noticed you added alwaysontop feature. I also added this with my fork https://github.com/sylikc/jpegview and it's included in the release earlier this year https://github.com/sylikc/jpegview/releases/tag/v1.1.42