Hello how are you?
Well, All the following in Wxwidgets...
1) i need know how to create a hotkey in my Wxapp, my Wxapp will must run in background and activate when i press hotkey on windows, but i don't know how to do it.¿ Do you know it?
2) How to do Screenshot with wxwidgets in .jpg format.
Thank a lot
Español
Hola como estan?
Bueno, Todo lo siguiente en WxWidgets
1) Necesito saber como crear un hotkey usando wxwidgets, la idea es que la wxapp se ejecute en segundo plano y se active al presionar esta hotkey.
2) como puedo capturar la pantalla en formato .jpg
Muchas gracias
Hotkeys and Screenshot Topic is solved
Hotkeys and Screenshot
Si sabes espa
Re: Hotkeys and Screenshot
Hi comunity, i need the same about :
2) How to do Screenshot with wxwidgets in .jpg format.
Any idea of how resolve this in wxWidgets 2.8.7 ??
Regards.
2) How to do Screenshot with wxwidgets in .jpg format.
Any idea of how resolve this in wxWidgets 2.8.7 ??
Regards.
haroldjpa wrote:Hello how are you?
Well, All the following in Wxwidgets...
1) i need know how to create a hotkey in my Wxapp, my Wxapp will must run in background and activate when i press hotkey on windows, but i don't know how to do it.¿ Do you know it?
2) How to do Screenshot with wxwidgets in .jpg format.
Thank a lot
Español
Hola como estan?
Bueno, Todo lo siguiente en WxWidgets
1) Necesito saber como crear un hotkey usando wxwidgets, la idea es que la wxapp se ejecute en segundo plano y se active al presionar esta hotkey.
2) como puedo capturar la pantalla en formato .jpg
Muchas gracias
Re: Hotkeys and Screenshot
Hi,
You need to use wxScreenDC. A search of the forum will find various posts e.g. this one.
Regards,
David
You need to use wxScreenDC. A search of the forum will find various posts e.g. this one.
Regards,
David
-
- Earned some good credits
- Posts: 113
- Joined: Sat Sep 24, 2011 9:32 pm
- Location: Poland
Re: Hotkeys and Screenshot
According to “hot key” subject:
Hot keys can be defined in simply way (Menu Item Editor) or manually (wxAcceleratorEntry, SetAcceleratorTable), but I am afraid that it works only if Wxapp is already activated. May be you should search hot keys on Windows side?
Regards
Jarek
Hot keys can be defined in simply way (Menu Item Editor) or manually (wxAcceleratorEntry, SetAcceleratorTable), but I am afraid that it works only if Wxapp is already activated. May be you should search hot keys on Windows side?
Regards
Jarek
Re: Hotkeys and Screenshot
from this one have too many errors for compilation :DavidHart wrote:Hi,
You need to use wxScreenDC. A search of the forum will find various posts e.g. this one.
Regards,
David
15 E:\wxdevcpp\Dev-Cpp\include\common\wx\defs.h:3369:0, from E:\wxdevcpp\Dev-Cpp\include\common\wx\dcscreen.h In file included from E:/wxdevcpp/Dev-Cpp/include/common/wx/defs.h:3369:0, from E:/wxdevcpp/Dev-Cpp/include/common/wx/dcscreen.h
15 E:\wxdevcpp\Dev-Cpp\include\common\wx\dcscreen.h:15, from E:\wxdevcpp\Dev-Cpp\include\common\wx\msw\dcscreen.h from E:/wxdevcpp/Dev-Cpp/include/common/wx/dcscreen.h:15, from E:/wxdevcpp/Dev-Cpp/include/common/wx/msw/dcscreen.h
2 E:\Dev-Cpp\проекты\Скриншот\main.cpp from main.cpp
E:\wxdevcpp\Dev-Cpp\include\common\wx\msw\winundef.h In function 'HWND__* CreateDialog(HINSTANCE, LPCTSTR, HWND, DLGPROC)'::
20 E:\wxdevcpp\Dev-Cpp\include\common\wx\msw\winundef.h:39 cannot convert 'LPCTSTR {aka const char*}' to 'LPCWSTR {aka const wchar_t*}' for argument '2' to 'HWND__* CreateDialogParamW(HINSTANCE, LPCWSTR, HWND, DLGPROC, LPARAM)'
and many many errors
piece of code:
Code: Select all
#include <windows.h>
#include <wx/msw/dcscreen.h>
/* Declare Windows procedure */
LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);
/* Make the class name into a global variable */
char szClassName[ ] = "WindowsApp";
// makfromkz {
/*
void MakeScreenShot()
{
wxScreenDC dcScreen;
int height = GetSystemMetrics(SM_CYVIRTUALSCREEN ) ;
int width = GetSystemMetrics(SM_CXVIRTUALSCREEN) ;
..........