|
Hi
I need to cut one small rectangle piece of image in one full image ..how to do that ..??
Regards
~~~~~~~~~~~~~Raju~~~~~~~~~~~~~
|
|
|
|
|
That depends.
Do you want to replace the area you cut with a solid colour?
Do you want to put the area you cut into a new array of pixels?
Are there any specific classes you are using?
Most importantly, what have you tried already? This is a very trivial problem, so you're not likely to get a lot of help without first attempting it yourself.
|
|
|
|
|
Sorry ...
already i tried ...but i am very beginner to learn
its really complicated ..so that ..i posted ..
my image contains one full house picture ..i need to cut of top of left corner room ..this is my question .....
Please help me ...how to do that ,..
regards
~~~~~~~~~~~~~Raju~~~~~~~~~~~~~
|
|
|
|
|
Have a look at BitBlt function [^].
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
[My articles]
|
|
|
|
|
I want record count.tell me the query how to Count The Number Of Records In An Access Database
Regards
Jitendra
modified on Friday, September 11, 2009 2:26 AM
|
|
|
|
|
SELECT COUNT(*) FROM tablename;
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
[My articles]
|
|
|
|
|
What do you want to know?
1) How to use ODBC functionaries?
2) How to use OLE DB functionaries?
3) How to use MFC DB functionaries?
4) How to write SQL script?
5) How to use MS-Access user interface?
I know there are 3 different coding ways for database programing in vc++.
1 - using ODBC functions like c style.
2 - using OLE DB functions with ActiveX programing in c or c++ style.
3 - using database class in MFC in c++ style.
Check your mind.
|
|
|
|
|
what is _T("\\sample")???
what type is it???
i have string folder_name to pass to create zip folder... i want to pass normal string to it..how can i do it..
int _tmain(int argc, _TCHAR* argv[])
{
char temp[] = "c:\\tempo\\Zippi.zip";
HZIP hz; DWORD writ;
// EXAMPLE 1 - create a zipfile from existing files
hz = CreateZip(_T('temp'),0);-->this gives an error.how do i pass string var here or how to convert.
ZipAdd(hz,_T("gunjan.txt"), _T("c:\\tempo\\gunjan.txt"));
ZipAdd(hz,_T("kajal.txt"), _T("c:\\tempo\\kajal.txt"));
CloseZip(hz);
_tprintf(_T("Created 'c:\\tempo\\Zippi.zip'\n"));
return 0;
}
gives error:
Compiling...
zipping.cpp
d:\documents and settings\admin\my documents\visual studio 2008\projects\zipping\zipping\zipping.cpp(18) : error C2665: 'CreateZip' : none of the 2 overloads could convert all the argument types
d:\documents and settings\admin\desktop\gunjan\zip.h(22): could be 'HZIP CreateZip(const TCHAR *,const char *)'
while trying to match the argument list '(int, int)'
Build log was saved at "file://d:\Documents and Settings\admin\My Documents\Visual Studio 2008\Projects\zipping\zipping\Debug\BuildLog.htm"
zipping - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
|
|
|
|
|
Strictly, its type is const TCHAR[8], which is convertible to LPCTSTR.
gunjan ga wrote: hz = CreateZip(_T('temp'),0);-->this gives an error.how do i pass string var here or how to convert.
You've got single quotes around temp - try changing them to double quotes?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
it doestn't work....is not givin error but no zip created....
|
|
|
|
|
Well you may check the return value of the CreateZip function...
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
[My articles]
|
|
|
|
|
_T( ) is actually a macro, which expand on the basis of the UNICODE, _UNICODE, _MBCS macro, if nothing then ASCII is used.
if it is unicode then it will be 4 bytes long. otherwise 1 byte
expansion is like below
#ifdef _UNICODE
#define _T(x) L ## x
#else /* _UNICODE */
#define _T(x) x
#endif /* _UNICODE */
if preprocessor directive _UNICODE is defined, _T("ABDC") expands to the string prefixed by L (L"ABDC") its a long value so every character having a size of 4 bytes, otherwise it just expands to the original string ("ABDC") so every character is just 1 byte.
Величие не Бога может быть недооценена.
|
|
|
|
|
thanks for help...i found how to convert...
Please dont reply the issue is resolved...
|
|
|
|
|
I believe unicode characters usually occuppy 2 bytes, not 4.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
I have a struct colourRGB . Along with this I have a helper function interpolate that takes two colour values as colourRGB 's and interpolates them based on a float in the range 0...1.
Elsewhere, I have a library of useful functions that are for the most-part templatized. One such function uses the interpolate function, however it needs to pass in int 's as arguments for the two colours in order to keep the function as generic as possible. I could simply use a static_cast<ColourRGB> for each argument that needs to be converted, but A) that takes a fair bit of typing and B) it's messy.
How can I write a conversion operator for int that returns a colourRGB ? I've googled everywhere and can't seem to find an answer.
|
|
|
|
|
overload the operator = for int
ColourRGB operator =( int nData )
Величие не Бога может быть недооценена.
|
|
|
|
|
That doesn't work...
I want to overload the appropriate operator such that I can call the following function:
ColourRGB interpolate(ColourRGB &c1, ColourRGB &c2, float pos);
like so:
UINT black(0x00000000);<br />
UINT white(0xFFFFFFFF);<br />
float temp = 0.0f;<br />
<br />
pixels[x][y] = interpolate(black, white, temp);
|
|
|
|
|
Why dont you call interpolate as a seperate function?
Величие не Бога может быть недооценена.
|
|
|
|
|
Sauce! wrote: I want to overload the appropriate operator such that I can call the following function:
ColourRGB interpolate(ColourRGB &c1, ColourRGB &c2, float pos);
You'll likely need to do this:
ColourRGB interpolate( ColourRGB c1, ColourRGB c2, float pos ) or make them const .
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
Define a constructor for colourRGB that takes an int. So long as you don't mark it 'explicit', it's effectively a conversion operator.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hate to disappoint but I've already done that too
ColourRGB(const unsigned int &rhs);
When calling the function like so...
pixels[x][y] = interpolate(black, white, temp);
I still get the compile error "error C2664: 'interpolate' : cannot convert parameter 1 from 'UINT' to 'ColourRGB &'"
It compiles fine if I call the constructor explicitly but I'd like the conversion to be implicit.
|
|
|
|
|
ColourRGB(const unsigned int &rhs);
Try change above to below.
ColourRGB(const unsigned int rhs);
|
|
|
|
|
I still get the same error.
|
|
|
|
|
ColourRGB interpolate(ColourRGB &c1, ColourRGB &c2, float pos);
makes such compilation error.
But this may not;
ColourRGB interpolate(const ColourRGB &c1, const ColourRGB &c2, float pos);
for code pixels[x][y] = interpolate(0x00000000, 0xffffffff, pos);
|
|
|
|
|
How to use CListCtrl to handle message
|
|
|
|