WM_USER wrong value ?

WM_USER wrong value ?

Postby yunbg1 » Sun Apr 30, 2006 1:17 pm

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
yunbg1
 
Posts: 107
Joined: Sun Nov 13, 2005 12:40 am
Location: Winnipeg Canada

Postby Antonio Linares » Mon May 01, 2006 2:21 pm

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 )
   {
      ...
   }
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42077
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby yunbg1 » Tue May 02, 2006 1:04 am

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
yunbg1
 
Posts: 107
Joined: Sun Nov 13, 2005 12:40 am
Location: Winnipeg Canada

Postby Antonio Linares » Tue May 02, 2006 7:05 am

yun jin song,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42077
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby yunbg1 » Mon May 08, 2006 7:11 am

Antonio Linares wrote:yun jin song,

Sorry, I don't understand what you mean.


Thank you. Antonio.
FWH User
FWPPC User
FWLinux User
yunbg1
 
Posts: 107
Joined: Sun Nov 13, 2005 12:40 am
Location: Winnipeg Canada


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 74 guests