Skip to content

Commit

Permalink
-Fixed build errors on Ascii build
Browse files Browse the repository at this point in the history
-SysLink control will now try to execute the links when no g-label is specified and execute the g-label otherwise.
  • Loading branch information
ChrisS85 committed Jan 20, 2012
1 parent 689e528 commit d72affa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/script_gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2874,7 +2874,7 @@ ResultType GuiType::AddControl(GuiControls aControlType, LPTSTR aOptions, LPTSTR

case GUI_CONTROL_LINK:
// Seems best to omit SS_NOPREFIX by default so that ampersand can be used to create shortcut keys.
control.hwnd = CreateWindowEx(exstyle, WC_LINK, aText, style
control.hwnd = CreateWindowEx(exstyle, _T("SysLink"), aText, style
, opt.x, opt.y, opt.width, opt.height, mHwnd, control_id, g_hInstance, NULL);
break;

Expand Down Expand Up @@ -8124,10 +8124,10 @@ LRESULT CALLBACK GuiWindowProc(HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lPara
NMLINK &nmLink = *(PNMLINK)lParam;
LITEM item = nmLink.item;
//Link control tries to execute the link URL if AltSubmit is not set.
if(control.attrib & GUI_CONTROL_ATTRIB_ALTSUBMIT)
if(control.jump_to_label)
pgui->Event(control_index, nmhdr.code, GUI_EVENT_NORMAL, item.iLink + 1); // Link control uses 1-based index for g-labels
else
g_script.ActionExec(item.szUrl, NULL, NULL, false);
g_script.ActionExec(CStringTCharFromWCharIfNeeded(item.szUrl), NULL, NULL, false);
}
return 0;
case GUI_CONTROL_STATUSBAR:
Expand Down

0 comments on commit d72affa

Please sign in to comment.