|
Use CListCtrl::SetItemText(..)
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
i am writing one multithreading application using MFC library . i am not able to test my applcation. can you tell me how i test multithreading application of MFC.or any tool for testing?
|
|
|
|
|
you mean multi threaded, or many exes that are talking together ?
if multithreaded, just run your program, set breakpoints, see what happens...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I want to test multithreaded in serial comunication .how to test serial comm.application
|
|
|
|
|
may be this is my last question for my minithesis, before i graduate (i hope)
function A runing when a press button "start", how i can stop function A when it still running by press button "stop"
|
|
|
|
|
you will have to deport the actions performed by function A into a worker thread so that the GUI is not frozen, and you will so be able to press a STOP button to end the treatments...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
And to complete the response of toxcct: your function need also to be 'finishable'. That is, a kind of loop you can ask to terminate. Something like this:
while (bContinue)<br />
{<br />
};
Then, you can stop your function by setting bContinue to false. But be carefull when doing that, you'll have to secure the access to those 'shared' variable inside critical sections (take a look at MSDN for more details).
Of course, there is still the solution to kill your worker thread but that's not really an elegant solution
|
|
|
|
|
|
Execute this code when the button is pushed:
*(int *)0 = 0;
|
|
|
|
|
Good day,
I have on my OnInitDialog an initialization and if there the returncode of the initilization is error then I display Error using Messagebox. However After I press Ok button, I got an access violation.
Is there a proper way to have MessageBox in OnInitDialog?
Thanks.
|
|
|
|
|
don't do it like this. if you have an error, throw an exception that you will catch in the InitInstance() function. there, you can put the code of your messageBox.
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I hope my program visible when windows key + D pressed.
I don't know then come what kind of windows message.
How can I do my program visible when windows key + D pressed.
How can I do my program visible when windows Toggle Desktop.
Please help me.
ps. My English aviality is very poor. sorry......
|
|
|
|
|
|
|
hey yaar dehka ? ek newbie ne tujko '1' vote diya . mae sochthe ki, unkhone '1' vote ko '1' rank se galthi samjkiya..
He is like a one-legged man in a bum kicking competition. -Novjot Sidhu
--[v]--
|
|
|
|
|
ThatsAlok wrote: As Mr Senthil Quoted,
Cut out the Mr, will ya?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Do any one know the difference bettween vc.6 and vc.net ?
What are the benefits if i use vc.net insted of vc.6 ?
Do all the projects developed under vc.6 compile properly in vc.net ?
Online resources are more help full , if any link then do send /
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
you mean VC.NET or VC7 ?? i mean, you're talking about managed projects that use the .NET framework, or just the difference between pure C++ from Visual C++ 6 and Visual Studio .NET 2003 ?
if we consider the last case, Standard C++ which is implemented in VS7 C++ Compiler won't accept some code that compile under VC++6...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Thanks Toxcct
I mean the difference between the managed code and vc6.
I have coded in MSVS.6 ,Do i need to shift to managed code???
I dont think there is more difference for vc6 and vc7 ??
(not sure havent worked on vc7 yet)
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
hi vikas,
actually, there do is a difference between c++ 6 and 7 in the standard compliance.
about using the .NET framework, i doubt you can with Visual c++ 6.
moreover, what do you want to do ? upgrade a code of your own from vc6 to vc7 or completely review it into managed c++ code ?
vikas amin wrote: I have coded in MSVS.6 ,Do i need to shift to managed code???
i don't think so...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
vikas amin wrote: I mean the difference between the managed code and vc6.
They're totally different. For starters, managed code requires the .NET framework, unmanaged code doesn't. You can try googling for more information.
vikas amin wrote: I dont think there is more difference for vc6 and vc7 ??
Yes there is. VC++ 7.1 is more standards compliant than VC 6.0, it supports template template parameters, for example.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hi
How to apply a Hand cursor to a Picture box and its member variable is a CStatic control. Whenever i moved cursor on to that picture box it should display Hand cursor. My application is SDI application in which CView class is derived from CFormView.
I have tried in this way but didn't get plz help me.
m_Image.SetCursor(::LoadCursor(NULL,IDC_HAND));
//here IDC_HAND is not working i have given IDC_HELP.
Where should i use this code in View class to display that cursor.
Help me.
|
|
|
|
|
I think (I'm not sure), you have to activate the notify style of the CStatic (in the properties of the control).
Then, go in the class wizzard and add a handler for the mouse move event of your control (it must have an ID different than IDC_STATIC). This handler function is in the view class.
Then add your code for loading the cursor in this function.
|
|
|
|
|
Hi,
Assume CYourControl is the class implementing your image or whatever you are using, and TheParent is the class corresponding to the host of your control.
Write the following code within the handler responding to the WM_SETCURSOR event:
BOOL TheParent::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
{
CYourControl *pYC = ......
if ( pYC )
{
if ( pWnd == pYC )
{
SetCursor(LoadCursor(NULL,IDC_YOUR_CURSOR));
return TRUE;
}
}
return TheParentBaseClass::OnSetCursor(pWnd, nHitTest, message);
}
IDC_HAND Windows is defined for NT 5.0 and later.
You can create your own cursor.
Do not forget that line returning TRUE!
SkyWalker
-- modified at 3:38 Friday 21st October, 2005
|
|
|
|
|
nice mircea, and do u think, an else part is needed? i'm not sure. but luking at ut code,
if ( pWnd == pYC )
{
SetCursor(LoadCursor(NULL,IDC_YOUR_CURSOR));
return TRUE;
}
/* else // not needed?
{
SetCursor(LoadCursor(NULL,IDC_ARROW));
return TRUE;
}
*/
if this sets changes the cursor the first time, then if we move on to the next control will this cursor stay in the same IDC_YOUR_CURSOR? dont it need to change to IDC_IDC_ARROW?
plz teach me
He is like a one-legged man in a bum kicking competition. -Novjot Sidhu
--[v]--
|
|
|
|