Click here to Skip to main content
15,914,111 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Catching Keystrokes from a CEditView Pin
Tomasz Sowinski22-Aug-01 23:28
Tomasz Sowinski22-Aug-01 23:28 
GeneralModaless Dialog Box Pin
John Uhlenbrock22-Aug-01 11:23
John Uhlenbrock22-Aug-01 11:23 
GeneralRe: Modaless Dialog Box Pin
John Uhlenbrock22-Aug-01 12:13
John Uhlenbrock22-Aug-01 12:13 
GeneralRe: Modaless Dialog Box Pin
Christian Graus22-Aug-01 12:35
protectorChristian Graus22-Aug-01 12:35 
GeneralRe: Modaless Dialog Box Pin
John Uhlenbrock22-Aug-01 12:41
John Uhlenbrock22-Aug-01 12:41 
GeneralRe: Modaless Dialog Box Pin
Christian Graus22-Aug-01 12:46
protectorChristian Graus22-Aug-01 12:46 
GeneralRe: Modaless Dialog Box Pin
John Uhlenbrock22-Aug-01 13:03
John Uhlenbrock22-Aug-01 13:03 
GeneralRe: Modaless Dialog Box Pin
Christian Graus22-Aug-01 13:08
protectorChristian Graus22-Aug-01 13:08 
I remember having trouble like that. I did a colour picker dialog and made it so you could click anywhere on the screen to select colours. I'm loading the code right now to see what I did.

I set a timer in OnInit to go off twice a second and then do this:

if(nIDEvent == 42)
{
    CPoint pt;
    GetCursorPos(&pt);

    CRect rc;
    GetWindowRect(&rc);

    if (!rc.PtInRect(pt))
        SetCapture();
}
CDialog::OnTimer(nIDEvent);


In MouseMove I do this:

CPoint pt;
GetCursorPos(&pt);

CRect rc;
GetWindowRect(&rc);

if (rc.PtInRect(pt))
    ReleaseCapture();


Essentially I found I had to release capture every time the mouse was in the dialog, and set it before it left, releasing it when people click.


Christian

As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.

Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
GeneralRe: Modaless Dialog Box Pin
Anders Molin22-Aug-01 23:25
professionalAnders Molin22-Aug-01 23:25 
GeneralRe: Modaless Dialog Box Pin
Dave Glick23-Aug-01 4:39
Dave Glick23-Aug-01 4:39 
GeneralVK_RIGHT and VK_UP doesn't work... Pin
22-Aug-01 11:05
suss22-Aug-01 11:05 
GeneralRe: VK_RIGHT and VK_UP doesn't work... Pin
Christian Graus22-Aug-01 12:42
protectorChristian Graus22-Aug-01 12:42 
GeneralRe: VK_RIGHT and VK_UP doesn't work... Pin
23-Aug-01 4:28
suss23-Aug-01 4:28 
GeneralVC++: F12 (Go To Definition) bolloxed Pin
Jim A. Johnson22-Aug-01 10:49
Jim A. Johnson22-Aug-01 10:49 
GeneralRe: VC++: F12 (Go To Definition) bolloxed Pin
Matt.W.22-Aug-01 18:30
Matt.W.22-Aug-01 18:30 
GeneralRe: VC++: F12 (Go To Definition) bolloxed Pin
Jim A. Johnson22-Aug-01 18:31
Jim A. Johnson22-Aug-01 18:31 
QuestionHow do I catch an ActiveX event? Pin
Craig Miller22-Aug-01 10:36
Craig Miller22-Aug-01 10:36 
AnswerRe: How do I catch an ActiveX event? Pin
22-Aug-01 23:43
suss22-Aug-01 23:43 
GeneralProperty sheet in CFormView Pin
22-Aug-01 10:14
suss22-Aug-01 10:14 
GeneralDLL . PLEASE HELP !!! PLEASE !!! a simple and basic explanation about creation fo DLL file . HELP !!!!! Pin
22-Aug-01 9:21
suss22-Aug-01 9:21 
GeneralIs no one want to help me ??? Pin
22-Aug-01 20:55
suss22-Aug-01 20:55 
GeneralRe: Is no one want to help me ??? Pin
Mukkie23-Aug-01 10:22
Mukkie23-Aug-01 10:22 
GeneralCreateBitmap problems Pin
Philip Patrick22-Aug-01 8:48
professionalPhilip Patrick22-Aug-01 8:48 
GeneralRe: CreateBitmap problems Pin
Christian Graus22-Aug-01 12:44
protectorChristian Graus22-Aug-01 12:44 
GeneralRe: CreateBitmap problems Pin
Philip Patrick23-Aug-01 9:32
professionalPhilip Patrick23-Aug-01 9:32 

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.