You may create a compatible bitmap with the desidered size and then bit-blit the original one into it.
If you need to resample the image (i.e. to resize without too quality loss) then have a look at my DLL [^] (you may also use GDI+).
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
this is a part of a code to solve n*n linear equation iam testing this part with trial equation all i want it to do is to add variables in V and add coff. in Num iam facing a problem could U help me please
C:\Documents and Settings\karim\Desktop\cC\to fill coff\2.cpp(18) : error C2664: 'strlen' : cannot convert parameter 1 from 'char' to 'const char *'
Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
C:\Documents and Settings\karim\Desktop\cC\to fill coff\2.cpp(31) : error C2109: subscript requires array or pointer type
C:\Documents and Settings\karim\Desktop\cC\to fill coff\2.cpp(33) : error C2143: syntax error : missing ']' before '}'
C:\Documents and Settings\karim\Desktop\cC\to fill coff\2.cpp(33) : error C2109: subscript requires array or pointer type
C:\Documents and Settings\karim\Desktop\cC\to fill coff\2.cpp(33) : error C244
All I can suggest is that you try to learn a little more about arrays and strings in C - there's so much wrong here htat I don't know where to start....but I'll try.
This is an array of 81 string pointers. The first three (eq, eq and eq) have values.
This is an array of 20 string pointers. The first three (varname, varname and varname) have values.
This is attempting to find the string length of the 81st character of the 'i'th string. This has no meaning, as detected (via the compiler) by the type system, causing the first error. You probably mean strlen(eq[i])
This'll cause you grief - firstly, eq[i] is only defined if the 'i'th string has 82 characters or more - none of yours do. Also, you're determining if eq[i]!=0 is an alphabetic character. Again, even if the string was big enough, that is meaningless - I guess you've misplaced a closing bracket.
You declared 's' as an integer variable, not an integer array. Those expressions are therefore meaningless and are also syntactically incorrect.
As I said - try to learn a bit more about the basics of the language (strings, arrays, pointers). Or use a different language which can help abstract those details out of the way.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
I am trying to run an exe in mfc,which needs a command prompt with some conditions to be given(it will not work normally). this is useful for converting dicom image to bitmap image..so can any one suggest the method.
i using invalidate() and UpdateWindow() to repaint windown.
but when i lock PC (window key + L) and after that i log on in to PC.
invalidate() and UpdateWindow() called but ondraw(CDC *pdc) funtion not run.
In my program I'm reading the clusters in the volume using the appropriate physical offsets to the disk.
for( i=0;total_noof_clusters;i++)//assign 0 as logical startling offset.
// convert cluster logical offset to physical offset// (source& dest same size,same file system)
phys_offset_source= conversion(i); // this value I get correctly
phys_offset_dest= conversion(i); // this value I get correctly
if (dwPtr1 == INVALID_SET_FILE_POINTER) // Test for failure
printf("\nSetFilePointer Failed to read from source,:%d\n",GetLastError());
printf("\nUnable to Read the Disk Error: %d\n",GetLastError());
if (dwPtr2 == INVALID_SET_FILE_POINTER) // Test for failure
printf("\nSetFilePointer Failed to write position%d\n",GetLastError());
printf("\nUnable to write he Drive Error: %d\n",GetLastError());
} // next cluster
The above code not giving no (compilation and link)error messages,
But does not give the result.
How do we know the program reading correctly?
It returns the correct no of bytes read after one read operation .
When I wrote theses data into destination , nothing wrote.
What may be the problem??
Where is the mistake in the code ?
krishnampkkm is online now Report Post Edit/Delete Message