RPR GetMainHwnd
From CockosWiki
(Difference between revisions)
(→Examples) |
(→C++) |
||
Line 10: | Line 10: | ||
==Examples== | ==Examples== | ||
===C++=== | ===C++=== | ||
- | <source lang=cpp> | + | <source lang=cpp highlight=5> |
+ | void SetReaperWndSize(COMMAND_T* = NULL) | ||
+ | { | ||
+ | int x = GetPrivateProfileInt("REAPER", "setwndsize_x", 640, get_ini_file()); | ||
+ | int y = GetPrivateProfileInt("REAPER", "setwndsize_y", 480, get_ini_file()); | ||
+ | HWND hwnd = GetMainHwnd(); | ||
+ | SetWindowPos(hwnd, NULL, 0, 0, x, y, SWP_NOMOVE | SWP_NOZORDER); | ||
+ | } | ||
</source> | </source> | ||
+ | |||
===Perl=== | ===Perl=== | ||
<source lang=perl> | <source lang=perl> |
Latest revision as of 22:21, 11 February 2010
Main Page > REAPER Documentation > ReaScript > ReaScript API, Functions > RPR GetMainHwnd
Main Page > REAPER Documentation > REAPER API > REAPER API Functions > RPR GetMainHwnd
Contents |
GetMainHwnd()
HWND GetMainHwnd()
Gets the HWND, the windows handle, of the main REAPER window
Parameters
None
Returns
HWND
Examples
C++
void SetReaperWndSize(COMMAND_T* = NULL) { int x = GetPrivateProfileInt("REAPER", "setwndsize_x", 640, get_ini_file()); int y = GetPrivateProfileInt("REAPER", "setwndsize_y", 480, get_ini_file()); HWND hwnd = GetMainHwnd(); SetWindowPos(hwnd, NULL, 0, 0, x, y, SWP_NOMOVE | SWP_NOZORDER); }
Perl
Python
See Also
window: GetTooltipWindow, TrackList_AdjustWindows, DockWindowActivate, DockWindowAdd, DockWindowRemove,
Stuff
Main Page > REAPER Documentation > ReaScript > ReaScript API, Functions > RPR GetMainHwnd
Main Page > REAPER Documentation > REAPER API > REAPER API Functions > RPR GetMainHwnd