Search found 557 matches

by mjs
Feb 27, 2006 23:52
Forum: DOS
Topic: Problem with simple graphics in DOS
Replies: 24
Views: 12007

I didn't find the reason for the problem yet. I'm still working on it.

Regards,
Mark
by mjs
Feb 26, 2006 9:56
Forum: Beginners
Topic: Help needed with LPRINT
Replies: 21
Views: 5382

1. Is there an easy way to print to the default Windows printer? Sorry, there is no easy way for you to specify the default printer. When you use LPRINT, it automatically uses the printer attached to LPT1 or - if none is attached at this port - the default printer. We have to test for a printer at ...
by mjs
Feb 25, 2006 22:44
Forum: DOS
Topic: Problem with simple graphics in DOS
Replies: 24
Views: 12007

I wrote the ISR code and I'll take a look at this tomorrow.

Regards,
Mark
by mjs
Feb 25, 2006 22:24
Forum: Beginners
Topic: Help needed with LPRINT
Replies: 21
Views: 5382

Something like: OPEN LPT "LPT:WindowsPrinterName,TITLE=DocTitle,EMU=TTY" AS #1 This does the following things: ⋅ Opens a stream to the printer with the name "WindowsPrinterName" regardless if it's connected via USB or LPT ⋅ Sets the document title (as seen in the spoole...
by mjs
Nov 19, 2005 14:29
Forum: Windows
Topic: Error in winbase.bi?
Replies: 5
Views: 2240

Rens wrote:It is complaning about array not dimensioned in this line:
from_file = malloc(Len(f_from) + 2)


Either include "crt.bi" or use "allocate".

Regards,
Mark
by mjs
Nov 19, 2005 9:05
Forum: General
Topic: wait for event
Replies: 5
Views: 1836

You can get a fixed number of characters of keys by using "INPUT$(num_of_chars)" but this function will not return unless it received at least "num_of_chars" characters - so this function will block your application. Another way would be using "LINE INPUT" which reads characters until the first CR a...
by mjs
Nov 19, 2005 9:00
Forum: General
Topic: Problem with reapeated reallocate?
Replies: 2
Views: 1189

There is an error in your source. You can fix it by either moving "thing.numofmembers += 1" to the line just before the "return" or by reallocating the block to "sizeof(type2)*(thing.numofmembers+2)".

Don't forget that when you use [index] the array always starts at index 0.

Regards,
Mark
by mjs
Nov 18, 2005 14:04
Forum: General
Topic: Zlib
Replies: 6
Views: 1989

#inclib "z" is correct for all systems that use the "libz.a" (zlib1.dll is just a Win32 specialty).

Regards,
Mark
by mjs
Nov 17, 2005 21:12
Forum: Tips and Tricks
Topic: Pixel Perfect Print Placement
Replies: 7
Views: 4703

This was required to allow font widths of 9 pixels (for HGC). This means that the character position must be calculated with: src = fb_mode->font->data + ch * fb_mode->font->h * (fb_mode->font->w+7) / 8 So this means that fonts are aligned up to the next largest byte size? ie: 0..7 = 8, 8.....
by mjs
Nov 17, 2005 18:00
Forum: Windows
Topic: LPARAM?! is it a long ptr????
Replies: 5
Views: 2491

It's safe to assume that LONG_PTR can store either a LONG or a PTR. On the other side, INT_PTR can store either an INT or a PTR.

Don't confuse LONG_PTR with a FAR pointer.

Regards,
Mark
by mjs
Nov 16, 2005 22:25
Forum: General
Topic: Strings and Type Statement
Replies: 2
Views: 1133

Yes, this is one of the problematic differences between QB and FB. However, you can try a UBYTE array and convert it to a string explicitly using the following function: Function Cva ( Byval buffer As uByte Ptr, ByVal Length As uInteger ) As String Return fb_StrAllocTempDescF( *buffer, L...
by mjs
Nov 16, 2005 22:17
Forum: Tips and Tricks
Topic: Pixel Perfect Print Placement
Replies: 7
Views: 4703

src = fb_mode->font->data + ch * fb_mode->font->h type FONT_ h as integer data as ubyte ptr end type In the latest 0.15b testing version, the FB FONT structure changed to: type FONT_ w as integer h as integer data as ubyte ptr end type This was required to allow font widths of 9 pixels (for HGC). T...
by mjs
Nov 16, 2005 22:12
Forum: Beginners
Topic: problem with numeric precision
Replies: 7
Views: 1669

The current sources are compilable for DOS too - so there's no need to tweak the current FB sources.

Regards,
Mark
by mjs
Nov 16, 2005 19:21
Forum: General
Topic: OPEN COM example?
Replies: 5
Views: 1907

You forgot ",CD0,RS"

CD0 = turn off carrier detection
RS = suppress RTS

EDIT: In this posting you'll find an explanation of all options:
http://www.freebasic.net/forum/viewtopic.php?p=8247#8247

Regards,
Mark
by mjs
Nov 16, 2005 19:15
Forum: Beginners
Topic: General crashing crap...
Replies: 5
Views: 1737

Thanks, that code contains some commands I couldn't find (seek, callocate), but that double pointer stuff is kind'a confusing me. The idea behind the "ubyte ptr ptr" stuff is that you have a pointer to a an array of pointers to an array of UBYTEs. Explanation: PTR points to array of PTR's (a pointe...

Go to advanced search