|
|
I used a class very very useful : CxSkinButton
If you want to have button of every shape and bitmap, try this link and I think you'll be surprised...;)
http://www.codeproject.com/buttonctrl/CxSkinButton.asp
Maybe you could tell me something too ?...
Actually I'm trying to display more than one bmp at the same location but it doesn't work properly...
I use the SetWindowPos function to place the bitmap and stretch it (or shrink it) to the correct size. It works well for the position and the size but not for the Z-Order (the first is over the second and I want the contrary). Setting the first parameter of the SetWindowPos to '&wndTop' does not change anything.
If you could help me...
Should computing stay as a source of benefit or become like knowledge : free and opened to every one ?...
|
|
|
|
|
... that would work on two keys, public and private, but not like RSA, where message can be encrypted using public key and decrypted using private key. Public key should be able to decrypt message and only private key would be able to encrypt it. I could use RSA and distribute private key, but i think that it is possible to generate public key from private key. Am i wrong?
|
|
|
|
|
In RSA, messages encrypted with private key can be decrypted with the public key, that's how RSA is used for digital signatures.
|
|
|
|
|
Hi.
I often see function parameters requiring a handle to a window. I believe the handle to main fram is m_hWnd. In general, how do you get a handle to a window from main frame to any view including splitters?
Thanks,
Kuphryn
|
|
|
|
|
kuphryn wrote:
how do you get a handle to a window from main frame to any view including splitters?
All CWnd objects will have an m_hWnd which is the underlying window HANDLE.
But to be safe call IsWindow on this handle before trying to do stuff with it, unless you are sure it is a handle to a valid window
Nish
Check out last week's Code Project posting stats presentation from :-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
|
|
|
|
|
Thanks.
You wrote "call IsWindow() on this handle." How do you go about calling IsWindow on a handle? IsWindow() take not parameters and returns a BOOL.
Kuphryn
|
|
|
|
|
kuphryn wrote:
IsWindow() take not parameters
IsWindowThe IsWindow function determines whether the specified window handle identifies an existing window.
BOOL IsWindow(
HWND> hWnd
);
Nish
Check out last week's Code Project posting stats presentation from :-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
|
|
|
|
|
Ahh. Thanks.
In other words, IsWindow() *internally* check m_hWnd to see if it matches that of the current view/window.
Kuphryn
|
|
|
|
|
Actually what it does is to verify that the window handle we have points to a valid window. There might be a situation that a window has closed but we still have a handle to it. In such situations, we must use this function.
Nish
Check out last week's Code Project posting stats presentation from :-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
|
|
|
|
|
i would like to know how to use this function
i tried to do simultaniasly read/write from COM but it didnt work
thanks.
|
|
|
|
|
You have to do the following steps:
1) CreateFile() with FILE_FLAG_OVERLAPPED
2) Create 2 Events by using CreateEvent()
3) Create 2 OVERLAPPED STRUCT and put events (2) in here
4) now use WaitCommEvent(), ReadFile(), WriteFile() with STRUCTS (3) as calling-parameters
That`s it ...
So far ... RockNix///
------------------------------------
www.klangwerker.de
Need some articles about Threading,
Subclassing, Double Buffering ?
Go for it ...
Look out for free Win32
Serial Communication Module
for VC++ or Borland C++ Builder
Visit us on www.klangwerker.de
------------------------------------
|
|
|
|
|
Hi,
Has somebody worked on DirectX.. I have a
problem regarding Video Capture..
I am able to capture video from the Camera but
its like i just want one shot and want to
save it in JPG or BMP.. has somebody worked on
it..
Please help
Sameer
|
|
|
|
|
Could you show your source ?
About capturing video from camera ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
I am not sure if many people uses this call. But I am having trouble with it. From MSDN it should work. But it doesn't for me.
I call this in my Pretranslate fucntion. I get the foregroundwindow for another window program. Now when I click on the other program, it should Get the GUIThreadInfo. I want to get at this message to get the actual CONTROL that has the focus in the active window.
But it is always failing. I can't figure out why. What I want to do is once I get the Control with the focus then I want to use AttachThreadInput and be able process messages in that program's message queue.
Any Ideas? Thanks.
|
|
|
|
|
hi,
my application captures the mouse events of an application ,I want to send these events to another window,How do I send mouse events.
Jeremy suggested me Sendmessage,but it did not respond.
SendMessage (handle1,WM_MENUSELECT,MF_MOUSESELECT,0);
where handle1 is handle of the destination window
WM_MENUSELECT is wParam (mouse event)
Thankyou for spending time
Vineet Sharma
|
|
|
|
|
Is the other window part of the same application, or is it part of another process. Because if it is part of another process, then it is running in different address space and you cannot send or post a message.
Best regards,
Alexandru Savescu
|
|
|
|
|
I have two notepad windows,I want to replicate the behaviour of one window to another.Using hooks i trap the keyboard events of first notepad window and send these keystrokes to second window with keybd_event function,it is working fine.
Similarly I have trapped mouse events ,Probably you cannot use sendMessage or post but since hooks code is wriiten in Dll i can force second window to map the dll into its address space and then send messages.Please comment..
Second solution could probably be, as suggested by "argus" to use mouse_event and sendinput,I am working on it ,but currently unable to locate parameter for destination handle.
Thankyou for your concern
Vineet
|
|
|
|
|
Check in MSDN:
mouse_event
SendInput
Argus
|
|
|
|
|
I am opening a serial com port and writing huge packets. How do I know how many bytes can I write into the port when the other computer reading it?
is something like open()
write()
select()?
Anybody has a sample?
Thanks
Al
|
|
|
|
|
Do the select() before you write() . Something like
fdSerial = open(...);
fd_set wfds;
struct timeval tv;
memset(&tv, 0, sizeof(struct timeval));
FD_ZERO(&wfds);
FD_SET(fdSerial, &wfds);
int retval = select(1, NULL, &wfds, NULL, &tv);
if (retval) {
write(...);
}
|
|
|
|
|
Niklas,
Thanks, is any way to know how many characters can I write into the serial port without overwriting bytes?
Thanks again
Al
|
|
|
|
|
hey im pretty new to c++ and need some help.
is there any way to turn off the little blinking white cursor in the c++ console?
i need to turn it off for a game
thx
|
|
|
|
|
SetConsoleCursorInfo
Set the bVisible member of CONSOLE_CURSOR_INFO to false
Nish
Check out last week's Code Project posting stats presentation from :-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
|
|
|
|
|
alright thx for the reply, but do u think u can give me a little help on how to use it? i get a buncha errors, im probably putting it all in wrong
|
|
|
|