WM_USER wrong value ?

Post Reply
yunbg1
Posts: 107
Joined: Sun Nov 13, 2005 12:40 am
Location: Winnipeg Canada

WM_USER wrong value ?

Post 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 -------------------------------------
Last edited by yunbg1 on Mon May 08, 2006 7:10 am, edited 1 time in total.
FWH User
FWPPC User
FWLinux User
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

The following code returns 1024 which it is the right value for WM_USER:

Code: Select all

#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

   if (Msg == WM_USER + 2 )  //1024 + 2 
   { 
      hb_vmPushSymbol( hb_dynsymSymbol( hb_dynsymFindName( "CHANNELCODE" ) ) ); 
You should change it to:

Code: Select all

   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

   if( Msg >= WM_USER + 2 && Msg <= WM_USER + 4 )
   {
      ...
   }
regards, saludos

Antonio Linares
www.fivetechsoft.com
yunbg1
Posts: 107
Joined: Sun Nov 13, 2005 12:40 am
Location: Winnipeg Canada

Post 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.....

[
Last edited by yunbg1 on Mon May 08, 2006 7:11 am, edited 1 time in total.
FWH User
FWPPC User
FWLinux User
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

yun jin song,

Sorry, I don't understand what you mean.
regards, saludos

Antonio Linares
www.fivetechsoft.com
yunbg1
Posts: 107
Joined: Sun Nov 13, 2005 12:40 am
Location: Winnipeg Canada

Post by yunbg1 »

Antonio Linares wrote:yun jin song,

Sorry, I don't understand what you mean.
Thank you. Antonio.
FWH User
FWPPC User
FWLinux User
Post Reply