|
A safe way to perform object transfer is to create the thread with flag CREATE_SUSPENDED , do the transfer and then call CWinThread::ResumeThread .
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Perfect!
That is ideal, thanks again Joaquin
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
Dear Fellow Programmers,
I have managed to implement the Drag/Drop mechanism. I have also been able to implement a toolbar from which bitmaps can be dragged.
However when I drag the bitmap image over the container window it is unable to drop (it just stays attached to the cursor) when the button is released (On LButtonUp) the bitmap doesn't stay on the screen - it disappears.
I think i need to implement some sort of method in either the OnDraw or OnLButtonUp member functions - and this where the problem really starts!!!.
Can anyone tell me whats going wrong?
|
|
|
|
|
I'm trying to simulate key presses with SendInput. I've discovered that if the string I'm simulating contains 2 or more consecutive identical characters, only one of them appears.
Any ideas?
Thanks!
|
|
|
|
|
This is a stupid question, I know I can use EnumChildWindows () but isn't there a simplier way to do it ? Quick tip please.
Tx.
|
|
|
|
|
Why not just use GetWindow(GW_CHILD) on the mdiframe window, then call GetWindow(GW_HWNDNEXT) for all of its siblings which should be MDI children as well. This should be a small loop.
|
|
|
|
|
Hi all,
I used a ActiveX in my program, one of method in ActiveX appear a MessageBox, i wanna send a message for closing that ...
I wrote it after using of the method:
m_Control.Method() // MessageBox() appeared !
SendMessage( WM_KEYDOWN, 13, 0 );
But it doesn't work, how can do that ?
HELP ME
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
You will not be able to do it from the same thread that you called message box from unless you hook the creation of the message box and subclass the message box, because MessageBox is a modal function. The processing from the message box function will not continue until the Message box window is closed..
|
|
|
|
|
|
Alternatively, you could do a PostMessage (WM_COMMAND, nCode); where nCode is an applicable value such as IDOK, IDCANCEL, etc. In either case, this would need to be done from a separate thread (as pointed out earlier).
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Always is message WM_PAINT (for parent window) sent before message WM_PAINT (for child windows). But I have in OnPaint function(parent window) some drawing code which must redraw childwindows!
for example : You clicked on control (with flag WS_DISABLE => ). App in WM_LBUTTONDOWN(parent window <= control has WS_DISABLE) drow red rectangle on place where you clicked. Next you resizeing/moving windows. Windows call WM_PAINT (for parent window) next for control => If OnPaint (parent window) drow below control you dont see anything
LWB
|
|
|
|
|
There are two things that you could do.
1. Tell the child control not to paint itself at all at the time you are interested in, in your WM_PAINT handler by calling ::ValidateRect(hWndChild, NULL). This will validate the invalid region of your child control, and Windows will never generate a WM_PAINT message for the child.
2. Right before the code that you want to paint the red rectangle or what ever else, force an update of the child window with a call to UpdateWindow(hWndChild), this will force the control to update itself, then you can draw the stuff that you want, and the child will not redraw after that.
|
|
|
|
|
How can i convert my HTML file to rtf file?
Thanks,
Kumar Saurabh
|
|
|
|
|
Just copy and paste the text from IE into Wordpad or Word and save it as an rtf.
Simon
There's one for you, nineteen for me
Sonork ID 100.10024
|
|
|
|
|
Hi Simon,
I don't 'vce to do this manually, but programatically. also i want my html file (with images) to be converted into rtf, not only text. when a HTML file opened in word is saved as rtf, then the conversion is done (this is done by automation) but gif's are not rendered, moreover, if you open the file using wordpad then you won't be able to see any image.
Thnaks,
Kumar Saurabh
Software Engneer
Syndew Pvt Ltd
New Delhi
India
|
|
|
|
|
Its kinda of tedious but this one works.
You need to parse the html content urself and construct the rtf, the rtf specs are available here
Actually I have done the other way around by parsing rtf and then converting into html.
For parsing html i think you need to convert it to xhtml or something like that and then construct rtf accordingly.
If you find a easier way do let me know.
Hope this helps.
Cheers
Kannan
|
|
|
|
|
Search Google for "html2rtf". There are a lot of apps, mostly with source. Here is one that is written in perl.
/moliate
|
|
|
|
|
|
is right - what the hell are you talking about ?
Guessing wildly as to what you may be asking, C# is a new lagnuage which owes more to Java than C++, it does not have MFC.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
|
|
|
|
|
I took it to mean "what will happen to MFC after .NET?".
MFC will continue to be around for a good while, so don't worry.
Simon
There's one for you, nineteen for me
Sonork ID 100.10024
|
|
|
|
|
MFC 7.0
It did not go away since C# and C++.NET came out. Micro$oft just made some bug fixes and enhancements and bumped up the version number.
|
|
|
|
|
Hi !
My App has an Explorer-like interface, with a leftview and a rightview. The leftview is a Tree control and the right view is a List control. I overrides the OnContextMenu function in each view to display a popup menu.
I have something weird : when I right click in the right pane, my popup menu appears normally. When I right click in the left pane, the menu doesn't appear. But, if I right click in the left pane, move the mouse with the right button still pressed and after that, release the right button, the pop up menu appears !!!! In my code, I handle the OnContextMenu the same way in the left view as in the right view !
Does anyone know what could be the problem ?
Thank you !
Jerome
|
|
|
|
|
How to make to select graphically, on Bitmap or another graphic format, a nongeometric zone? I would like, in fact, to represent France with these department in a graphic control and to be able to select department with the mouse. I thought of using the CRgn for the zone of selects but I wish resizing dynamically France?
How can I make?
To forgive my English
|
|
|
|
|
In what way would you like to resize the region? Expand and contract or some other way?
There is no support in WIN32 to automatically grow or shrink a region, but there are things that you could probably do. If you give some more information I could suggest a technique.
|
|
|
|
|
I wish to represent France with his departments in a control dockable in an application MFC SDI. Control is thus resizable and I wish to be able to select graphiquemlent each departments with the mouse.
A simple right clic of the mouse on France control returns me the department selected and allows me to work with this one. But I wish that the graphics of France into dockable control may be resizing automatically.(Like the autoresize in ACDSee). I seek just a method to detect on which department clicked.
|
|
|
|