|
Yeah I agree Tooltip is good selection.
|
|
|
|
|
, Guys thank you very much for your help and fast respond .
|
|
|
|
|
I glad your problem solved.;)
|
|
|
|
|
Hamid. wrote: I glad your problem solved.
me too!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hi All,
In a Multithreaded App, is it possible to create a rabbit from a thread? A rabbit means the worker thread would jump back into the main thread and exit (abandoning it's own ThreadProc exit).
Jeff
|
|
|
|
|
In a multithreaded Windows application?
I've personally never heard of that, but it doesn't sound
possible with Windows threads. There's no way to jump to
another thread.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Jeffrey Walton wrote: A rabbit means the worker thread would jump back into the main thread and exit
Is the goal to force the creation of a rabbit? or is the goal some functionality that the rabbit provides? if the latter, have you considered a method that achieves the same results?
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
Hi El Corazon,
El Corazon wrote: Is the goal to force the creation of a rabbit?
This part is easy - CreateThread() does the trick. It's the non-standard behavior
El Corazon wrote: or is the goal some functionality that the rabbit provides
It is an academic exercise to see what I can accomplish within the restraints of the compiler.
Jeff
|
|
|
|
|
I'm working in VC++6. How can i do to set the cursor in a row position of CLisCtrl? That way, if the user press down or up arroy the movement starts from the designated position. I can use the CListCtrl.EnsureVisible( iPos, TRUE) to ensure visibility but the movement starts from the begin.
Thanks a lot.
|
|
|
|
|
Try using list.SetItemState(iPos,LVIS_FOCUSED,LVIS_FOCUSED) .
See CListCtrl::SetItemState[^] for more information.
Software Zen: delete this;
|
|
|
|
|
|
You're welcome. I've used the list control a fair amount, and I know some of the things that ought to be easy can be difficult to find in the MS documentation.
Software Zen: delete this;
|
|
|
|
|
Gary Wheeler wrote: easy can be difficult to find in the MS documentation.
Humm, sometimes!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
I agree too. Examples in MS documents are so poor.
m_mylistctrl.SetItemState(iItem, LVIS_SELECTED, LVIS_SELECTED);
BOOL SetItemState(
int nItem,
UINT nState,
UINT nMask
);
But I still don't know what do these two LVIS_SELECTED mean. Should they always be the same? Anybody can tell me?
|
|
|
|
|
This approach lets you set some state bits and clear others in a single call. The nState argument contains the bits you want to set, while the nMask argument contains the bits you want to change. For example, if you call it like this:
m_mylistctrl.SetItemState(iItem,LVIS_FOCUSED,(LVIS_FOCUSED | LVIS_SELECTED)); this would set the LVIS_FOCUSED state and clear the LVIS_SELECTED state for the specified item.
Software Zen: delete this;
|
|
|
|
|
Not agree...
I have many times found no usefull help in MSDN. It depends on what you look for. Some times the explanations are too poor and the examples vanal.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
I didn't say MSDN was perfect. I just said that it was often more difficult to find things in it than it should be. The MSDN Library has been reorganized several times, often without any improvement in content.
Software Zen: delete this;
|
|
|
|
|
Sorry, then I missunderstood you.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
Hi,
I am having this image viewing program where I have a dialog that gets created (using DoModal) for adjusting brightness/contrast with initial values set by main frame. I would like to know how I can update the image thats being displayed on main frame whenever I change the values in the pop up dialog.
thanks in advance,
-PNT
PKNT
|
|
|
|
|
one way is to use SendMessage to send the updated values
|
|
|
|
|
or pass a pointer to the main window to the child dialog.
or use the observer/observable pattern.
|
|
|
|
|
yep got it.... the problem is I am including the header file of my child dialog in my DOC header file and when I try to define a pointer to to a doc object in my child dialog's header file by including the main frame's header file in it, it gave me error of undefined symbol error. Then i tried to include the child dialog's header file in the main frame's cpp file and now its working fine.
thanks for your replies.
PKNT
|
|
|
|
|
I've got a full screen dialog application in which i want the user to be able to drag any dialogs which pop up to any position they want on the screen but also to limit them from certain areas of the screen. I've used the following article http://www.codeproject.com/dialog/dragwindows.asp?df=100&forumid=4307&exp=0&select=1749703[^] for the dragging of the dialog (using the OnNcHitTest method). However I can't figure out how to limit where they can drag the dialog. I've though it would be a simple matter of converting the CPoint position for the mouse into screen co-ordinates and checking if it is in a forbidden region and then setting it to be outside of this region.
Any suggestions?
cheers,
Andy
|
|
|
|
|
ok, found my first mistake, was looking at the x part of the CPoint instead of the y!
I think I've figured the problem, the OnNcHitTest only seems to be called when I've released the left mouse button, so during my drag it doesn't get called. Is there anyway around this?
|
|
|
|
|
mcsherry wrote: the OnNcHitTest only seems to be called when I've released the left mouse button, so during my drag it doesn't get called
That's because the system enters a modal message loop for the duration of
the drag.
You may want to take a look at the WM_MOVING message.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|