Prev Previous Post   Next Post Next
Old 25th January 2018, 19:24   #1
sfx09
Junior Member
 
Join Date: Jul 2017
Posts: 29
stop 'back' message in plugin

Hello!

I'm doing a plugin for NSIS with a several forms (!), which are changing by clicking on 'Next' or 'Back' buttons.
My plugin work via Page Custom at this steps-condition:

!insertmacro MUI_PAGE_WELCOME
Page Custom MyPlugShow
!insertmacro MULTIUSER_PAGE_INSTALLMODE

Also, I try to change 'Cancel' button to Skip-functionality. So, if I try to click on 'Skip' ('Cancel') button, after click on the 'Next' button - all work fine - plugin go to MULTIUSER_PAGE_INSTALLMODE. But, if I try to click on 'Skip', after click on the 'Back' button - plugin page go to MUI_PAGE_WELCOME.

Please help me fix this.

Catching 'Skip' from plugin CurrentParentProc (Delphi):

PHP Code:
  if (uMsg WM_COMMANDthen
  begin
    
//esc or skip button
    
if (LOWORD(wParam) = 2) and (HIWORD(wParam) = BN_CLICKEDthen
    begin
      
//ShowMessage('here click skip and skip on ESC!!!');
      
bStopPlugin := TRUE;
      
bSkipActivation := TRUE;
    
end;
//...
  
end

Boolean bStopPlugin - it is a "flag" for translate messages:

PHP Code:
  while bStopPlugin FALSE do
  
begin
    GetMessage
(Msg000);
    if (
not IsDialogMessage(PluginDialogFirstForm.HandleMsg)) and (not IsDialogMessage(g_hwndParentMsg))  then
    begin
      TranslateMessage
(Msg);
      
DispatchMessage(Msg);
    
end;
  
end
After, bSkipActivation - it is flag for skip. Also, I'm tried push 'next' in this statement, but - no luck.

PHP Code:
    if bSkipActivation TRUE then
    begin
      
//NSIS_PushString_Ansi('next');
      
SetWindowLongPtr(g_hwndParentSizeOf(LRESULT), Longint(parentOriginalWndproc));
      Exit;
    
end

Sorry for my English. Help me, please.
sfx09 is offline   Reply With Quote
 
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump