Originally posted by knutso
Could you post some code?
you might find this piece of the ocde a little akward but lol after recoding and recoding to see if the problem fixed this is what's left.. but it's acceptable hehe.. as long as ti works ='(....
Code:
...........
case WM_COMMAND:
switch(wParam)
{
case (IDM_ENCRYPT || IDM_DECRYPT):
/* start */
//OFN struct, used for the browser-type dlgbox
//======================================
OPENFILENAME ofn;
ZeroMemory(&ofn, sizeof(ofn));
ofn.lStructSize = sizeof(ofn);
ofn.hwndOwner = hwnd;
//ofn.lpstrFile
//File name is stored in "lpstrFile" member......
ofn.nMaxFile = MAX_PATH;
ofn.Flags = OFN_EXPLORER | OFN_FILEMUSTEXIST;
//======================================
////////////////////////////////////************ =)
if(WM_COMMAND == IDM_ENCRYPT)
{
//=============================================
ofn.lpstrFilter = "All Files (*.*)\0*.*\0";
ofn.lpstrDefExt = "exe";
//============================================
if(GetOpenFileName(&ofn))
{
FileW.StartCrypt(ofn.lpstrFile, ACTION_ENCRYPT);
}
else
{
MessageBox(hwnd, "Unexpected file error.", "ERROR!", MB_OK);
}
}
else if(WM_COMMAND == IDM_DECRYPT)
{
//OFN struct, used for the browser dlgbox type..
//============================================
ofn.lpstrFilter = "File Encryptor Files (*.fem)\0*.fem\0";
ofn.lpstrDefExt = "fem";
//============================================
if(GetOpenFileName(&ofn))
{
FileW.StartCrypt(ofn.lpstrFile, ACTION_DECRYPT);
}
else
{
MessageBox(hwnd, "Unexpected file error.", "ERROR!", MB_OK);
}
}
/* End */ break;
case IDM_EXIT:
.......
..........
.................
at first i used szFileName but since it didn't work =( i replaced it for using directly the struct member.. lpstrFile
oh yeah don't make comments about my code commenting lol i was desperate and the smileys in the source code well lol seemed relaxing.. hehehe