SpinControl Help!! It's urgent! 
Author Message
 SpinControl Help!! It's urgent!

Hi all!

I've got a big problem to get Messages from a
CSpinButtonCtrl which is placed in a form. I don't know
how but I don't think this must be a difficult thing, or
is it?
I read much about WM_NOTIFY,WM_VSCROLL, WM_HSCROLL and
UDN_DELTAPOS... Everywhere stands the syntax of this -
let's call them functions- but no where there isn't any
got example but only with an example I think I would be
able to understand how a SpinControl sends Messages (or
even works).

What I have is a window which is splittet. At one side I
have an edit window which contains a grid such as a font
editor. This grid has several colums and rows. At the
other side I have a form which contains a SpinControl.
With this SpinControl I want to edit the number of rows or
colums of the gridwindow!

Please send me an example or even some peace of code so
that I can see how this works because now I'm searchin for
three days for a solution and I'm really despaired.

Many, many thanks for any help I'm getting.

Greez
Ralf



Tue, 24 Aug 2004 00:00:33 GMT  
 SpinControl Help!! It's urgent!
Funny, I had some trouble with this myself yesterday,
having upgraded to VS.net - I couldn't find a way to make
a buddy control from the spin control??  I'm not sure
about forms but the normal message handler for
CSpinButtonCtrl is like this:-

void CMyOptions::OnDeltaposSpin1(NMHDR *pNMHDR, LRESULT
*pResult)
{
        LPNMUPDOWN pNMUpDown = reinterpret_cast<LPNMUPDOWN>
(pNMHDR);
        UpdateData();
        if(pNMUpDown->iDelta < 0 && m_NumImagesToSend <
m_MaxImages) {
                // up
                m_NumImagesToSend ++;
        }
        else if(pNMUpDown->iDelta > 0 && m_NumImagesToSend

Quote:
> 0) {

                // down
                m_NumImagesToSend --;
        }
        UpdateData(false);

        *pResult = 0;

Quote:
}
>-----Original Message-----
>Hi all!

>I've got a big problem to get Messages from a
>CSpinButtonCtrl which is placed in a form. I don't know
>how but I don't think this must be a difficult thing, or
>is it?
>I read much about WM_NOTIFY,WM_VSCROLL, WM_HSCROLL and
>UDN_DELTAPOS... Everywhere stands the syntax of this -
>let's call them functions- but no where there isn't any
>got example but only with an example I think I would be
>able to understand how a SpinControl sends Messages (or
>even works).

>What I have is a window which is splittet. At one side I
>have an edit window which contains a grid such as a font
>editor. This grid has several colums and rows. At the
>other side I have a form which contains a SpinControl.
>With this SpinControl I want to edit the number of rows
or
>colums of the gridwindow!

>Please send me an example or even some peace of code so
>that I can see how this works because now I'm searchin
for
>three days for a solution and I'm really despaired.

>Many, many thanks for any help I'm getting.

>Greez
>Ralf
>.



Tue, 24 Aug 2004 01:15:50 GMT  
 SpinControl Help!! It's urgent!
1) Using the ClassWizard map the UDN_DELTAPOS notification message for the
ID of your SpinControl to a function.

2) That member function will have a NMHDR* as its first parameter.  This
needs to be cast to a NM_UPDOWN*.  I'm not sure, but I think the ClassWizard
provides this cast on your behalf.  Regardless, it should look something
like this:

 NM_UPDOWN* pNMUpDown = (NM_UPDOWN*)pNMHDR;

3) The NM_UPDOWN structure has a member called iDelta that indicates which
button (up or down) has been pressed.  Test that value and do whatever you
want to your font grid according to the result.

 if (pNMUpDown->iDelta > 0)
 {
    // do whatever

Quote:
}

else if (pNMUpDown->iDelta < 0)
{
    // do whatever else

Quote:
}

If you want/need it, the NM_UPDOWN carries additional information.  Take a
look at the documentation and/or look at the structure in the de{*filter*}.

TFM3

Note: Spam-resistant e-mail address


Quote:
> Hi all!

> I've got a big problem to get Messages from a
> CSpinButtonCtrl which is placed in a form. I don't know
> how but I don't think this must be a difficult thing, or
> is it?
> I read much about WM_NOTIFY,WM_VSCROLL, WM_HSCROLL and
> UDN_DELTAPOS... Everywhere stands the syntax of this -
> let's call them functions- but no where there isn't any
> got example but only with an example I think I would be
> able to understand how a SpinControl sends Messages (or
> even works).

> What I have is a window which is splittet. At one side I
> have an edit window which contains a grid such as a font
> editor. This grid has several colums and rows. At the
> other side I have a form which contains a SpinControl.
> With this SpinControl I want to edit the number of rows or
> colums of the gridwindow!

> Please send me an example or even some peace of code so
> that I can see how this works because now I'm searchin for
> three days for a solution and I'm really despaired.

> Many, many thanks for any help I'm getting.

> Greez
> Ralf



Tue, 24 Aug 2004 01:29:02 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Some one please help me - it's urgent

2. I can't get with SQLConfigDataSource, urgent help

3. SpinControl

4. spincontrol,editcontrol

5. URGENT URGENT dlopen() help needed...

6. URGENT URGENT PLEASE HELP ME ActiveX multiples classes

7. Urgent Help Needed-Calling the help file.

8. HELP - URGENT - Recordset is readonly....help!!

9. HELP - URGENT - Recordset is readonly....help!!

10. Help!Help! Urgent

11. URGENT please : String conversion's

12. prefix convert postfix but doesn't through infix *** URGENT ***

 

 
Powered by phpBB® Forum Software