EncodeAndSend is not a static function, which means it can be called on an instance of the class CPMSifDlg. You cannot write this:
CPMSifDlg::EncodeAndSend(/*…*/); //wrong – EncodeAndSend is not static
It should rather be called as:
CPMSifDlg dlg; //create instance, assuming it has default constructor!
dlg.EncodeAndSend(/*…*/); //correct
Only static functions are called with class name.
classname::Staicfunction();
Non static functions have to be called using objects.
classname obj;
obj.Somefunction();
This is exactly what your error means. Since your function is non static you have to use a object reference to invoke it.