Click here to Skip to main content
15,920,217 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Tracking a mouse movement inside a dialog without Tab controls Pin
Mark Salsbery6-Nov-07 4:43
Mark Salsbery6-Nov-07 4:43 
GeneralRe: Tracking a mouse movement inside a dialog without Tab controls Pin
Larry Mills Sr6-Nov-07 5:45
Larry Mills Sr6-Nov-07 5:45 
GeneralRe: Tracking a mouse movement inside a dialog without Tab controls Pin
Mark Salsbery6-Nov-07 8:03
Mark Salsbery6-Nov-07 8:03 
GeneralRe: Tracking a mouse movement inside a dialog without Tab controls Pin
Larry Mills Sr6-Nov-07 10:05
Larry Mills Sr6-Nov-07 10:05 
GeneralRe: Tracking a mouse movement inside a dialog without Tab controls Pin
Mark Salsbery6-Nov-07 10:15
Mark Salsbery6-Nov-07 10:15 
GeneralRe: Tracking a mouse movement inside a dialog without Tab controls Pin
Nelek6-Nov-07 21:06
protectorNelek6-Nov-07 21:06 
GeneralRe: Tracking a mouse movement inside a dialog without Tab controls [modified] Pin
Larry Mills Sr7-Nov-07 4:00
Larry Mills Sr7-Nov-07 4:00 
GeneralRe: Tracking a mouse movement inside a dialog without Tab controls Pin
Nelek14-Nov-07 3:35
protectorNelek14-Nov-07 3:35 
OK, sorry for the delayment in the answer, I didn't check my email yet.

1) You know that the user is writing data because you have one of those BOOL with a TRUE value. So if the user press "next" without doing what is needed to be done, you can ask those BOOL and avoid the "next page" giving a message. i.e.

void CYourPage::NextButtonClick ()
{
   if (m_bEdit1Focus || m_bEit2Focus || ... || m_bEditnFocus)
   {    MessageBox ("You are not allow to do that in this moment, XXX must be done before changing page", "info", MB_OK);
        return;
   }
   else
   {   GoToNextPage ();
   }
}


2) I set the HotKey in my resource editor in design time. Associated to a menu option, but it has different functionality according to the class that call the methode, because of that I code the different versions of functionality inside every view/dialog that need it. With HotKey I mean something like Ctrl+O = ID_FILE_OPEN, but I was actually using a bad name, I should say "Accelerator", it was my fault, sorry.


3) That was how I used the idea I told you, you should adapt it to your problem. I mean, you can use the contructor to load the FALSE to the bool variables, you can use the messages Set/KillFocus to manage the state of those variables, you can use the button "next" to perform different functionality asking those variables (see above), or another different message/event.

4) You can keep control of the page taking a pointer with GetActiveWindow () when the page is firstly shown, does your page have something like OnInitialUpdate or OnInitDialog??? If yes, you can use it, when this is called, is very difficult that the user has changed focus, so you have your page active, if you save a pointer into a member variable, you can always control the page using this pointer whenever you need altough the focus is in other control.

I hope it helps 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

“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson

Wink | ;)

Questionfolder constants (for opening) Pin
shpid3r3-Nov-07 12:59
shpid3r3-Nov-07 12:59 
AnswerRe: folder constants (for opening) Pin
Peter Weyzen3-Nov-07 19:01
Peter Weyzen3-Nov-07 19:01 
QuestionGetOpenFileName hangs Pin
andrew_dk3-Nov-07 12:31
andrew_dk3-Nov-07 12:31 
AnswerRe: GetOpenFileName hangs [modified] Pin
Peter Weyzen3-Nov-07 18:44
Peter Weyzen3-Nov-07 18:44 
GeneralRe: GetOpenFileName hangs Pin
andrew_dk3-Nov-07 19:57
andrew_dk3-Nov-07 19:57 
QuestionHeader files #include problem Pin
Oliver1233-Nov-07 11:10
Oliver1233-Nov-07 11:10 
AnswerRe: Header files #include problem Pin
David Crow3-Nov-07 11:56
David Crow3-Nov-07 11:56 
AnswerRe: Header files #include problem Pin
Bram van Kampen3-Nov-07 12:39
Bram van Kampen3-Nov-07 12:39 
GeneralRe: Header files #include problem Pin
Oliver1233-Nov-07 13:58
Oliver1233-Nov-07 13:58 
GeneralRe: Header files #include problem Pin
Peter Weyzen3-Nov-07 19:13
Peter Weyzen3-Nov-07 19:13 
GeneralRe: Header files #include problem Pin
Vaclav_4-Nov-07 5:30
Vaclav_4-Nov-07 5:30 
GeneralRe: Header files #include problem Pin
Peter Weyzen4-Nov-07 6:36
Peter Weyzen4-Nov-07 6:36 
GeneralRe: Header files #include problem Pin
Bram van Kampen4-Nov-07 11:49
Bram van Kampen4-Nov-07 11:49 
GeneralRe: Header files #include problem Pin
Bram van Kampen4-Nov-07 11:11
Bram van Kampen4-Nov-07 11:11 
GeneralRe: Header files #include problem Pin
Oliver1234-Nov-07 11:33
Oliver1234-Nov-07 11:33 
GeneralRe: Header files #include problem Pin
Bram van Kampen4-Nov-07 12:17
Bram van Kampen4-Nov-07 12:17 
GeneralRe: Header files #include problem Pin
Oliver1235-Nov-07 14:23
Oliver1235-Nov-07 14:23 

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.