|
I believe calling SetTimer multiple times will create multiple system timers, even if you call it with the same ID. The id is the value the timer returns to you when it ticks. This is different to the timer identifier which is the value returned by SetTimer.
The timer will not get killed when the dialog goes out of scope, you need to call KillTimer with the value returned by SetTime.
Mike
|
|
|
|
|
Timers are a limited system-wide resource, meaning that they can run out.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I find the VS help to be a little vague on this method, does SuspendThread halt execution of a thread -immediately-? And what if the thread contains some no-user-mode code? Can I use it to decently halt a thread before calling TerminateThread to brutally kill it?
PS: I'm using TerminateThread because in one of my threads I'm calling into a function of a third-party lib (out of my control) that sometimes hangs. TerminateThread seems the only option left to stop the hanging (now threaded) function and retain control over application execution.
|
|
|
|
|
|
Hi,
I am working with CListCtrl in VC++ where I tried to implemnt the multi-selection of Items by
1) SHIFT+ Mouse click
2) SHIFT+ Arrow Key selection
I could implement these with NM_CLICK and ITEMCHANGED respectivly,
but gives inconsistant selected items.
Plse anybdy to solve this situation by tech advice/code snippet
Thanks,
Krishna
Krishnakumar
|
|
|
|
|
If the default multi selection works for you, then just turn off the single selection style:
m_YourListControl.ModifyStyle( LVS_SINGLESEL, 0 );
If that's not what you're after, sorry.
Chris Richardson
|
|
|
|
|
Hi, Thanks for reply.But I need the ListCtrl as multi-selection and I made it multiselection type.
It visually selects the multiple items too. But the problem is that when I tried to delete these items the count is inconsistant.
Krishna
Krishnakumar
|
|
|
|
|
m makeing ATL DLL using ATL COM Wizard
i m getting an error as follows
F:\rough work\atl2\atl2.idl(18) : error MIDL2025 : syntax error : expecting a type specification near "CString"
for the line given below
[id(1), helpstring("method Connect")] HRESULT Connect(CString ip , int port);
how can i remove the eror
thanx
Regards.
|
|
|
|
|
I actually had previously used it to do console applications on Visual C++ but never used MFC before. I had a problem; I was told to set a 4 by 4 area by using Matrix in MFC coding and use it to check whether the image has any little "black spots". If it does, I have to set these small little "black spots" of the image from "255" or anything else to zero. The codings must be in a function.
So How do I do it?
Pls do kindly reply. I needed this asap. Thanks!
Below are the codes: (the codes have quite a bit of a problem...)
<br />
void CMediVisionView::MatrixImage()<br />
{<br />
int i;<br />
<br />
if(no_of_rows==512){<br />
for(i=0; i<512-5; i++)<br />
{<br />
if (image512[i]==0 && image512[i+1]==0 && image512[i+2]==0 && image512[i+3]==0 && image512[i+4]==0){<br />
<br />
if(image512[i]==0 && image512[i+512]==0 && image512[i+(512*2)]==0 && image512[i+(512*3)]==0){<br />
<br />
if(image512[i+4]==0 && image512[i+512+4]==0 && image512[i+(512*2)+4]==0 && image512[i+(512*3)+4]==0){<br />
<br />
if(image512[i+(512*3)+1]==0 && image512[i+(512*3)+2]==0 && image512[i+(512*3)+3]==0 && image512[i+(512*3)+4]==0){<br />
<br />
image512[i+512+1]=0;<br />
image512[i+(512*2)+1]=0;<br />
image512[i+(512*3)+1]=0;<br />
<br />
image512[i+512+2]=0;<br />
image512[i+(512*2)+2]=0;<br />
image512[i+(512*3)+2]=0;<br />
<br />
image512[i+512+3]=0;<br />
image512[i+(512*2)+3]=0;<br />
image512[i+(512*3)+3]=0;<br />
}<br />
<br />
}<br />
}<br />
<br />
}<br />
<br />
}<br />
}<br />
<br />
<br />
<br />
}<br />
|
|
|
|
|
i have a msflexigrid, works great, but i am wondering how to let the user click on a cell and copy the data inside of the cell (not edit the cell, just copy the data inside of the cell) ... any ideas?
|
|
|
|
|
Hello all,
I have an assignment to make a board game in VC++ .Net , I am required to make GUI and create 3 processes Master, player1 and player2....
I have been looking online for IPC and have found some examples but all went over the top of my head....
I would appreciate if someone could give me an example explaining...
create process ( i.e. initialize player1 from master )
pass data ( structure ) to player1
receive feedback from player1
pass data to player2 ( it has already been initialized before i.e after player1)
receive feedback from player2
pass data to player1( what will happen to player1 in the mean time? )
Thanks a lot
|
|
|
|
|
Hi Everyone,
Could anyone please give me details about controlling more than one parallel from the same CPU unit.
Thanx in advance
|
|
|
|
|
Each parallel port has it's own address that you scan, so the presence of any other parallel port is irrelevant. You use the address needed for the port you are scanning.
There are some good articles here on Code Project about parallel ports.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Thanx for the reply Christian. Could that be done with MFC as well or just Win32 Applications.
|
|
|
|
|
MFC is just a fat old library on top of Win32. Hell, C# is just a fat old library on top of Win32. I actually do what I've described in C# by calling the underlying libaries in the DLL's. You can do anything Win32 supports in MFC.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Check latest release of GETIC 3D that comes with C++
source code for navigating in a 3D world .
http://getic.njoydeco.com
|
|
|
|
|
If you want to post it here, do it with an article.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
this kind of advertisement sucks!
Don't try it, just do it!
|
|
|
|
|
Just think before... Is no adv.
The package is for free, and comes with tutorials source code... but anyway...
|
|
|
|
|
can someone of you to send me the code of minesweeper,c++???plz help meeeeeeeee
|
|
|
|
|
|
if you mean the source code of the minesweeper distributed with windows then we can't help you. It is not public!
Don't try it, just do it!
|
|
|
|
|
i don't mean that..i want the source code of any minesweeper.i use it for an exrecise that ask the source code of minesweeper...someone to help me??
|
|
|
|
|
Has anyone encountered an error where CreateThread fails to create a thread but does not return NULL for a thread handle? Thanks.
|
|
|
|
|
Anonymous wrote:
Has anyone encountered an error where CreateThread fails to create a thread...
What are you doing to verify that CreateThread() has failed to create a thread?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|