|
Sorry but maybe the way i'm expressing my queries has some problems...
(don feel offended)... "Saying" in such a way... i also know how to say... but wad i'm trying to ask was.. "How to" how to read the bmp to a file? "How to" shift its bits... "How to" save to a file upon completing it?? Sorry pls don feel offended... thanks for trying to help anyway~ SORRY
Noob in Programming
-- modified at 12:00 Wednesday 28th June, 2006
|
|
|
|
|
we3Guy wrote: Noob in Programming
Don't take this the wrong way, but you might want to start with something a bit simpler than reading in a bitmap file and encrypting it when you are new to programming (especially new to C/C++ programming).
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Sarath.<fon wrote:<="" div="">shift its bits (e.g left shift 4 bits
???
do you mean rotate each byte 4 bits? or do you mean shift the entire buffer four bits (push bits onto adjacent bytes) ?
either way, it's much simpler to just XOR the bytes with a mask of some kind.
Cleek | Image Toolkits | Thumbnail maker
-- modified at 12:01 Wednesday 28th June, 2006
|
|
|
|
|
|
Hi all,
I am interested on implementing an owner draw scroll bar for my CRichEditCtrl Inherited class.
where can i find code snippets or example on how to do that?
thanks in advanced
Yaron Nir
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
Hi all,
I previously used Windows Forms so i'm experiencing some
difficulties with MFC.
I created a combo box, i wrote
a;b;c;d; in the Data field
but when i launch the application and
click on the right side of the combobox
nothing happens ? Why ?
Thanx in advance,
Desmo16.
|
|
|
|
|
have you extended the Popup rectangle?
it will able to do it, when click on the drop-down button of the combox box when at resource editor.
SaRath.
"It is your attitude, not your aptitude, that determines your altitude - Zig Ziglar."
My Blog | Understanding State Pattern in C++
|
|
|
|
|
sorry but i didn't understand what you said.
I simply put a combobox from the toolbar onto the form
and wrote a;b;c;d; on the data property of the combo box ?
Is there any code to write or other actions to do ?
|
|
|
|
|
Desmo16 wrote: but when i launch the application and
click on the right side of the combobox
nothing happens ? Why ?
Your question is somewhat ambiguous. Is the combobox not dropping down? Is it disabled?
When creating a CComboBox control you should set the style to:
WS_CHILD | WS_VISIBLE | WS_TABSTOP
also add to the style:
CBS_DROPDOWN or CBS_DROPDOWNLIST
The MSDN help docs topic on CComboBox::Create() links to a list of all combo box styles.
A CodeProject ComboBox Article[^]
Mark
|
|
|
|
|
it's everything ok now, thanx.
i just wasn't able to expand vertically the combo box in design view.
|
|
|
|
|
Is there an easy way to send CString data to a RichEditView?
I tried using Visual C++ 6.0 to create an SDI app and then dumped older code where I assigned text to a Arrary of CStrings in the view class using the pDoc pointer and then calling Invalidate() to invoke the OnDraw() function to perform the pDC->TextOut() function. Is there something similar for the RichEditView? In my attempt to copy and paste code I was unable to get into the CRichEditView::OnDraw() function.
new user
-- modified at 11:02 Wednesday 28th June, 2006
|
|
|
|
|
|
First call GetRichEditCtrl() to get a reference (not a pointer) to the view's edit control, then call SetWindowText() , like:
CRichEditCtrl &edit = GetRichEditCtrl();
edit.SetWindowText("Hello");
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I must have posted at the same time as you did.
|
|
|
|
|
|
The following obtains a pointer to the view's control the outputs a string to the current caret position. For example:
void MyRichEdView::WriteString(CString sStr)
{
CRichEditCtrl & rich = GetRichEditCtrl();
rich.ReplaceSel(sStr);
}
Mark
|
|
|
|
|
Hello,
I am developing an application which must acquire films with the V700 scanner using TWAIN; i have problems defining the scan area; with the older Expression 1680pro I have no problems at all. Has anyone experience with this scanner? Help is VERY appreciated...
Regards, Fulvio
|
|
|
|
|
I am using C++ Builder Pro to create a database program. I have a DBCtrlGrid which views several records at one time. On this grid I have various text boxes with the data from the database records displayed. I would like to write a statement where if a paticular value is > 10 the text would change to red for that specific record textbox(123Txt). when I try to do this now it changes all the viewed records text in the textbox(123Txt) to red. Is it possible to change just one panels txt using this DBCtrlGrid? Any thoughts would be great.
Debs
|
|
|
|
|
I need to take a float or double value nand determine how many numbers it has before and after the decimal. Examples:
123.3 -> 3 before and 1 after
.12345 -> 0 before and 5 after
123 -> 3 before and 0 after
The method has to be extremely fast because it may be executed very often in a high-volume environment. I know I can convert it to a string and search for the decimal, etc., but string functions are very slow.
Thanks!
Barry Etter
|
|
|
|
|
use CString's Format function
CString strFloat;
strFloat.Format("%f",myfloatvalue);
//Search for .
strFloat.Find();
and then use CString's Left() and Right() methods
This code is not optimized. It's just one way of doing this
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
Yeap buddy,
I read that , That's why I quoted that the method I propose is not optimized and there could be many other methods of achieving the same.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Do you know how how a double or float laid in memory?
it would be easier using some mask & ing, | ing or <<ing>>ing to catch the values.
SaRath.
"It is your attitude, not your aptitude, that determines your altitude - Zig Ziglar."
My Blog | Understanding State Pattern in C++
|
|
|
|
|
He specifically said that he did not want to convert to and from strings.
--
100% natural. No superstitious additives.
|
|
|
|
|
For the number of digits before the decimal, you could use
int iNumBefore = 0;<br />
iNumBefore = 1 + (int)(log10(x));
where x is your value
As for the number of digits after, I don't have any quick ideas on that, but as you say, you could convert to a string (although you might get different results because of the precision of doubles) and then find the decimal.
Hope that helps.
Karl - WK5M
PP-ASEL-IA (N43CS)
<kmedcalf@ev1.net>
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|