Search found 8 matches

by waldschrath
Mon Jan 19, 2009 9:06 pm
Forum: Coding Questions
Topic: Save WebGadget contents as image?
Replies: 14
Views: 2586

The following works for me:

Procedure SavePicture()
UsePNGImageEncoder()
DeleteFile("c:\Screenshot.png")
windowhandle=GadgetID(1)
GetClientRect_(windowhandle, @cr.RECT)
CreateImage(0, cr\right-cr\left, cr\bottom-cr\top, 24)
hdc=StartDrawing(ImageOutput(0))
SendMessage_(windowhandle, #WM ...
by waldschrath
Sun Jul 27, 2008 8:30 pm
Forum: Tricks 'n' Tips
Topic: ListView: Tooltip if text is too long for the list
Replies: 6
Views: 3269

Since my last Comment was probably not very helpful, I should probably add some sample Code to show what I mean.


#TTF_TRACK = $20
#TTF_TRANSPARENT = $100

#SM_CXTHUMB = 10

#LB_ITEMFROMPOINT = $01A9


Structure CBINFOTIPINFO
TipHandle.l
ListboxHandle.l
TipInfo.TOOLINFO
CurrentItem.l ...
by waldschrath
Sat Jul 26, 2008 2:16 pm
Forum: Tricks 'n' Tips
Topic: ListView: Tooltip if text is too long for the list
Replies: 6
Views: 3269

I dont think it is possible with just a Flag. You have to handle the Tooltips yourself.
by waldschrath
Fri Apr 25, 2008 5:16 pm
Forum: Coding Questions
Topic: Calling a PB procedure from JavaScript?
Replies: 25
Views: 10668

Define the following constant:

#DOCHOSTUIFLAG_NO3DBORDER = $4

and change the line below, which is in the Procedure IDocHostUIHandlerImpl_GetHostInfo, from

*pInfo\dwFlags = #DOCHOSTUIFLAG_DIV_BLOCKDEFAULT + #DOCHOSTUIFLAG_OPENNEWWIN

to

*pInfo\dwFlags = #DOCHOSTUIFLAG_DIV_BLOCKDEFAULT ...
by waldschrath
Sun Jan 13, 2008 11:01 pm
Forum: Coding Questions
Topic: Knowing file size of saved BMP, JPG and PNG images
Replies: 17
Views: 3599

This is not tested, just an Idea. Use Gdi+ to save the Image to an IStream and the call IStream\Stat.
http://www.purebasic.fr/english/viewtopic.php?t=28290 gives an example of saving an Image using Gdi+. Instead of ""GdipSaveImageToFile" you use "GdipSaveImageToStream" and "StringToBStr(filenameout ...
by waldschrath
Fri Jan 11, 2008 10:11 pm
Forum: Coding Questions
Topic: Usenet
Replies: 12
Views: 1951

Each command has to be terminated by CR-LF. The Code below returns a response from the Server, even if it is only "500 syntax error or unknown command".



InitNetwork()
*HoldData.l = AllocateMemory(1000)
lResult.l = OpenNetworkConnection("news.giganews.com", 119, #PB_Network_TCP)
If lResult ...
by waldschrath
Fri Jan 11, 2008 9:48 pm
Forum: Coding Questions
Topic: Calling a PB procedure from JavaScript?
Replies: 25
Views: 10668

The Code below sets a Custom IDocHostUIHandler Interface, which returns an IDispatch-Interface through its "external" method. This Interface can than be accessed by javascript using the "external" Keyword. The IDispatch Interface currently implements only one method, called "raiseEvent", which takes ...
by waldschrath
Fri Nov 03, 2006 9:02 am
Forum: Coding Questions
Topic: Strange result from WaitWindowEvent?
Replies: 5
Views: 1234

You can find some Info about this Message here: http://support.microsoft.com/?id=108938