|
If I launch an application, how can I detect and terminate if another instance of the application is running?
|
|
|
|
|
Hi There!
look at these article tehy will help you out as you exact term use for your problem is Single Instance APP
http://www.codeproject.com/cpp/csingleinst.asp
http://www.codeproject.com/threads/singleinstance.asp
http://www.codeproject.com/threads/simplesingleinstanceapp.asp
"I Think this Will Help"
<h5
alok="" gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
Thanks for the info...I give a try and keep you posted!
|
|
|
|
|
|
Hi all,
I am capturing an image through a camera. The camera returns a pointer to a two dimensional array of pixels. How can I go about displaying these pixels into MFC? (Just like a webcam or a camera with an LCD does)
I have read tutorials on displaying .bmp using CBitmap ... However, will MFC understands the raw image file (no header, each pixel has 8bit grayscale).
I appreciate all of your help.
Thanks,
Beou
|
|
|
|
|
See SetBitmapBits or SetDIBits.
onwards and upwards...
|
|
|
|
|
can a MFC program be simply re-compiled or slightly modified from Windows OS to Macintosh OS to generated exe file for Macintosh?
includeh10
|
|
|
|
|
There used to be a version of MFC for that platform. I do not know if that is still the case, however. Check Microsoft's site.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
|
Michael P Butler wrote:
it was expensive and didn't live up to expectations
You can say that again!
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
whats wrong with the following code?
Curve curveObjects[10];
Curve *pcurveObjects;
pcurveObjects = &curveObjects[0];
I get the error messages:
....conflicting types for `int pcurveObjects'
....previous declaration as `Curve*pcurveObjects'
i can't see where i've defined anything as an int, can anyone explain why this is the case?
|
|
|
|
|
Your code is syntactically correct. What does the declaration of Curve look like?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Can someone point me in the right direction to find API for 802.11. I want to create an application to retreive/change the WEP key(s) of a wireless device via 802.11b in Visual C++. Is there a generic set of API's?
Moz
Tunis - Tunisia
|
|
|
|
|
Never did it before, but might be, that IProvisioningProfileWireless::CreateProfile can help you as a search string in MSDN.
|
|
|
|
|
Thank you,
I will look.
Moz
Tunis - Tunisia
|
|
|
|
|
Hello,
i have an ip adress in CString format and I need to transform it in char [MAX_PATH] format ...
Does anybody have an idea how to do that ?
Thanks a lot for help and have a nice day !
There is no way to happiness, happiness is the way !
|
|
|
|
|
You do not transform from a CString to a char array, but you can copy one to the other:
<br />
CString sTheIP( "192.168.0.1" );<br />
char caCharArray[ _MAX_PATH + 1 ];<br />
<br />
::strncpy( caCharArray, sTheIP, _MAX_PATH );<br />
caCharArray[ _MAX_PATH ] = '\0';<br />
If whatever you need to pass the char array to only needs a const char * (LPCSTR ), you can pass the CString directly; it has an operator for const TCHAR * .
Peace!
-=- James
Tip for inexperienced drivers: "Professional Driver on Closed Course" does not mean "your Dumb Ass on a Public Road"! Articles -- Products: Delete FXP Files & Check Favorites
|
|
|
|
|
A thousand of thanks James !
It works fine and your help is a jewel, thank you very much !
alain costanza
There is no way to happiness, happiness is the way !
|
|
|
|
|
Hi y'all
I used LockWindowUpdate to prevent my CListCtrl and CTreeCtrl from redrawing while the whole items were repopulated. It works fine, except that upon unlocking the whole desktop and all its child windows receive WM_PAINT messages...
I thought that only this mechanism operates only on the locked window... anyway, when I remove the LockWindowUpdate lines in my code, only my controls are flickering, the rest of the desktop remains untouched...
All this seems very strange to me...
Anybody else had similar experiences?
Regards
Daniel
|
|
|
|
|
Use WM_SETREDRAW. LockWindowUpdate is a nasty call that causes is lot of problems if not used properly.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Thanks for your suggestion. I tried it, and it seems to me that SetRedraw is not implemented for all controls. I'm using a CListCtrl and according to the MSDN doc they talk about CListBox in their examples...
Is there any other alternative?
Or what is the proper way of using LockWindowUpdate? It would work exacly how I want it to, except that the all open application windows receive WM_PAINT messages...
|
|
|
|
|
WM_SETREDRAW works for CListCtrl. I've used it. Avoid LockWindowUpdate like the plague.
--
Joel Lucsy
|
|
|
|
|
Have a look at the docs for SetRedraw()[^].
It has a brief example for your CListCtrl class.
Being a CWnd derived function, it should also work for any CWnd derived controls.
I Dream of Absolute Zero
|
|
|
|
|
If it doesn't work, then your code has other bugs in it. I know that doesn't really help you out a lot, but time and time again I see people waste time trying to figure out why the operating system isn't working when it turns out that our code just has a simple bug.
I'm not bitching at you or saying you are a bad programmer. We all do it. I recently wasted two hours trying to figure out why MFC's wait cursor wasn't working when it turned out I just forgot to specify a variable name.
i.e.
CWaitCursor;
instead of
CWaitCursor waitCursor;
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Hi,
I get this runtime error
Unhandled exception at 0x7c59bbf3 in NewMumsEngine.exe: Microsoft C++ exception: std::out_of_range @ 0x016c605c.
when I try to execute this line
sVarData = m_pElement[iPos].sValue.substr(iIndex+1);
where
sVarData is of string type.
m_pElement[iPos] is an object of a structure
sValue is another string variable in the same structure.
Can anyone please explain this error to me and tell me how to remove it.Any suggestions please?
thanks,
Arjun.
|
|
|
|