|
|
Try overriding the message handles for WM_CHAR, WM_PASTE, and WM_CUT.
--
100% natural. No superstitious additives.
|
|
|
|
|
hey guys i am working on VC++. need to implement a combo style color palette wherein i have only black n white colors and textures/patterns made out of the two colors
i have made bitmaps out of the patterns like a chessboard pattern. now i need to add these bitmaps to the combo box so that it coolk like a palette and handle the selection events when user clicks on any bitmap, so that it gets loaded on the selected object on which to apply the texture.
Can any one help please.
Thanx
|
|
|
|
|
Rather than putting those bitmaps on the combobox why don't you use the list control where you can set the images easily and handle them well.
Is it a project specific scenario?
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Thanx _AnShUmAn_ but u r right this a client specification to use such a control. for reference u can see how format cell option in Excel is done. i need a similar thing.
(open excel, select a cell, right click , select format cells, select patterns tab and drop down the format combo, u will see different patterns in black n white. I need that)
Thanx neways
_AnShUmAn_ wrote: Rather than putting those bitmaps on the combobox why don't you use the list control where you can set the images easily and handle them well.
Is it a project specific scenario?
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Can we implement OPTICAL CAHARACTER RECOGNITION in SDK.
In C under linux for OCR the X11 protocol and XWindow system is used.
Is there any application like 'CLARA OCR' available in SDK which learnds scanned images, makes training , recognizes symbols.
Abhishek Joshi
Software Engineer
|
|
|
|
|
abhisheks23 wrote: Is there any application like 'CLARA OCR' available in SDK which learnds scanned images, makes training , recognizes symbols.
By Default Not, but you can find many of Libaray dealing with same.. try Googling
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hello everyone!
Alright, I'm making a program, and it's supposed to work on many OS's, including MS-DOS... I wouldn't like to limit my Windows users to 8.3 filenames, so how can I get the maximum filename length in standard C? (not plusplus, just plain ol' C )
Thanks!
Lord Kixdemp
www.SulfurMidis.com
www.SulfurSoft.tk
[ftp://][http://][hotline://]tsfc.ath.cx
|
|
|
|
|
wrote: Hello everyone!
Alright, I'm making a program, and it's supposed to work on many OS's, including MS-DOS... I wouldn't like to limit my Windows users to 8.3 filenames, so how can I get the maximum filename length in standard C? (not plusplus, just plain ol' C )
check..FILENAME_MAX macro having maxlength 80 chars defined in stdio.h header file
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
|
Hi everyone i'm trying to update a record of a db in access using ADO and the SQL update command
the columns in the db are:
token - text
Spam - number
Ham - number
Pos - number (with decimal points)
app- number
in my program i have the following variables for each of the columns
_bstr_t token;
int valField2;
int valField3;
double valField4;
int valField5;
i try this code but i get an error at runtime
pCommand->ActiveConnection = m_pConn;
command="UPDATE tblDictionary SET Spam="+vlaField2;
command+=",Pos="+valField4;
command+=",app="+valField5;
command+="WHERE token='"+ token;
command+="'";
_bstr_t strSQLstatment=command.c_str();
variant_t vntRecordAffected;
m_pConn->Execute(strSQLstatment,&vntRecordAffected,adCmdText);
i get the following error Error:¦¨¨m¨V //i have no idea what this means but this is what i get
if i try to update with spacific numbers instead of using variables it works fine
pCommand->ActiveConnection = m_pConn;
command="UPDATE tblDictionary SET Spam=10,Pos=0.43,app=10 WHERE token='"+ token;
command+="'";
Any ideas what might be wrong.
Do i need to convert all variables that are to be inserted to type _bstr_t;
Please help me i really need to find this out thanks a lot
|
|
|
|
|
Can you log the strSQLstatment just before passing to the execute method.
suhredayan There is no place like 127.0.0.1
|
|
|
|
|
Thanks for the reply suhredayan®
i'm sorry i'm not very good with ADO what to you mean by
log the strSQLstatment?
thanks again
|
|
|
|
|
antonaras wrote: i'm sorry i'm not very good with ADO what to you mean by
log the strSQLstatment
Can you print the the content of strSQLstatment somewhere and see any problem with the it before passing to the Execute method.
suhredayan There is no place like 127.0.0.1
|
|
|
|
|
Hey suhredayan® thanks for the reply
when i output the strSQLstatement i get:
ictionary SET Spam=,Pos=☺s=WHERE token='pill'//is totally messed up
Error:Θ·╒
Press any key to continue
and the output of strSQLstatment when i use fixed numbers looks good
UPDATE tblDictionary SET Spam=10,Pos=0.43,app=10 WHERE token='pill'
Press any key to continue
Can u see why this happens cause i have no clue thanks again
|
|
|
|
|
use sprintf() to format the command string.
suhredayan There's no place like 127.0.0.1
|
|
|
|
|
Hey suhredayan®
can u help me with using sprintf()
sprintf(strSQLstatment,command) is this correct ?
|
|
|
|
|
Since valField variables are of integer type, expressions like ",Pos=" + valField4 seem to be problematic.
Do you see the error when you compile the program, or when the program runs?
|
|
|
|
|
Thanks for the reply Viorel
it compiles ok no errors
at runtime i get an error
if u see the discusion above
i show the output from strSQLstatment
and it seems problematic
can u see why
|
|
|
|
|
antonaras wrote: _bstr_t strSQLstatment=command.c_str();
Set a breakpoint here. What is the value of command ?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
plz some body tel me how ican fetch a selected row from mysql table usimg mfc dialog box
as i make a table in mysql and ienter empid of certain employees from mfc dailog box by connecting vc++ with mysql
now i want to fetch a single employee record
but problen is that when i want to fetch a record it always fetch first record from table
but when i use RAND() option it randomly select records
and not thati want
so plz tel me quickly
hi
|
|
|
|
|
You need a parameterized record set. I show a brief example here.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hello,
what means with InitHashTable() in CMapStringToOb map, where to use tis function, for what?
How and can i use this to sort CMapStringToOb map???
thanks
break;
|
|
|
|
|
I think this function can be used to prepare a CMapStringToOb object before adding a known number of data. It clears the map and then can pre-allocate an internal buffer, so the next insert operation will perform faster. This function is optional, but is useful when you know how many items you will insert (the default hash-table size is fairly small -- see the source of this function).
This function is not used for sorting. By sorting the hash-table you probably mean sorting of keys. In my opinion you have to extract all of the keys from the hash-table, put them in an array (CStringArray ) and sort it separately. For instance, investigate the qsort function.
If you are familiar with STL library, you can use another kind of collections and the provided sort function.
|
|
|
|
|
Hello comunity,
does any one know how to sort an CMapStringToOb map????
regards
break;
|
|
|
|