Click here to Skip to main content
15,898,222 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionInternet blocking in Windows 98 Pin
T5329-Apr-06 17:15
T5329-Apr-06 17:15 
QuestionRe: Internet blocking in Windows 98 Pin
David Crow10-Apr-06 3:23
David Crow10-Apr-06 3:23 
AnswerRe: Internet blocking in Windows 98 Pin
ThatsAlok10-Apr-06 7:36
ThatsAlok10-Apr-06 7:36 
QuestionCPP,MFC,.DEF Files Pin
Bram van Kampen9-Apr-06 13:24
Bram van Kampen9-Apr-06 13:24 
AnswerRe: CPP,MFC,.DEF Files Pin
David Crow10-Apr-06 3:27
David Crow10-Apr-06 3:27 
GeneralRe: CPP,MFC,.DEF Files Pin
Bram van Kampen11-Apr-06 15:02
Bram van Kampen11-Apr-06 15:02 
QuestionHow to draw a bit map when mouse is pressed ? Pin
Surivevoli9-Apr-06 12:51
Surivevoli9-Apr-06 12:51 
AnswerRe: How to draw a bit map when mouse is pressed ? Pin
Bram van Kampen9-Apr-06 13:55
Bram van Kampen9-Apr-06 13:55 
Sniff | :^) This is Not a simple Problem, and a Full solution for your own custom application will resort to a long list of API's

The Outline would be as follows:-
-Create a Dialog with a Bitmap Resource in it.
-Assign a Bitmap
-In the Dialog, implement the OnPaint Method to paint the Bitmat,taking account of where you want it painted.
-Use the WM_MOUSEBUTTON messages to capture the mouse when it is clicked over the immage
-Use the WM_MOUSEMOVE messages to track the mouse, and to issue WM_PAINT messages to keep the image following the mouse.
(The Latter is not as simple as it seems)as you will discover.
You will also see that the easier UpdateWindow Call does not work for this in a dialog, it only sends a WM_PAINT after you finally release the mouse button.
As I said, Not a simple task, there is not a single API available that does the lot, Also, not a task for beginners(Choose something simpler, i.e. Move the Image to where the mouse was released, without dragging), at the same time, we all have to start somewhere. The prize is, that when you master this, you have learned a lot about the Windows API.

Let me know how you get on
Regards


LateNightsInNewry
GeneralRe: How to draw a bit map when mouse is pressed ? Pin
Surivevoli9-Apr-06 14:15
Surivevoli9-Apr-06 14:15 
GeneralRe: How to draw a bit map when mouse is pressed ? Pin
Bram van Kampen9-Apr-06 14:47
Bram van Kampen9-Apr-06 14:47 
GeneralRe: How to draw a bit map when mouse is pressed ? Pin
Surivevoli9-Apr-06 15:52
Surivevoli9-Apr-06 15:52 
GeneralRe: How to draw a bit map when mouse is pressed ? Pin
Waldermort9-Apr-06 15:54
Waldermort9-Apr-06 15:54 
GeneralRe: How to draw a bit map when mouse is pressed ? Pin
Surivevoli9-Apr-06 16:14
Surivevoli9-Apr-06 16:14 
AnswerRe: How to draw a bit map when mouse is pressed ? Pin
Laxman Auti10-Apr-06 0:51
Laxman Auti10-Apr-06 0:51 
QuestionOpenFileDialog Pin
EhsB9-Apr-06 10:52
EhsB9-Apr-06 10:52 
QuestionKeyboard hook code explanation Pin
EvScott9-Apr-06 8:38
EvScott9-Apr-06 8:38 
AnswerRe: Keyboard hook code explanation Pin
PJ Arends9-Apr-06 10:04
professionalPJ Arends9-Apr-06 10:04 
AnswerRe: Keyboard hook code explanation Pin
Bram van Kampen9-Apr-06 15:01
Bram van Kampen9-Apr-06 15:01 
QuestionHOW TO DETECT MEMORY LEAKS Pin
Rafael Fernández López9-Apr-06 7:32
Rafael Fernández López9-Apr-06 7:32 
AnswerRe: HOW TO DETECT MEMORY LEAKS Pin
sunit59-Apr-06 19:12
sunit59-Apr-06 19:12 
QuestionSTL Qs Pin
RalfPeter9-Apr-06 6:10
RalfPeter9-Apr-06 6:10 
AnswerRe: STL Qs Pin
Chris Losinger9-Apr-06 7:07
professionalChris Losinger9-Apr-06 7:07 
AnswerRe: STL Qs Pin
Jörgen Sigvardsson9-Apr-06 10:40
Jörgen Sigvardsson9-Apr-06 10:40 
QuestionCArray of CBrush and CRgn Pin
stifmeister_ro9-Apr-06 6:10
stifmeister_ro9-Apr-06 6:10 
AnswerRe: CArray of CBrush and CRgn Pin
Michael Dunn9-Apr-06 7:15
sitebuilderMichael Dunn9-Apr-06 7:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.