|
My program compiles and links successfully now
I used dynamic linking to lib4. I then needed to remove the NODEFAULTLIB:"libcpmt.lib and NODEFAULTLIB:"libc.lib" from my application link options. (I still needed to have NODEFAULTLIB:"libcmt.lib")
Thank you for your help!
|
|
|
|
|
WendyS56 wrote: My program compiles and links successfully now
Excellent! That wasn't so difficult now, was it
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi,
May i know how can i get the screen resolution of the system and display a msgbox if the resolution is less than 1152*864....
|
|
|
|
|
|
I'm going to add more code into WM_PAINT hander, but I'm afraid to add to much to recude the performace.
I need a benchmark value to test if too much cpu tick is spended. Anybody has a value to share?
I know it depends on the different situation, but,.. I still like to see a estimated value.
|
|
|
|
|
|
Hi guys.
I have a fix for a edit box
I have a edit box (dialog box) which take string input ..........
The input at edit has a long limit i want to have finite entries in the edit box say string with 5 chars or number with 5 digits where i set the scope of the input string
|
|
|
|
|
How about sending it a EM_LIMITTEXT message?
"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 Guys
Can anyone help me with "INSERT INTO" statement...
I need to insert variables into table(MSSQL) and my app. is in c++.
INSERT INTO TABLE_NAME (Col1,Col2,Col3)VALUES ('var1','58.5','15')
This is ok for constants but i cant made it work if i want to insert variables instead constants...
int var1;
int var2;
int var3;
INSERT INTO TABLE_NAME (Col1,Col2,Col3)VALUES (var1,var2,var3) ...?????
any ideas?
tahnks in advance, Komo
|
|
|
|
|
komofilms77 wrote: This is ok for constants but i cant made it work if i want to insert variables instead constants...
Can't you use string , sprintf() , or CString ?
"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
|
|
|
|
|
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.
|
|
|
|
|