|
I have a bitmap that looks like a form. How can I print
that through visual c++ so that the output looks clear?
I can make it print the bitmap and it looks pretty good,
but the text is just alittle fuzzy. Any ideas on how to
print a crisp, clear bitmap?
Please, any response any one can give me will be greatly
appreciated.
Sincerely,
Danielle (an overworked graduate student)
|
|
|
|
|
how are you printing it now?
Be very, very careful what you put into that head, because you will never, ever get it out. --Thomas Cardinal Wolsey
|
|
|
|
|
Hi,
I have a worker thread that calls the socket api's ::accept() function, which blocks until a client machine tries to connect to my application. How do you cancel the block? Say you want to shut down the application... Is there any timeout associated with ::accept()? I couldn't find any...
Thanks in advance!
swine
Check out Aephid Photokeeper, the powerful digital
photo album solution at www.aephid.com.
|
|
|
|
|
no timeout on accept just close the socket that unblocks the accept call and returns an error well error notification then u call WSAGetLastError() to get the acutal error number
"No matter where you go, there your are..." - Buckaoo Banzi
-pete
|
|
|
|
|
Thanks!
Check out Aephid Photokeeper, the powerful digital
photo album solution at www.aephid.com.
|
|
|
|
|
Greetings,
I am trying to do something that ought to be simple but it is eluding me.
I want to resize a CListCtrl (in Report mode) from within OnInitialUpdate() such that exactly N rows are displayed (where N is already known to be small enough to fit on the screen without needing scroll bars).
I can use GetCountPerPage() but that doesn't count partial lines and one of the things I want to eliminate is partially viewed lines.
I must be missing something elementary so a code fragment would be very nice!
Thanks.
|
|
|
|
|
I haven't tried it, but you can take a look at CListCtrl::ApproximateViewRect. In the event that this doesn't work, I think it should be possible just to use GetItemRect with LVSIL_BOUNDS, then take the height of the rectangle and multiply it by the number of items you have, and that will be the needed height.
Chris Richardson
C/C++ Include Finder[^]
|
|
|
|
|
Chris Richardson wrote:
haven't tried it, but you can take a look at CListCtrl::ApproximateViewRect. In the event that this doesn't work, I think it should be possible just to use GetItemRect with LVSIL_BOUNDS, then take the height of the rectangle and multiply it by the number of items you have, and that will be the needed height.
Actually I tried this but I must have something still basically wrong:
<... do initialization ...>
CSize sz = m_list.ApproximateViewRect();
m_list.PostMessage(WM_SIZE, sz.cx, sz.cy);
This seems to have no effect.
I think I'm having a senior moment here...
|
|
|
|
|
That's not the correct way to size a window. Use this instead:
m_list.SetWindowPos( NULL, 0, 0, sz.cx, sz.cy, SWP_NOZORDER|SWP_NOACTIVATE|SWP_NOMOVE );
Chris Richardson
C/C++ Include Finder[^]
|
|
|
|
|
That's it!
I know about and use SetWindowPos() but I just couldn't think of it.
Thanks!
And here is my working implementation (if anybody wanted to see actual code):
CSize sz = m_list.ApproximateViewRect();
CRect itRect;
m_list.GetItemRect(0, &itRect, LVIR_BOUNDS);
int vOffset = itRect.Height() - 3;
m_list.SetWindowPos(NULL, 0, 0, sz.cx, sz.cy - vOffset,
SWP_NOZORDER|SWP_NOACTIVATE|SWP_NOMOVE);
|
|
|
|
|
Hi
I was wondering how to find out which nodes of the treeview (a treeview with checkboxes) have their checkboxes checked.
Thanks
Nitin
|
|
|
|
|
GetItemState() ?
"No matter where you go, there your are..." - Buckaoo Banzi
-pete
|
|
|
|
|
I want to find all files that DO NOT contain my string pattern. I am looking for files that don't contain the literal "copyright". I want to search recursively a folder (or better yet, do this in my Visual SourceSafe database).
I have VC++ and Visual Studio at my disposal, but I was unsuccessful at using the Regular Expressions setting on the search tool.
Thank you.
Johnny
|
|
|
|
|
If you already are getting the filenames themselves, then the hard part is done. I've not used the built in regular expressions, but I know there are public domain regular expression classes/libraries out there.
However, there is an even easier way. If you already have them available to you, can you just use strstr() and see if it passes or fails. If you are using CStrings, then I'm sure there is an equivalent method, like substring() or something of the sort.
There are only 10 types of people in this world....those that understand binary, and those that do not.
|
|
|
|
|
One solution is FindFile() and FindNextFile().
Kuphryn
|
|
|
|
|
There was no WinAPI forum, so I thought this was the closest fit for which forum this post should be applied.
I have written some very simple (non-overlapped) windows (NT/2K) serial port drivers. The definitions to be used for baud rates have two different values, CBR_56000 and CBR_57600 (in addition to the others).
I notice that using a terminal emulator to test (Hyperterminal) set at 57600, I can connect to it fine using CBR_56000, but not CBR_57600. This seems a little bizarre.
I'd appreciate it if anyone can explain this?
There are only 10 types of people in this world....those that understand binary, and those that do not.
|
|
|
|
|
Is it me who's blind and retarded, or is it impossible to add resources to .NET projects (C# in this case) as you would in a C++/MFC project?
All I want to do is to add icons/images and have them compiled into the assembly...
Nevermind, I found some articles to read in MSDN.
--
"And God said, Let us make man in our image"
|
|
|
|
|
How can I read a default value (HKCR\http\shell\open\command)? I tried passing an empty strign with RegQueryValueEx but it didn't work!
Thanks!
---------------
Tired of Spam? Introducing InboxShield® for Microsoft® Outlook®
http://www.edovia.com
|
|
|
|
|
DWORD dwStatus,dwcbData=4096,dwType; HKEY hKey;
BYTE buffer[4096];
dwStatus = RegOpenKeyEx(HKEY_CLASSES_ROOT,"http\\shell\\open\\command", 0, KEY_READ, &hKey);
RegQueryValueEx(hKey,"",0,&dwType,(LPBYTE) buffer,&dwcbData);
works nicely for me.
#include <beer.h>
|
|
|
|
|
How can I create a folder programmatically from my MFC 6 application?
Thanks so much,
n
|
|
|
|
|
With CreateDirectory , surprisingly enough
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
|
Help for a newbie!
I'm debugging a console application. The app uses several cout
statements to display info in the output window. However, when
single stepping through the program the output window is not
updated as each cout is executed. The output window is updated
when the end of the program is reached. Is there a way to cause the output window to be updated as each cout is executed. Thanks.
|
|
|
|
|
cout<<endl should flush to the console.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|