I dont know of any simpler way than using CFileFind::FindFile to enumerate through all files, find if they are image files and then if they are then extracting the bitmap from them using Gdiplus and then storing that bitmap for subsequent display.
hehehehe.. who knows he may have something better to say about my approach and in criticizing or approving that, he may arrive at better solution. moreover, i am trying to bring spiritual touch to my programming skills and I believe that our inner soul knows all the answers. only they need to be brought to surface. glad you appreciate it.
It's returning NULL in pMainWnd ...
If this is the case I have get the main window handle...
hMutex = CreateMutex(NULL,TRUE,TEXT("vision client"));
if(hMutex == INVALID_HANDLE_VALUE)
AfxMessageBox("Unable to create Mutex");
AfxMessageBox("Application is already Opened !!!");
The above code will ristrict the application to open mutliple instances.And it gives the message like "Application is already Opened !!!" . and closes the second instance[_exit(0)].
Instead of giving message I have to activate (maximize)the application if user clicks again on the application icon.
haha.. so that is the problem.
how about using FindWindow() function? Inside the MainFrame::OnCreate, give a name to your window using SetWindowText and then you can use FindWindow to find the window that matches the name you gave earlier. that is one of the ways.
SetWindowText("My magic window");
If mutex already exists,
HWND hWnd = FindWindow(NULL, "My magic window")
if(hWnd && ::IsIconic(hWnd))
//maximize or restore it
//bring it to top or set it as foreground window
I have created an application in VC++ using VS2008 in a development machine which runs on Vista, now i need to run that application in a target machine which runs on windows XP SP2 which does not have vc++ dlls or any thing.
i need a help for redistributing the dependent dlls for the application so that it should run well in target machine.
this is the manifest file created for the application ...
Ummm - create a shortcut to the exe or chm in a folder in the start menu - either the All Users start menu (for an 'All Users' install) or the current users start menu. The start menu location can be retrieved with SHGetSpecialFolderPath[^]
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p