|
I think I said in another post that this handle only is closed by one thread and after closing all other threads. Thanks for the effort Cedric . I noticed a mistake of mine. while critical section is not necessary because never two threads use it synchronously but I noticed that mistakenly I terminate the thread and after that I try to close handle that has been created within that thread .No wonder! silly !
thanks all you guys, you are really helpful
|
|
|
|
|
You need to refer the API documentation,
The API that returns HANDLE to system resource has different behaviour on return values, for example CreateFile returns INVALID_HANDLE_VALUE while CreateEvent returns NULL on failure, so checking the handle on CloseHandle depends on the API that created the Handle.
Are u looking for _CrtIsValidPointer, _CrtIsValidHeapPointer for pointer validation. AfxIsValidAddress (MFC)
modified on Monday, February 04, 2008 5:52:35 AM
|
|
|
|
|
bingo! AfxIsValidAddress() thanks alot RR
Oh Thanks for the point about handles I have to be more careful,
|
|
|
|
|
Hi everybody,
i like to display a Loading-Dialog right into the view, not as Modal.
So i call "Create" from the Dialog-Class and also OnInit()
The dialog will be drawn on the view, but the other controls on the view are redrawn over
this dialog.
Which handler or function does i need to override for that the dialog will be drawn at least,
for the reason that the dialog is painted OVER all other controls.
Big thanks for your help
|
|
|
|
|
play around the Z-order of the dialog window (SetWindowPos)
|
|
|
|
|
I'll try it, thanks
|
|
|
|
|
I don't think it will work to change the Z-order. The Z-order is updated according to the user activity, a click on a control will bring it to the front.
You can have a dialog in the view window using standars MFC features. Instead of deriving your view class from CView, derive it from CFormView. The CFormView embeds a standard dialog template.
|
|
|
|
|
I have plotted a graph in a Picture control. Now I want to click the mouse on top of some points of the graph and then get the coordinate of that point. Can anyone help? Many thx~~~
Kennis
|
|
|
|
|
Actually mouse click notifications (for instance, WM_LBUTTONDOWN ) provide pointer coordinates.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
s Mr.pallni says absolutely true..i already checked it..
raju.k
|
|
|
|
|
Have u checked on the picture control
|
|
|
|
|
Adding to CPallini, u may need to subclass the picture control to get the mouse events
|
|
|
|
|
I dont know how to get the coordinate of the picture control. So finally I subtract the offset of the top left corner of the picture control. This method may be silly but can achieve what i want to do
|
|
|
|
|
Hi..
I want use progress bar using command line programming...plz help me...
thanks in advance..
Hi,,
I am sharan.Working as a software Engineer in Indo-Fuji Software Company located in BTM Layout.Bangalore.India.
I have Completed my B.E(COmputers)in 2006.ANd I am having 2 years of Exp in VC++.
thanking you
sharan
|
|
|
|
|
sharanu wrote: I want use progress bar using command line programming...plz help me...
Command line programming?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
|
Aaah, yes Command Line Programming. Now everything is clear
|
|
|
|
|
Command Line Programming, why didn't I realize before? My bad!
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
Since you don't explain further what do you mean with 'Command Line Programming', I suppose you're talking about Console applications, i.e. character oriented ones. Now what has to do a window control, like the progress bar, with a character oriented application?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
In graphical mode.
Maxwell Chen
|
|
|
|
|
?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
Remember the graphical mode in the old DOS time? It applies to the command prompt window.
Maxwell Chen
|
|
|
|
|
No, I can't understand what you're talking about. Can console applications access single pixels on screen?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
CPallini wrote: Can console applications access single pixels on screen?
Yes. You can run this command edit from a command-prompt or from "Run", and you see a blue DOS application with the menu items in gray.
edit
Maxwell Chen
|
|
|
|
|
And if you have the 16-bit version Ghost v11 (run under pure DOS [Win98 boot diskette] ), You see it even draw pretty windows.
Maxwell Chen
|
|
|
|