|
Hi,
I need to capture data that sends one old DOS-application to LPT1. I'm intermediate programmer in Visual C++ and I've never write a VXD or SYS driver. Is there other way how to do it?
|
|
|
|
|
The MS docu says that no system-function should be called from within a multimedia-timer callback.
I have the following command in my callback
[...]
system.pBitmap->Redraw_Map();
[...]
pBitmap is a pointer to my own bitmap class and from within Redraw_Map() I have to call BitBlt().
Is this also a system-function call ??? And what is different by using PostMessage() and call my member-function from the event-handler ???
My code works fine ... what can happen after a system-function call from a callback ?
Hope somebody makes this a little clearer to me
Greatings Mario///
--------------------
www.klangwerker.de
rocknix@lycos.de
--------------------
|
|
|
|
|
HI ALL
My question about HIWORD and LOWORD ?
I'm always see
LOWORD (wParam) // in WndProc function
some Data Types like
WPARAM , LPARAM ,DWORD
have LOWORD and HIWORD value
I found in MSDN about HIWORD and LOWORD
it tell me it's macros like
#define HIWORD(l) ((WORD) (((DWORD) (l) >> 16) & 0xFFFF))
#define LOWORD(l) ((WORD) (l))
but I can't understand what this mean and what this does
can you tell me please ...
|
|
|
|
|
Thats simple:
usually u use a command like (HIWORD)(lParam) !
That means you want to have the upper 16 Bit from 32.
To get them you have to shift right 16 (>>16) times and mask out the upper 16 Bit ( & 0x0000ffff ).
To get (LOWORD)(lParam) you have to clear the upper 16 Bit. Converting to a new type WORD from DWORD takes only the lower 16 Bit. The effect is the same.
Hope it helps
Greatings Mario///
--------------------
www.klangwerker.de
rocknix@lycos.de
--------------------
|
|
|
|
|
Hi guys,
How to use pop3 protocols in our application.Do u have any code
for that.Do there any win32 api for pop3 protocols.
|
|
|
|
|
POP3 is actually quite easy. You just connect a socket and send some text commands, then retrieve the returned text.
Check out www.rfc.net for the actual specifications.
|
|
|
|
|
I have an array of numbers say array[0]=-10, and array[1]=23. Furthermore, lets say that they represent a most significant bit, and a least significant bit, so in reality the number is
-1023. How do I combine both elements of the array into a signed integer that I can store??
Regards
Mike Zolna
|
|
|
|
|
|
Thanks, but what if the number is 102 and not 1023, that wont work. I dont know that magnitude of the numbers until they are joined together
Mike
|
|
|
|
|
I don't know what your program is like, so it's hard to say. But if you don't know what the final result should look like, then you won't be able to calculate the final result. You'll need some sort of separate indicator to tell you how the result is split up among the array elements.
--Mike--
http://home.inreach.com/mdunn/
Time is an illusion; lunchtime doubly so.
|
|
|
|
|
Actually,
The elements of the array are from 0-255, or 00 to FF in hex. I need to combine both bytes and turn them into a signed character for processing.
Regards
Mike
|
|
|
|
|
Well, this is not efficient, but shoudl serve as a starting point for you:
long lResult = 0;
int nMult;
for (int x = 0; x< nNum; x++)
{
nMult = 1;
while (nMult <= nArray[x])
nMult *= 10;
lResult *= nMult;
lResult += nArray[x];
}
Note though that if your array has any significant size then you will overflow the integer you're trying ot store it into.
|
|
|
|
|
If your numbers are in range of -signed char- it`s very easy to combine these numbers to an integer:
int result = ( array[0] << 8 ) + array[1];
This command shifts the number stored in array[0] 8 Bit up (left) and adds the number stored in array[1];
Hope that helps
Greatings Mario ///
--------------------
www.klangwerker.de
rocknix@lycos.de
--------------------
|
|
|
|
|
If your numbers are in range of -signed char- it`s very easy to combine these numbers to an integer:
int result = ( array[0] << 8 ) + array[1];
This command shifts the number stored in array[0] 8 Bit up (left) and adds the number stored in array[1]. Shifting a byte by 8 is equal to a multiplikation with 0xff - but shifting is much faster I think.
Hope that helps
Greatings Mario ///
--------------------
www.klangwerker.de
rocknix@lycos.de
--------------------
|
|
|
|
|
Ok, I'm writing a GUI that takes in data and then when the user clicks on a button it creates a process using CreateProcess() and passes the data input by the user to the spawned child process. The child is a Win32 Console program and I need to be able to read in the output of the Child through a pipe. I tried taking a look at the Example in the MSDN stuff, but it didn't even seem to do anything as far as passing the data back and forth. Could someone give me a few tips or point me to a tutorial? Thanks.
Dave Johansen
|
|
|
|
|
How can i print the info that is in a listbox?
|
|
|
|
|
hmmm...well, let's take a look in the Combo & Listbox section where we find:
CPrintPreviewListBox
A listbox derived class that allows printing and print preview in SDI and MDI applications
Sounds like what you're looking for to me.
|
|
|
|
|
hello all.
I am developing a Messaging server working side by side with Exchange.
I consider developing a WMI interface to my server. if anybody has any thought, experience, or general guide lines (like- DONT DO THAT) plz share...
thanks allot
Noam Ben Haim
noam.benhaim@onsettechnology.com
Noam Ben Haim
Systems Developer
Onset Technology
noam.benhaim@onsettechnology.com
|
|
|
|
|
Im having problems resizing my property sheet to the size of its parent(a dialog bar). IT seems as though the parent rect isnt being obtained correctly or something. Has anyone done this, or something similar and could give me some advice? thanks
~ Chris
|
|
|
|
|
Hi,
does anyboy know how to move a window without a title-bar.
I tried :
case WM_MOUSEMOVE:
if( wParam && MK_LBUTTON )
.
.
.
That works but not fast ... and the grafix ? no comment *g*
Any ideas ?
Greatings Mario ///
--------------------
www.klangwerker.de
rocknix@lycos.de
--------------------
|
|
|
|
|
Handle WM_LBUTTONDOWN, like so:
case WM_LBUTTONDOWN:
PostMessage ( hwnd, WM_NCLBUTTONDOWN, HTCAPTION, lParam );
break;
That "tricks" the window into thinking you clicked on its caption bar (even though there isn't one!).
--Mike--
http://home.inreach.com/mdunn/
Time is an illusion; lunchtime doubly so.
|
|
|
|
|
Works fine - thank you !
Greatings Mario ///
--------------------
www.klangwerker.de
rocknix@lycos.de
--------------------
|
|
|
|
|
Please, what flag have I to use to have a window without caption and borders - I used it month ago but I forgot (
thanx
Mario///
--------------------
www.klangwerker.de
rocknix@lycos.de
--------------------
|
|
|
|
|
|
When I step through my source code when debugging my application (F10),
sometimes the system suddenly hangs.
The only thing I can do is move the mouse pointer and then I'll always have
to reboot my machine.
Has anyone ever experienced the same or know a solution to this annoying problem.
Platform: Win 2000 SP1; VC++6 SP4
Our application is a multithreaded application that also uses ADO.
Thanks in advance.
Geert
|
|
|
|