|
Thanks for your answer. I was afraid of that.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
|
See if this helps.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
That's a big help, thanks.
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
What I am up to is resizing the bitmap from the clipboard then re send it to clipborad so it's kinda easy in VB take a look
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
My.Computer.Clipboard.SetImage(New Bitmap(bmp, CInt(bmp.Width / 2), CInt(bmp.Height / 2)))
End Sub
No how to do this under C?
So i can send the bitmap to the clipboard with these instructions
OpenClipboard(NULL);
EmptyClipboard();
SetClipboardData(CF_BITMAP, Hbitmap);
CloseClipboard();
OpenClipboard(NULL);
and for bringing it
HBITMAP hbitmap = (HBITMAP)getclipboardData(CF_BITMAP)
and i know that I should use
StretchBlt() but i do not know how to accomplice that?
|
|
|
|
|
Assume you have a HBITMAP hbitmap which already contains your clipboard data. Then you can StretchBlt that data to a destination HDC hdc as below:
1. Create a compatible HDC in memory with your destination hdc
HDC memDC= CreateCompatibleDC(hdc);
2. Select your hbitmap into the memory DC
HBITMAP hOldBmp = (HBITMAP)SelectObject(memDC, hbitmap);
3. Use StretchBlt to resize it
StretchBlt(hdc, 0, 0, new_Width, new_Height, memDC, 0, 0, org_Width, org_Height, SRCCOPY);
4. Restore the old bitmap and free memory
SelectObject(memDC, hOldBmp);
DeleteDC(memDC);
Hope it helps
|
|
|
|
|
Thanks it helped me
|
|
|
|
|
You may use the CopyImage()[^] function:
BITMAP bm;
GetObject(hBitmap, sizeof(bm), &bm);
HBITMAP hCopy = (HBITMAP)CopyImage(hBitmap, IMAGE_BITMAP,
bm.bmWidth / 2, bm.bmHeight / 2,
LR_COPYDELETEORG);
SetClipboardData(CF_BITMAP, hCopy);
|
|
|
|
|
Thanks I did not know that!
gonna check that out
|
|
|
|
|
Can you guys pl explain me how to call (Syntax) a single query directly through visual studio C++ code and stored Procedures (syntax for multiple queries)? What is the difference between them in calling?
|
|
|
|
|
hi all,
I want to read a excel file on pc where Office is not installed.
any idea how can I do this.
thanks.
|
|
|
|
|
You can use OLE DB[^].
Use the best guess
|
|
|
|
|
is oledb register on all pc.
I search on using excel and find this
http://exceldatareader.codeplex.com/[^]
they provide a dll.
but here example shows use in c# and vb.net how can I use it.
modified 29-Jun-13 6:29am.
|
|
|
|
|
Unfortunately it is not easy, as all the samples I have seen relate to C#/VB.NET. You could use C++/CLI to access the data and then hand it back to your unmanaged code. There are also some articles here on CodeProject[^] that may help you.
Use the best guess
|
|
|
|
|
Hi,I want to parse a csv file using Regex,It contains
1.string Contains "",for example,"It's a "word"" ;
2.string Conatains \r\n
|
|
|
|
|
I would start choosing the right forum.
Veni, vidi, vici.
|
|
|
|
|
What? I can not understand,sorry
|
|
|
|
|
This is the C/C++/MFC forum, while you asked about C# .
As a side note, a quick Google search gave me about 830,000 results[^].
Veni, vidi, vici.
|
|
|
|
|
You can google for that.
Also, if it matters, a parser is probably faster than a regex.
|
|
|
|
|
you can post it at the c# forum
moonman
|
|
|
|
|
Hi,
I need do wirte Unit-testing(Automated testing)code for our project. Some of the modules are developed in VC++(Using MFC).Its a Multiple Document Interface[MDI] application.
I tried to use CPPUnit framework ,but i'm getting difficulties. Also CPPUNIT don't have TestCoverage facility.
Hence kidly guide me how can i write test cases for pure MFC code. I mean the Unit testing code can handel MFC library & also the tool can able do the TestCoverage analysis.Any best & friendly Unit tesitng framework is avaialblle?
Kindly help me out. Thanks in advance
modified 30-Jun-13 1:04am.
|
|
|
|
|
Since nobody answered so far...
I've looked around some time ago, and found that almost all frameworks available for Windows require .NET, or at least managed C++. One of the few that doesn't is WinUnit: It requires some work for you (creating test classes for each class to test), but otherwise saves a lot of work by extracting the test cases directly from the binaries.
I haven't yet tried it out myself because it wasn't really what I required, but it may be useful for your purposes. Should be easy enuogh to google for, and IIRC the documentation even contains references of alternate solutions.
|
|
|
|
|
Hi,
I have a list control on a dialog box. I use
LVS_EX_CHECKBOXES functionality to put check boxes in the list control. I want to put the checkboxes in any other column of list control.
How it can be implemented.
Please share any sample code if you have.
Any help will be appreciated.
Regards,
Mbatra
|
|
|
|
|
|
If you want to have a single column with checkboxes, you may rearrange the order of the columns, in such way to have checkboxes on the desired column ...
You can also check here[^], on this list you can put any kind of control, on any column ...
|
|
|
|