📄 papfiltergui.cpp
字号:
{
bool MakePreview=false;
switch(uMsg)
{
case WM_INITDIALOG:
SendDlgItemMessage(hWnd,IDC_MINSLIDER,TBM_SETRANGE,true,MAKELONG(0,255));
SendDlgItemMessage(hWnd,IDC_MAXSLIDER,TBM_SETRANGE,true,MAKELONG(0,255));
SendDlgItemMessage(hWnd,IDC_MIDSLIDER,TBM_SETRANGE,true,MAKELONG(1,254));
SendDlgItemMessage(hWnd,IDC_MINSLIDER,TBM_SETPOS,true,CRC.MinValue);
SendDlgItemMessage(hWnd,IDC_MAXSLIDER,TBM_SETPOS,true,CRC.MaxValue);
SendDlgItemMessage(hWnd,IDC_MIDSLIDER,TBM_SETPOS,true,CRC.MidValue);
switch(CCol.Channel) {
case 0: CheckDlgButton(hWnd,IDC_RADIO1,BST_CHECKED); break;
case 1: CheckDlgButton(hWnd,IDC_RADIO2,BST_CHECKED); break;
case 2: CheckDlgButton(hWnd,IDC_RADIO3,BST_CHECKED); break;
case 3: CheckDlgButton(hWnd,IDC_RADIO4,BST_CHECKED); break;
case 4: CheckDlgButton(hWnd,IDC_RADIO5,BST_CHECKED); break;
}
CRCTemp=CRC;
return false;
break;
case WM_HSCROLL:
CRC.MinValue=SendDlgItemMessage(hWnd,IDC_MINSLIDER,TBM_GETPOS,0,0);
CRC.MaxValue=SendDlgItemMessage(hWnd,IDC_MAXSLIDER,TBM_GETPOS,0,0);
CRC.MidValue=SendDlgItemMessage(hWnd,IDC_MIDSLIDER,TBM_GETPOS,0,0);
MakePreview=true;
break;
case WM_COMMAND:
switch(LOWORD(wParam))
{
case IDOK:
RangeColors(Image,&CRC);
EndDialog(hWnd,1);
break;
case IDC_CANCEL:
CRC=CRCTemp;
EndDialog(hWnd,0);
break;
case IDC_RADIO1:CRC.Channel=0;MakePreview=true;break;
case IDC_RADIO2:CRC.Channel=1;MakePreview=true;break;
case IDC_RADIO3:CRC.Channel=2;MakePreview=true;break;
case IDC_RADIO4:CRC.Channel=3;MakePreview=true;break;
case IDC_RADIO5:CRC.Channel=4;MakePreview=true;break;
}
break;
default:
return false;
}
if(MakePreview)
{
InitPreview();
RangeColors(TempPic,&CRC);
Preview();
}
return true;
}
// Process Window Message Callbacks
BOOL CALLBACK XORMAPProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch(uMsg)
{
case WM_INITDIALOG:
SendDlgItemMessage(hWnd,IDC_ROTSLIDER,TBM_SETRANGE,true,MAKELONG(0,255));
SendDlgItemMessage(hWnd,IDC_GREENSLIDER,TBM_SETRANGE,true,MAKELONG(0,255));
SendDlgItemMessage(hWnd,IDC_BLAUSLIDER,TBM_SETRANGE,true,MAKELONG(0,255));
SendDlgItemMessage(hWnd,IDC_ROTSLIDER,TBM_SETPOS,true,C1.R);
SendDlgItemMessage(hWnd,IDC_GREENSLIDER,TBM_SETPOS,true,C1.G);
SendDlgItemMessage(hWnd,IDC_BLAUSLIDER,TBM_SETPOS,true,C1.B);
C1Temp=C1;
return false;
break;
case WM_HSCROLL:
C1.R=SendDlgItemMessage(hWnd,IDC_ROTSLIDER,TBM_GETPOS,0,0);
C1.G=SendDlgItemMessage(hWnd,IDC_GREENSLIDER,TBM_GETPOS,0,0);
C1.B=SendDlgItemMessage(hWnd,IDC_BLAUSLIDER,TBM_GETPOS,0,0);
InitPreview();
// CreateXORMap(TempPic,&C1);
Preview();
break;
case WM_COMMAND:
switch(LOWORD(wParam))
{
case IDOK:
// CreateXORMap(Image,&C1);
EndDialog(hWnd,1);
break;
case IDC_CANCEL:
C1=C1Temp;
EndDialog(hWnd,0);
break;
}
break;
default:
return false;
}
return true;
}
// Process Window Message Callbacks
BOOL CALLBACK TwistProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch(uMsg)
{
case WM_INITDIALOG:
SendDlgItemMessage(hWnd,IDC_SLIDERWINKEL,TBM_SETRANGE,true,MAKELONG(-359,359));
SendDlgItemMessage(hWnd,IDC_SLIDERWINKEL,TBM_SETPOS,true,C2.Wink);
C2Temp=C2;
return false;
break;
case WM_HSCROLL:
C2.Wink=SendDlgItemMessage(hWnd,IDC_SLIDERWINKEL,TBM_GETPOS,0,0);
InitPreview();
Twist(TempPic,&C2);
Preview();
break;
case WM_COMMAND:
switch(LOWORD(wParam))
{
case IDOK:
Twist(Image,&C2);
EndDialog(hWnd,1);
break;
case IDCANCEL:
C2=C2Temp;
EndDialog(hWnd,0);
break;
}
break;
default:
return false;
}
return true;
}
// Process Window Message Callbacks
BOOL CALLBACK TwirlProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch(uMsg)
{
case WM_INITDIALOG:
SendDlgItemMessage(hWnd,IDC_SLIDERWINKEL,TBM_SETRANGE,true,MAKELONG(-359,359));
SendDlgItemMessage(hWnd,IDC_SLIDERWINKEL,TBM_SETPOS,true,CTW.Wink);
CTWTemp=CTW;
return false;
break;
case WM_HSCROLL:
CTW.Wink=SendDlgItemMessage(hWnd,IDC_SLIDERWINKEL,TBM_GETPOS,0,0);
InitPreview();
Twirl(TempPic,&CTW);
Preview();
break;
case WM_COMMAND:
switch(LOWORD(wParam))
{
case IDOK:
Twirl(Image,&CTW);
EndDialog(hWnd,1);
break;
case IDCANCEL:
CTW=CTWTemp;
EndDialog(hWnd,0);
break;
}
break;
default:
return false;
}
return true;
}
// Process Window Message Callbacks
BOOL CALLBACK MakeTileAbleProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch(uMsg)
{
case WM_INITDIALOG:
SendDlgItemMessage(hWnd,IDC_SLIDERAMOUNT,TBM_SETRANGE,true,MAKELONG(1,128));
SendDlgItemMessage(hWnd,IDC_SLIDERAMOUNT,TBM_SETPOS,true,MT.Amount);
MTTemp=MT;
return false;
break;
case WM_HSCROLL:
MT.Amount=SendDlgItemMessage(hWnd,IDC_SLIDERAMOUNT,TBM_GETPOS,0,0);
InitPreview();
MakeTileAble(TempPic,&MT);
Preview();
break;
case WM_COMMAND:
switch(LOWORD(wParam))
{
case IDOK:
MakeTileAble(Image,&MT);
EndDialog(hWnd,1);
break;
case IDCANCEL:
MT=MTTemp;
EndDialog(hWnd,0);
break;
}
break;
default:
return false;
}
return true;
}
// Process Window Message Callbacks
BOOL CALLBACK MixPicProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch(uMsg)
{
case WM_INITDIALOG:
SendDlgItemMessage(hWnd,IDC_SLALPHA,TBM_SETRANGE,true,MAKELONG(0,255));
SendDlgItemMessage(hWnd,IDC_SLALPHA,TBM_SETPOS,true,CMix.A);
SendDlgItemMessage(hWnd,IDC_SLROT,TBM_SETRANGE,true,MAKELONG(0,255));
SendDlgItemMessage(hWnd,IDC_SLROT,TBM_SETPOS,true,CMix.R);
SendDlgItemMessage(hWnd,IDC_SLGREEN,TBM_SETRANGE,true,MAKELONG(0,255));
SendDlgItemMessage(hWnd,IDC_SLGREEN,TBM_SETPOS,true,CMix.G);
SendDlgItemMessage(hWnd,IDC_SLBLAU,TBM_SETRANGE,true,MAKELONG(0,255));
SendDlgItemMessage(hWnd,IDC_SLBLAU,TBM_SETPOS,true,CMix.B);
CMixTemp=CMix;
if(CMix.FName[0]==0)
GetShitCharFileName(hWnd,(char*)&CMix.FName);
if(CMix.FName[0]==0)
{
EndDialog(hWnd,0);
return(true);
}
LoadToLoadedImage(CMix.FName);
return false;
break;
case WM_HSCROLL:
CMix.A=SendDlgItemMessage(hWnd,IDC_SLALPHA,TBM_GETPOS,0,0);
CMix.R=SendDlgItemMessage(hWnd,IDC_SLROT,TBM_GETPOS,0,0);
CMix.G=SendDlgItemMessage(hWnd,IDC_SLGREEN,TBM_GETPOS,0,0);
CMix.B=SendDlgItemMessage(hWnd,IDC_SLBLAU,TBM_GETPOS,0,0);
InitPreview();
// MixPics(TempPic,LoadedImage,&CMix);
Preview();
break;
case WM_COMMAND:
switch(LOWORD(wParam))
{
case IDOK:
// MixPics(Image,LoadedImage,&CMix);
DoneWithLoadedImage();
EndDialog(hWnd,1);
break;
case IDCANCEL:
CMix=CMixTemp;
EndDialog(hWnd,0);
break;
case IDC_CHOOSEMIXPIC:
GetShitCharFileName(hWnd,(char*)&CMix.FName);
DoneWithLoadedImage();
LoadToLoadedImage(CMix.FName);
break;
}
break;
default:
return false;
}
return true;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -