|
At the end of your thread loop, add a message box
<br />
your thread function<br />
{<br />
<br />
do<br />
{<br />
}while(xState=true);<br />
AfxMessageBox("I'm Done");<br />
<br />
}<br />
This is a simple way to test if it's getting out of the loop which also says that the thread is terminating.
:Gong: 歡迎光臨 吐 西批 :Gong:
|
|
|
|
|
Whats the meaning of your sig?I know Gong but 歡迎光臨 吐 西批
|
|
|
|
|
Welcome to the CodeProject :->
:Gong: 歡迎光臨 吐 西批 :Gong:
|
|
|
|
|
Use a debugger and get a stack trace of what the thread is doing when it hangs.
Steve
|
|
|
|
|
Hi all,
How to play flash movie(swf) in vc++ using lib.
I searched for samples to play the movie. Those sample contains the function named setmovie or loadmovie. but i want to play the movie without including the swf.
is there any way to do this. can any help me. thanks in advance.
nick
|
|
|
|
|
if you have setmovie or loadmovie for play flash movie what problems?
|
|
|
|
|
you mean you want to stream the video ?
-Prakash
|
|
|
|
|
I want register a context menu for image,document, music files as "Add to MyAppliaction " Means the files will be added to the drive from where the my appliaction runs......
Any suggestion how to do it?
|
|
|
|
|
hi...
i want to copy directory along with subdirectory recursively
using windows SDK
|
|
|
|
|
Do you need to SHFileOperation
|
|
|
|
|
|
hi...
i want to create vertical toolbar like toolbar present in MS Paint
which has two columns.
how i can change size of toolbar.
i want to create toolbar using windows SDK programming.
|
|
|
|
|
You can see a lot of examples of Toolbars on codeproject
|
|
|
|
|
The CCS_LEFT (or CCS_RIGHT) styles will make it vertical on the left or right edge.
The TBSTYLE_WRAPABLE style will allow multiple rows of buttons.
ToolBar controls are windows so you can move/resize them with MoveWindow(), etc.
THere are messages to get button sizes so you can ccalculate the dimensions required to get
two rows of buttons. It's all here in the SDK...
Toolbar Controls Overview[^]
|
|
|
|
|
|
If unicode is defined LPTSTR is a wchar_t*, otherwise it's a char*.
|
|
|
|
|
|
Lord Kixdemp wrote: Windows Calculator told me I will die at 28.
you are using wrong tool for wrong purpose.
-Prakash
|
|
|
|
|
Mr.Prakash wrote: you are using wrong tool for wrong purpose.
I sure am!
Windows Calculator told me I will die at 28.
|
|
|
|
|
Hi...I have a dialog box with a tree control that has check-boxes in it. What I need to do is, when any of the check-boxes in the tree control is checked, I need to do some processing, and for now let's just say, I need to put up a messagebox. I added a function for the 'NM_CLICK' message to intercept the left button clicks in the tree control, then I do a 'GetCheck' to see if the button is checked.
When I check the box, the 'GetCheck' function returns a 0 but a checkmark appers in the box. When I uncheck the box, the 'GetCheck' function returns a 1, and the checkmark is removed from the box. So this isn't really helping me figure out when the box is checked and not.
Any help would be greatly appericated.
Here is my code for the 'NM_CLICK'
void CDirectoryCheckDlg::OnClickTree1(NMHDR* pNMHDR, LRESULT* pResult)
{
CPoint pt;
GetCursorPos(&pt);
m_testTree.ScreenToClient(&pt);
UINT uFlags;
HTREEITEM ht = m_testTree.HitTest(pt, &uFlags);
if(ht != NULL)
{
// There is an item under the cursor.
m_testTree.SelectItem(ht);
// See what exactly was under the cursor:
switch(uFlags)
{
case TVHT_ONITEMSTATEICON:
{
// It is the icon (checkbox)
BOOL chkbox = m_testTree.GetCheck(ht);
if(chkbox)
MessageBox("Button is checked");
//CString str;
//str.Format("%d",chkbox);
//MessageBox(str,NULL,NULL);
break;
}
case TVHT_ONITEMBUTTON:
// It is the button
break;
}
}
*pResult = 0;
}
|
|
|
|
|
When the control issues the NM_CLICK notification, it hasn't changed the state of the checkbox yet.
You might try looking at the TVN_ITEMCHANGED [^] notification. Also look at the general tree control article here[^], especially the section entitled Working with state image indexes.
Software Zen: delete this;
|
|
|
|
|
This code works fine, but as I learn more about VC++ I wonder if it is OK. I think index exists only within the function, but I'm not sure if it can be returned to targetPrice without problem. There has been no problem so far, but my program isn't finished yet. (basePrice is global.)
int q = GetIndexForPrice(targetPrice );
...
...
...
int CTradingdemoDlg::GetIndexForPrice(double price)
{
int index;
index = (price - basePrice)/ .0025;
return index;
}
Thanks
|
|
|
|
|
Oliver123 wrote: I think index exists only within the function
Yes but int CTradingdemoDlg::GetIndexForPrice(double price)
and
return index;
is handled by the compiler by "copying" the value from the index variable inside the function into the value of the variable outside the function that receives it "int q".
led mike
|
|
|
|
|
hi guys
Could someone please help me to convert from dword to lpcvoid?
This is my code:
LPCVOID voider;
DWORD copytothis;
lpBaseAddress = FakeBF2Start;
but i get an error when i try that:
error C2440: '=' : cannot convert from 'DWORD' to 'LPCVOID'
(that code is not the entire code just so u no its just pseudo but thats the only part that is causing probs)
Thanks in advance
|
|
|
|
|
Cyclone02 wrote: lpBaseAddress = FakeBF2Start;
Perhaps:
lpBaseAddress = (LPCVOID) &FakeBF2Start;
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|