|
Hi
In my programme ,it was an Socket Programme ,datas was sending through socket and Receiving through Socket. Datas are sending as (char*)and receiving as (char*) only.
I want to know wheather i can compress the data before sending and Decompression data after receving with the Vc++ 8.0 code(with out using dll any other third party tools)
I want to done through the code.
So give your suggestion about this.
Regards
shakumar
shakumar
|
|
|
|
|
|
Both
Image and Text Data
shakumar
|
|
|
|
|
|
|
|
shakumar_22 wrote: I want to know wheather i can compress the data before sending and Decompression data after receving
For this, you can use the zLib. It uses the zip/gzip compression format and can be added to your project as a simple DLL offering several routines.
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
shakumar_22 wrote: (with out using dll any other third party tools)
I want to done through the code.
So give your suggestion about this.
http://books.google.com/books?id=--MbAAAACAAJ&dq=data+compression+book[^]
seems a harsh requirement... I would recommend using a 3rd party tool, but if you want to understand how compression works, or put it all in code yourself, buy the book.
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
I am Using Win32 Appplication. Can anybody tell me how to put the Icon on Button.
|
|
|
|
|
|
Hi. Thank u for reply. I tried following code.It dont give me any compile or Run time Error but it isn't showing any Image on the Button. I dont know where m I wrong.
case WM_INITDIALOG:<br />
hIcon = LoadIcon(hInst,(LPCWSTR)IDI_ICON1);<br />
hStart = GetDlgItem(hWndDlg,IDC_Start);<br />
LRESULT lr = SendMessage(hStart,BM_SETIMAGE,(WPARAM)IMAGE_ICON,(LPARAM)hIcon);<br />
if(lr != NULL)<br />
{<br />
OutputDebugString(L"Error");<br />
}<br />
<br />
break;<br />
|
|
|
|
|
Did you set SS_ICON for button?
|
|
|
|
|
Hi. I use the follwing thing in addition to my previos code But still it doesn't work.
<br />
case WM_INITDIALOG:<br />
SetWindowLong( GetDlgItem(hWndDlg, IDC_BUTTON1 ), <br />
GWL_EXSTYLE,<br />
GetWindowLong( GetDlgItem(hWndDlg, IDC_BUTTON1 ), GWL_EXSTYLE ) |SS_ICON );<br />
break;
|
|
|
|
|
Hey. Thnx After a long try its done. n by the way New Style to set for button is BS_ICON.
But I am able to see Only Icon on the Button. Caption just gone. Is there any way So that I can have both on the Button.
|
|
|
|
|
if you can use of owner draw for your button I think its better.
|
|
|
|
|
I am printing one bitmap but the bottom most portion of the bitmap is not getting printed,
wt might be the reason.
i am using default setting of printer.
if somebody know pls let me know abt it.
ThankXXXXX
|
|
|
|
|
The most obvious thing to say is... is the bitmap's ratio of width to height much taller than the printer page? {:v)
It might help if you show us the code that actually 'prints' the bitmap, so we can see if you're doing anything unusual. If you could specify the size of the test bitmap in pixels and the resolution of your printer page in pixels (using the CDC's GetDeviceCaps() method), that would be useful too.
|
|
|
|
|
Can you show how did you try to it?
|
|
|
|
|
I am going to create a window that mimics behavior of a menu.
It needs to hide when user clicks anywhere on the dialog, screen, other windows, etc. How can I do this?
I thought about hooking to mouse LBDown and doing a PtInRect check to see if it is in my window, but I'm not familiar with hooking. Is there any other way or I shall learn that?
p.s. OnActivateApp was good if there was a similar message for a window to indicate if it is active now. I can't use KillFocus because the window might never gain focus.
-- modified at 4:43 Tuesday 4th September, 2007
// "Life is very short and is very fragile also." Yanni while (I'm_alive) { cout<<"I love programming."; }
|
|
|
|
|
use SetCapture() API. if you call this function you will get mouse move and other mouse messages even if the mouse is not on your window.
|
|
|
|
|
I thought about it and used it already. But there is a problem:
Some times another window cause this window to loose capture, while mouse is still in the rectangle, like TaskManager.
It'll cause to ambiguity about current state, however I can remember a message from a window showing loosing focus.
Thanks for reminding me. I'll check that out.
// "Life is very short and is very fragile also." Yanni while (I'm_alive) { cout<<"I love programming."; }
|
|
|
|
|
Hamed Mosavi wrote: Some times another window cause this window to loose capture,
In this case you will get the WM_CAPTURECHANGED message.
|
|
|
|
|
That's the message I was talking about.
Got my 5, thanks.
// "Life is very short and is very fragile also." Yanni while (I'm_alive) { cout<<"I love programming."; }
|
|
|
|
|
Hamed Mosavi wrote: I thought about hooking to mouse LBDown and doing a PtInRect check to see if it is in my window, but I'm not familiar with hooking. Is there any other way or I shall learn that?
You are right about the LBDown. To know if it is inside your window why don't you get the handler for your dialog and use .GetWindowRect() to obtain the left, right, top and bottom variables.
Then inside the LBDown use those 4 variables and compare it with the CPoint parameter of LBDown.
|
|
|
|
|
and I have to write an OnLButtonDown for all childs, windows, etc!
No, there are better ways. Any way thanks for your effort.
// "Life is very short and is very fragile also." Yanni while (I'm_alive) { cout<<"I love programming."; }
|
|
|
|