Page 1 of 1

WM_USER wrong value ?

PostPosted: Sun Apr 30, 2006 1:17 pm
by yunbg1
Hi Antonio.

We see a downside sample.

See a WindowProc Function.

WM_USER to be defined at the include.

It comes out so that (Msg) edge is wrong.

Msg result is 1026, 1027, 1028 this toe.

But.. Different value comes out.

We have probably wrong value.

How is the Receive Normal numerical value.


Yun jin Song

FWH USER -------------------------------------

PostPosted: Mon May 01, 2006 2:21 pm
by Antonio Linares
The following code returns 1024 which it is the right value for WM_USER:
Code: Select all  Expand view
#include "FiveWin.ch"

FUNCTION main()

   MsgInfo( WM_USER )
   
RETURN NIL


Besides that, you code is wrong as you are just calling your PRG function on this specific value:
Code: Select all  Expand view
   if (Msg == WM_USER + 2 )  //1024 + 2
   {
      hb_vmPushSymbol( hb_dynsymSymbol( hb_dynsymFindName( "CHANNELCODE" ) ) );

You should change it to:
Code: Select all  Expand view
   if (Msg == WM_USER + 2 )  // 1026
   {
      ...
   }
   else if( Msg == WM_USER + 3 ) // 1027
   {
      ...
   }
   else if( Msg == WM_USER + 4 ) // 1028
   {
      ...
   }

Or change it into:
Code: Select all  Expand view
   if( Msg >= WM_USER + 2 && Msg <= WM_USER + 4 )
   {
      ...
   }

PostPosted: Tue May 02, 2006 1:04 am
by yunbg1
Hi Antonio.

I thank for having the concern.
But..

A next code.
Over 1024 which Msg increases obviously comes over.
Msg = 1026 or 1027, 1028

But we do not exist properly the value.
Do you have probably the problem different?

WM_ACTIVATE and send 1026, 1027, 1028 firsts.
We VISUAL_BASIC well.

I Thank.

yun jin song.....

[

PostPosted: Tue May 02, 2006 7:05 am
by Antonio Linares
yun jin song,

Sorry, I don't understand what you mean.

PostPosted: Mon May 08, 2006 7:11 am
by yunbg1
Antonio Linares wrote:yun jin song,

Sorry, I don't understand what you mean.


Thank you. Antonio.