RPR GetMainHwnd

From CockosWiki

(Difference between revisions)
Jump to: navigation, search
(HWND GetMainHwnd())
(C++)
 
(4 intermediate revisions not shown)
Line 1: Line 1:
{{API_Doc_Header}}
{{API_Doc_Header}}
=GetMainHwnd()=
=GetMainHwnd()=
-
HWND GetMainHwnd()
+
'''HWND GetMainHwnd()'''
Gets the HWND, the windows handle, of the main REAPER window
Gets the HWND, the windows handle, of the main REAPER window
Line 9: Line 9:
  HWND
  HWND
==Examples==
==Examples==
 +
===C++===
 +
<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>
 +
===Perl===
===Perl===
-
<pre>
+
<source lang=perl>
-
</pre>
+
</source>
===Python===
===Python===
-
<pre>
+
<source lang=python>
-
</pre>
+
</source>
 +
 
==See Also==
==See Also==
 +
{{SeeAlso_window}}
 +
==Stuff==
==Stuff==
{{API_Doc_Footer}}
{{API_Doc_Footer}}

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

Personal tools