Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Code Samples & Tips > Additional Libraries
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Additional Libraries Users contributed libraries.
This sub-forum is only available to licensed users.

WindowMessage library

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-13-2009, 11:21 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default WindowMessage library

Since dzt wrote the dzEventsMagic library and I (sort of) documented it Basic4ppc has moved on. As dzt seems to have vanished from the forum I decided that I would create a similar, but enhanced, internally simplified and mergeable, library to replace it.

So for those few of us who might want to intercept and send Window Messages here is library, source for merging, help and demo application.
Attached Files
File Type: zip WindowMessage1.0.zip (21.7 KB, 187 views)
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #2 (permalink)  
Old 11-13-2009, 03:16 PM
Basic4ppc Veteran
 
Join Date: May 2008
Location: Newcastle Upon Tyne - England
Posts: 271
Awards Showcase
Beta Tester 
Total Awards: 1
Default

This is great, I've been wanting something like this for a while - but I think I ask too much anyway.

but can I most humbly say the help file does not work for me? I'm using XP SP2. I'm getting "The page cannot be displayed" messages.
Reply With Quote
  #3 (permalink)  
Old 11-13-2009, 03:30 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by Zenerdiode View Post
I'm getting "The page cannot be displayed" messages.
You probably need to unblock it as it is probably being considered a security risk as a download. It's somewhere in
Right click -> Properties I think.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #4 (permalink)  
Old 11-13-2009, 03:43 PM
Basic4ppc Veteran
 
Join Date: May 2008
Location: Newcastle Upon Tyne - England
Posts: 271
Awards Showcase
Beta Tester 
Total Awards: 1
Default

I'm sorry but I had completely disregarded that because I mistakingly thought it affected Windows Vista and above only. It was in Properties and once unblocked it never asks again. Thank You.
Reply With Quote
  #5 (permalink)  
Old 11-14-2009, 04:53 PM
Senior Member
 
Join Date: Dec 2007
Posts: 149
Awards Showcase
Beta Tester Beta Tester 
Total Awards: 2
Default WM_VSROLL and WM_HSCROLL for MDI Client

Hello Andrew,
in my curent Desktop-Project I use dzEvent_Magic to get x- and y- scroll position from the scrollbars, of an MDI Client, which is set to Autoscroll like this:

#Region BuildFormEx3
AddForm("Form3", "Report")
FormEx3.New2("Form3","Report",600,600)
AddImage("Form3", "ImageF", 580, 580, 20, 20)
FormEx3.AddControl("ImageF")
AddImage("Form3", "ImageB", 580, 560, 20, 20)
FormEx3.AddControl("ImageB")
AddImage("Form3", "ImageZF", 580, 540, 20, 20)
FormEx3.AddControl("ImageZF")
AddImage("Form3", "ImageZB", 580, 520, 20, 20)
FormEx3.AddControl("ImageZB")
AddImage("Form3", "VLinImage", 15, 0, 15, 15)
FormEx3.AddControl("VLinImage")
AddImage("Form3", "HLinImage", 0, 15, 15, 15)
FormEx3.AddControl("HLinImage")
FormEx3.StartPosition = 0
FormEx3.WindowState = 0
FormEx3.ImageLayout = 0
frm3obj.FromControl(FormEx3.ControlRef)
frm3obj.SetProperty("AutoScroll", True)
dzem.New1(FormEx3.ControlRef, False)
dzem.Hook(276) 'WM_HSCROLL
dzem.Hook(277) 'WM_VSCROLL

hscrollobj.value = frm3obj.GetProperty("HorizontalScroll") ' returns an HScrollProperties type
hscrollobj.SetProperty("LargeChange", 100)
vscrollobj.value = frm3obj.GetProperty("VerticalScroll") ' returns an VScrollProperties type
vscrollobj.SetProperty("LargeChange", 100)
#End Region

The events are catched by this Sub(It's from an example in the Forum I didn't fin again):
Sub dzem_MagicEvent ' notice we seem to get two events for every scoll action!
msg1 = dzem.msg
Select msg1
Case 276
If Htoggle Then
ScrX = hscrollobj.GetProperty("Value")
IDebug.Text = FormEx3.ClientAreaHeight 'ScrXMax -
IScrolX.Text = ScrX
VLinImage.Left = (ScrX/(FormEx3.ClientAreaWidth-15))
VLinImage.BringToFront
End If
Htoggle = Not(Htoggle)
Case 277
If Vtoggle Then
ScrY = vscrollobj.GetProperty("Value")
IScrolY.Text = ScrY
HLinImage.Top = (ScrY/(FormEx3.ClientAreaHeight-15))-1
HLinImage.BringToFront
End If
Vtoggle = Not(Vtoggle)
End Select
End Sub

Is it possible to realize it with WindowsMessageDesktop.dll too?
I put the whole Project to this post too. It's buggie but it has been compieled(Desktop)
To see the window you have to click the Menue "Report", "Neu"
It would be verry nice, if it is possible, because the dzt dll is not mergeable.

Best Regards

berndgoedecke
Reply With Quote
  #6 (permalink)  
Old 11-14-2009, 05:25 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Quote:
Originally Posted by berndgoedecke View Post
It would be verry nice, if it is possible, because the dzt dll is not mergeable.
That's the main reason I wrote this, so it could replace dzMagicEvents and be mergeable.
Code:
<font color="blue">dzem.New1(FormEx3.ControlRef, False)</font>
becomes
<font color=
"blue">WinMSg.New1(FormEx3.ControlRef)
WinMsg.Start</font><font color=
"SeaGreen"' might be better to do this after setting the traps</font>

<font color=
"Blue">dzem.Hook(276)</font> <font color="seagreen">'WM_HSCROLL</font>
becomes
<font color=
"blue">WinMsg.Trap(276)</font>

<font color=
"blue">dzem.Hook(277)</font><font color="SeaGreen"'WM_VSCROLL</font>
becomes
<font color=
"blue">WinMsg.Trap(277)</font>

<font color=
"blue">Sub dzem_MagicEvent</font>
becomes
<font color=
"blue">Sub WinMsg_TrapEvent</font>

<font color=
"Blue">msg1 = dzem.msg</font>
becomes
<font color=
"blue">msg1 = WinMsg.wMsg</font>

You must have a Form close event but you don
't need to unhook each message
<font color="Blue">Sub FormEx3_Close
    WinMsg.Stop
End Sub</font>
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #7 (permalink)  
Old 11-15-2009, 09:33 AM
Senior Member
 
Join Date: Dec 2007
Posts: 149
Awards Showcase
Beta Tester Beta Tester 
Total Awards: 2
Default Event does not fire.

Hello Agraham,
I've tried it in the way you have proposed, but the trap event wouldn't work.


Best regards
berndgoedecke
Reply With Quote
  #8 (permalink)  
Old 11-15-2009, 09:49 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

In Report02.sbp I can't see a WindowMessage object nor any of the code lines I posted.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #9 (permalink)  
Old 11-15-2009, 10:48 AM
Senior Member
 
Join Date: Dec 2007
Posts: 149
Awards Showcase
Beta Tester Beta Tester 
Total Awards: 2
Default Oh, Sorry. The wrong version

In the meantime a played around with the BigScreenDoor example from the Forum and there it computes, but I don't know why it do not work on the FormEx.

Reply With Quote
  #10 (permalink)  
Old 11-15-2009, 10:53 AM
Senior Member
 
Join Date: Dec 2007
Posts: 149
Awards Showcase
Beta Tester Beta Tester 
Total Awards: 2
Default BigScreenDoor

BigScreenDoor
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Door library (Beta) - Special library Erel Official Updates 60 01-13-2011 11:23 AM
Merging Outlook library and Phone library Erel Official Updates 11 09-15-2010 09:22 AM
PhoneticAlgorithms Library (ex-StringComparison Library) moster67 Additional Libraries 10 11-11-2008 07:46 PM


All times are GMT. The time now is 07:02 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0