|
Hope, the example below can help
graph::addvalue(int nummer, CString typ, CString kstartrnummer,int zeile, int spalte, CString betrag, CString text, int r, int g, int b)
{
CString abfrage;
char strbetrag[100];
CString cnummer, czeile, cspalte, cr, cg, cb;
sprintf(strbetrag, "%i\0", nummer);
cnummer = strbetrag;
sprintf(strbetrag, "%i\0", zeile);
czeile = strbetrag;
sprintf(strbetrag, "%i\0", spalte);
cspalte = strbetrag;
sprintf(strbetrag, "%i\0", r);
cr = strbetrag;
sprintf(strbetrag, "%i\0", g);
cg = strbetrag;
sprintf(strbetrag, "%i\0", b);
cb = strbetrag;
text.Replace("'", "''");
abfrage = "INSERT INTO Graph (Nummer, Typ, Kstartrnummer, Zeile, Spalte, Text, Betrag, r, g, b) VALUES (" ;
abfrage = abfrage + cnummer + ", '" + typ + "', " + kstartrnummer + ", " + czeile;
abfrage = abfrage + ", " + cspalte + ", '" + text + "', ";
abfrage = abfrage + betrag + ", " + cr + ", " + cg + ", " + cb +")";
db.ExecuteSQL(abfrage);
}
Good luck, Gérard
|
|
|
|
|
i made it with sprintf and works great thanks guys
|
|
|
|
|
BSTR strLoggedInUser=GetLoggedInUser();//is this line of code is correct or i use wcscpy here.
BSTR value=::SysAllocStringLen(L"",::SysStringLen(strLoggedInUser));
wcscpy(value,strLoggedInUser);
::SysFreeString(strLoggedInUser);
///////////////////////////////////////////////////////////////////////
HRESULT hr = pclsObj->Get(L"Manufacturer", 0, &vtProp, 0, 0);
BSTR strItemName =vtProp.vt==VT_NULL?L"-NA-":vtProp.bstrVal;// here too is this line of code is correct or i use wcscpy here.
“You will never be a leader unless you first learn to follow and be led.”
–Tiorio
"Coming together is a beginning, staying together is progress, and working together is success." Henry Ford
|
|
|
|
|
BSTR value=::SysAllocString(strLoggedInUser);
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
|
i know how to copy bstr, but my problem is that when i assign
BSTR b=L"hello";
some where in code the value of b changes to " some garbage value".
but if i use wcscpy, the value of b doesn't change.
please read my question and answer me.
“You will never be a leader unless you first learn to follow and be led.”
–Tiorio
"Coming together is a beginning, staying together is progress, and working together is success." Henry Ford
|
|
|
|
|
Take a look at: http://msdn.microsoft.com/en-us/library/ms221069.aspx[^]
It is clearly stated that asigning anything to a BSTR should be done using SysAllocString. So using wcscpy or a regular asignment operator (=) is wrong by definition.
You can try something like this (I assume GetLoggedInUser() returns a wchar *):
BSTR strLoggedInUser = ::SysAllocStringLen( GetLoggedInUser() );
::SysFreeString(strLoggedInUser);
|
|
|
|
|
Mogaambo wrote: BSTR b=L"hello";
That is bad.
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]
|
|
|
|
|
BSTR b=SysAllocString(L"hello");
BSTR c=b;// here wcscpy should be used or it will work
“You will never be a leader unless you first learn to follow and be led.”
–Tiorio
"Coming together is a beginning, staying together is progress, and working together is success." Henry Ford
|
|
|
|
|
Mogaambo wrote: BSTR b=SysAllocString(L"hello");
The above is fine.
Mogaambo wrote: BSTR c=b;// here wcscpy should be used or it will work
The above is bad.
Use, instead
BSTR c = SysAllocString(b);
Please read [^].
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]
|
|
|
|
|
Hi All,
I need to create a plugin for adob photoshop. can any give me some idea from where i can get some example sorce code or can i found SDK to develop plugin with VC++.
please share your knowledge.
thanks
Bankey Khandelwal
|
|
|
|
|
See here[^] for downloading the SDK.
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
Hi,
I need to write an application in c on linux, which has to fire a http url. Can you guide me?
Is there any wrapper class like CHttpConnection(MFC) which can be used in linux.
Thank you
Saadhinchaali
|
|
|
|
|
|
Hai all,
In CDialog,zooming the image and scrolling works fine for dialog but not picture control(CStatic)of CDialog.
I am trying to load an image(any type) in picture control and zooming it.For that i am using the third party class where in contructor i am assigning picture control window.It displays the image and enable the scrollbar according to zoom.
Passing this->m_hWnd of CDialog inside my Zoomin()
SetScrollInfo(this->m_hWnd ,SB_HORZ,&m_HSInfo,TRUE) This code is calling OnSize() of CDialog and diaplays image in dialog where i can access scrollbar,but if i pass my picture control window inside the
SetScrollInfo(hWndpicturecontrol,SB_HORZ,&m_HSInfo,TRUE) it is not caling OnSize() of CDialog and i cant even access the thumb of the scrollbar.
I followed the sample by refering the below URL
http://www.codeproject.com/KB/cpp/GDI_.aspx
Thanks and regards
SatheeshKumar.
|
|
|
|
|
Hi,
I dont have Idea which is 3rd party class your using but you can use CFormview or CScrollview in the Dialogbox which make the you work easier.
GG
|
|
|
|
|
Sample code(c++) to get the screen shot of the windows opened in the desktop on CE Device machine. How would the screen shot be saved as bitmap file in the device machine?
Thanks
|
|
|
|
|
Would this work?
"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
|
|
|
|
|
Hello All,
Thank you all for reading the post!!!
My company has developed Anti-Theft software for Symbian series 60 2nd edition and UIQ 2 powered phones. We have also developed two types of windows based Key generators to give away the unique registration code to users to unlock the trial version. This software is currently live for sale on different online sales channels like www.handango.com and others.
We want to sell out this product with complete SOURCE CODE to any interesting company.
Yes, you read it right, it’s with source code!!!
We have a set of very formal reasons for it.
1. We are not interested in porting the application on the Symbian Series 60 3rd edition and other platforms
2. We are in a process to raise the funds to explore opportunities in the desktop software development.
3. We want that the masterpiece i.e. code created by our company should not be in vein.
This antitheft software includes 5 (FIVE) subprojects i.e. 2 .lib files,2 .mdl files, 1 .exe file and 1 .app files which are as follows:
1. First .lib file gives functionality of normal keygenerator to be embedded in the main app.
2. Second lib file gives functionality of RPN based keygenerator to be embedded in the main app.
3. First .mdl makes the application auto start on phone restart.
4. Second .mdl makes the application as MIME compatible.
5. .exe file provides functionality for uninstalling the application from the phone.
6. .app is the main application file.
Feature of software design:
1. Software is completely designed using object oriented technology.
2. Every single minute detail is documented.
Features of software:
1. Reads the IMSI, Cell ID, Country code and IMEI of the phone.
2. Remains invisibly installed in the phone and only authentic user can access it with the password. It cannot be seen even in the default list of installed applications.
3. Uses very low memory i.e around 200K of RAM in runtime.
4. Backs up all the contacts and SMS
5.I nvisibly sends SMS which cannot be traced in the phone. No log entries can be found.
I am in a search of potential buyer who can buy this complete system. I want to give away the product with exclusive rights to the buyer so that our role will be finished from the brand development and the buyer may customize it, rebrand it or resell it. Everything will be done according to the legal software acquisition agreement only. I am expecting not less than 20K USD (which is very very reasonable from our side) for this product. I will reveal the software name and the my company's name at the start of the discussion.
All interested parties are request to send their quote(s) at shaperu@gmail.com
I would really appreciate and reward any help to find out the potential buyer for me.
Once again, thank you all for reading the post!!!
P.S. : I believe that this is the place of developers and a developer can only understand the value of the SOURCE CODE
|
|
|
|
|
Your post has been reported as abuse.
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]
|
|
|
|
|
Hi Pallini,
Thank you for READING this thread.
I would like to know that why did you consider this post as ABUSIVE?
Also, I am not advertising any stuff here. I thought lots of software developers might have gone through this phase. I just wanted to have their suggestions.
Thanks!
|
|
|
|
|
Hi samdecosta,
samdecosta wrote: Thank you for READING this thread.
You ARE welcome.
samdecosta wrote: I would like to know that why did you consider this post as ABUSIVE?
Because it IS ABUSIVE in THIS FORUM.
samdecosta wrote: Also, I am not advertising any stuff here.
This is not true.
samdecosta wrote: I thought lots of software developers might have gone through this phase. I just wanted to have their suggestions.
That's fine, done on the right forum.
samdecosta wrote: Thanks!
Thank you.
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]
|
|
|
|
|
Hello,
I welcome your view but could not understand what you actually wanted to convey?
Please make it clear that how it becomes ABUSIVE?
Thanks!
|
|
|
|
|
Advertising is abusive in this forum.
[added]
Hey Sam, just joined the Mr.Univoter club?
[/added]
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]
|
|
|
|
|
|