|
Hi Raj thanks very much it was helpful a lot..................
usharani
|
|
|
|
|
Hi experts,
I m a VC++ developer and i used Windows API CreateFile() for serial communication. but it decrease the speed of sending n receiving bytes from port.
can u please answer me how to speed up communication?
I also set the TimeOuts to '0' so that it doesnt take any timeout waitng..
Please reply..
Its really matter to me..
|
|
|
|
|
Member 3220373 wrote: but it decrease the speed of sending n receiving bytes from port.
What do you mean ? Decrease compated to what ?
|
|
|
|
|
the time taken by my program in VC++ is very greater than same implemented
program in TurboC++
My observation;;
if i used a file to write on device connected on my COM4 have size 172kb
then TurboC++ pgm takes only 54sec but VC++ pgm takes 211 sec
almost 3.5 times.
so i want some special function or tric to increase the speed of this transmisssion..
reply...plzzzzzzz
|
|
|
|
|
Member 3220373 wrote: can u please answer me how to speed up communication?
Use USB. (just kidding).
Please elaborate.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
|
Thnks for reply...
I already used DCB structure in my program..
but have same effect...
the probm is If i load a file of 172kb using TurboC++ prgm
then it takes appx 55 sec...
but
when I load file using VC++ prgm that uses CreateFile() API
it takes appx 211 sec... i.e. appox 3.5 times.of TC
so plz... reply....any option to decrease load delay..
n speed up my transmission...
PLz ..... ur reply always matter to me..
|
|
|
|
|
I am trying to implement "intellisearch" combo box like we have in IE.
I create a separate list box and draw it below combo box when user starts typing in something.
The Combo box has to be a parent of this list box. When I draw the list box using the Create method, it offcourse will try to draw the list box inside the client area of the combo box, and fails to do so.
Can we draw a child window outside the client area of the parent?
<br />
<br />
bool CAutoCompComboBox::CreateListBox()<br />
{<br />
CRect clientRect(-1, -1, -1, -1);<br />
<br />
GetClientRect(&clientRect); <br />
<br />
BOOL bRet = _listFilter.Create(WS_CHILD | WS_VISIBLE | <br />
WS_VSCROLL | LBS_STANDARD,<br />
clientRect, this, 1);<br />
<br />
<br />
_listFilter.Create(WS_CHILD | WS_VISIBLE | <br />
WS_VSCROLL | LBS_STANDARD,<br />
clientRect, GetParent(), 1);<br />
<br />
<br />
Thanks in advance..
Misha
Evil triumphs when good people sit quiet...
|
|
|
|
|
|
Thanks,
Thats the problem. I don't want to subclass the list box which comes with CCombobox. I have to keep it separate.
all ideas would be greatly appreciated.
Evil triumphs when good people sit quiet...
|
|
|
|
|
what about WS_POPUP style instead of WS_CHILD and position the popup window relative to combobox and send the messages to and fro between combo box and popup listbox. I think popup window is the best match as "intellisearch" kind of control pops up when some thing is typed and closes when out of focus from combobox.
|
|
|
|
|
Thanks, that seems to work. the code looks like this:
ClientToScreen(&clientRect); <br />
<br />
BOOL bRet = _listFilter.CreateEx(0, <br />
_T("LISTBOX"), <br />
_T(""), <br />
WS_POPUP | WS_VISIBLE | WS_BORDER | WS_VSCROLL <br />
| LBS_NOTIFY <br />
,<br />
clientRect.left, clientRect.top, <br />
clientRect.Width(), clientRect.Height(), <br />
this->GetSafeHwnd(), <br />
NULL, <br />
NULL);<br />
Evil triumphs when good people sit quiet...
|
|
|
|
|
How can I design a compiler (I dont need statement parsing or evaluating expressions, but how to generate Windows PE Code)
How can an EXE file be built from my compiler?
|
|
|
|
|
Design a compiler you need to lot of info and its very difficult but for make a exe file I think(not sure) I saw a article on the www.codeguru.com that it explained about exe files(PE,...) and very other useful info.
|
|
|
|
|
I have a class in win32.
For a small part of my project, I would just love to be able to display a jpeg or gif image instead of just bmp images.
Are there any third party classes that will help? What controls should I use?
It's not a big enough part of my program to do myself, it's just an extra feature that would add alot of appeal to the app.
I would also love to be able to load an image from the disk and not from my resources each time as I don't think my user can edit those.
Thanks for any help!
|
|
|
|
|
Have you heard about IPicture?
IPicture manages a picture object and its properties. All you need to do is instantiate IPicture and call Render. Remember you don't need to do a CoCreateInstance for this, instead call OleLoadPicture.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Got a link?! Would love to use it. A quick google search didnt' turn up anything.
EDIT:
Found some info on it but I can Load from a file?
modified on Tuesday, April 22, 2008 1:24 AM
|
|
|
|
|
|
Loading and Displaying Bitmaps[^]
using GDIplus, Image::FromFile
You can create Image objects based on files of a variety of types including BMP, GIF, JPEG, PNG, TIFF, and EMF.
|
|
|
|
|
GDI+ will do it in 3 lines, excluding the code needed for
initialization, which only needs to be executed once per
process.
Something like this (shows example initialization code):
#include <gdiplus.h>
...
ULONG dwToken;
Gdiplus::GdiplusStartupInput input;
Gdiplus::GdiplusStartupOutput output;
Gdiplus::Status status = Gdiplus::GdiplusStartup(&dwToken, &input, &output);
if(status == Gdiplus::Ok)
{
Gdiplus::Bitmap srcBitmap(L"c:\\some.jpg", FALSE);
Gdiplus::Graphics wndGraphics(someHWND);
wndGraphics.DrawImage(&srcBitmap, 0, 0);
Gdiplus::GdiplusShutdown(dwToken);
}
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Was sure to do the #include but I'm getting all kinds of linker errors. Is there anything I'm missing.
Also can I load an image and have it scaled based on a preferred height and width?
Edit
Was Missing the .lib file.
Still not sure on how to scale the image.
Also getting a nasty exception when trying to run the last line (the shutdown one). When I comment it out it works fine! but I don't think that's the best thing to do.
modified on Tuesday, April 22, 2008 9:19 PM
|
|
|
|
|
Link to gdiplus.lib to resolve the linker errors (you found that one).
Graphics.DrawImage() has a bunch of overloads, several of which will
stretch the image. To actually resize the image you need to create a second
Image/Bitmap object and draw the original image stretched to the new image.
I'm not sure about the exception - I haven't seen that before
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
How to add button to ClistCtrl?
thanks in advance.
|
|
|
|
|
See Here[^] for some hint
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|