Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I downloaded the OBS source code from sourceforge.</p> <p>The Window Proc is OBS::RenderFrameProc located in WindowStuff.cpp</p> <p>At the bottom of the proc (but before the "return"), add:</p> <pre><code>else if(message == WM_CTLCOLORSTATIC ) { // HERE YOUR CODE } </code></pre> <p>EDIT: Changing Button Background</p> <p>First, an advice: "don't do that". Buttons are very important and common components of the windows GUI, and their look and feel should be consistent in all applications. Users have ways to customize things for their Desktop, as a whole, and this include "accessibility" issues and behavior. Applications that want do it in their "own special way"s only bring problems.</p> <p>Second, try this code for changing the "Setting..." button background to an ugly green: Add a case in the <code>WM_NOTIFY</code> message processing in OBS::OBSProc, in the switch(wParam)</p> <pre><code>case ID_SETTINGS: if(nmh.code == NM_CUSTOMDRAW) { LPNMCUSTOMDRAW lpcd = (LPNMCUSTOMDRAW)lParam; if (lpcd-&gt;dwDrawStage == CDDS_PREPAINT ) { SetDCBrushColor(lpcd-&gt;hdc, RGB(0, 255, 0)); SelectObject(lpcd-&gt;hdc, GetStockObject(DC_BRUSH)); LONG lBorders = 0; LONG lElipse = 5; RoundRect(lpcd-&gt;hdc, lpcd-&gt;rc.left + lBorders, lpcd- rc.top + lBorders, lpcd-&gt;rc.right - lBorders, lpcd-&gt;rc.bottom - lBorders, lElipse, lElipse); return CDRF_NOTIFYPOSTPAINT; } } break; </code></pre> <p>An alternative, with more standard borders:</p> <pre><code> SetDCBrushColor(lpcd-&gt;hdc, RGB(0, 255, 0)); SetDCPenColor(lpcd-&gt;hdc, RGB(0, 255, 0)); SelectObject(lpcd-&gt;hdc, GetStockObject(DC_BRUSH)); SelectObject(lpcd-&gt;hdc, GetStockObject(DC_PEN)); LONG lBorders = 3; </code></pre> <p>To be complete, you may want to check the uItemState member of lpcd, for the CDIS_HOT flag, changing the color accordingly.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload