|
this is my code....can you just tell me how to convert it....this is dll function...
<br />
m_MainEdit=m_MainEdit + "<Price Change>" +" " + SessionId + "\t" + RequestId +"\t"+ a ; <br />
m_MainEdit=m_MainEdit + "\t"+ Market + "\t " + Bid + "\t " + b + " \t"+ Ask + "\t" +c +"\t "+ High + "\t";<br />
m_MainEdit=m_MainEdit + Low + "\t" + d + " "+ "\t" + Timestamp + "\r\n";<br />
<br />
UpdateData(FALSE);<br />
iLineCount=m_EditCtrl.GetLineCount();<br />
m_EditCtrl.LineScroll(iLineCount);<br />
<br />
<br />
<br />
_DBAccess db;<br />
db.setQuoteToDB(Timestamp,a,Market,Bid,Ask,d);<br />
|
|
|
|
|
Geez, you are not very helpfull !!
What is the prototype of setQuoteToDB ? And what are the actual parameters that you pass to the function ? What is Timestamp, what is a, what is Market, what is Bid, what is Ask and what is d ?
Don't you understand that you are passing a wrong type of parameter to the function ? So how can I help you if you actually don't provide me with the information about what the function is expecting and what you actually pass to the function.
|
|
|
|
|
Half of this reply is just guesses from my side since you don't provide much information.
There seem to be two problems here:
1. the dll func expects a parameter which is a pointer to a pointer to an 'unsigned short', but you provide it with a pointer to a 'const char'.
I suspect the dll func to expect a BSTR* and it's an out-parameter, i.e. you'll get a B-string as a result of the dll func.
If this is the case it could look like this:
BSTR bstrTheString = NULL;
setQuoteToDB( ..., &bstrTheString, ...);
Otherwise if it really is an unsigned short:
unsigned short* pMyValue = NULL;
setQuoteToDB( ..., &pMyValue, ...);
2. You're trying to convert a 'const' value to a 'non-const' which in all cases gives a compiler error. By declaring something 'const' you sign a contract where you promise not to change the value. The compiler complains if you're trying to violate that contract by type-casting to a 'non-const' type.
Hope this helps
--
Roger
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"No one remembers a coward!" - Jan Elfström 1998 "...but everyone remembers an idiot!" - my lawyer 2005 when heard of Jan's saying above
|
|
|
|
|
Hie All,
can I write a variable argument function as inline function?
Vikram S
|
|
|
|
|
vikrams wrote: can I write a variable argument function as inline function?
I suppose you could declare it inline without the compiler barfing on it, but I doubt it would actually be inline i.e. the functional code expanded instead of a call.
The code for parsing the parameters will probably be a loop which won't make it a candidate as inline. The code for calling the function will be ridicolously small in comparison so I think the compiler will discard the inline directive.
But that's just my thoughts, the real world might differ.
--
Roger
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"No one remembers a coward!" - Jan Elfström 1998 "...but everyone remembers an idiot!" - my lawyer 2005 when heard of Jan's saying above
|
|
|
|
|
I want application should display menus,captions and messages in indian languages. I am using VC++6.0 with unicode.
Atul
|
|
|
|
|
I want application to display menus,captions and messages in indian language.
abbmmm
|
|
|
|
|
You asked this question yesterday. I asked you the following.
What is that you are using to build your application? VC6 or above?
If VC6, is your app unicode aware?
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
hi
I am using VC++6.0 with unicode.So i want to change my menu and captions to indian languages.
abbmmm
|
|
|
|
|
Even if you are using UNICODE and _UNICODE in MFC Project settings the Application menu may not display UNICODE strings still the operating system installed has an in-built support to the UNICODE characters. If you are using Windowx XP you can setup unicode settins during the OS installation and latter through the control panel.
If you still want to display unicode string in your menu you just have to use customized menus because Windows menus are OS featires.
|
|
|
|
|
Good. I hope you've enabled Indic script on your computer. Prepare the unicode strings that you need to use in your app. Put it in a resource and load it at run time. Read the article suggested by prasad_som.
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
You need to use appropriate resource dlls(Having marathi strings).
This[^] article may help you understand this.
|
|
|
|
|
hi,
i need to run my application on power up.it is written in Visual studio 2005 for WIN CE 5.0.
the API CeRunAppAtEvent does not work. whatever i keep in startup folder of the WIN CE is deleted on powering up.
is there any way to do it.
thanks
-- modified at 23:40 Thursday 23rd November, 2006
|
|
|
|
|
Try to make an entry of the path in the registry
HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\Run
or
HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run
|
|
|
|
|
this also doesnt work... i tried it.
any other way?
|
|
|
|
|
Hi,
I install a hook using the dll, now I want to show a dialog in the dll, but always encounter error.
Am I missing something?
Thanks & Regards
|
|
|
|
|
Hi,
Could you post a bit of your code responsible for creation and displaying of that dialog box?
Regards
|
|
|
|
|
It's very simple, I insert a dialog resource in the dll project, then hook some application using the dll, then send some message to the application, when receive the message, I will show the dialog using the following code:
SomeDlg dialog;
dialog->DoModal();
Then the application will be crashed.
|
|
|
|
|
Hi,
I need help to identify pnp usb drivers automatically by windows without poping up New hardware found dialog box.
I am able to do it on xp and win2k by putting drivers into one folder and giving that path into "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion"
there one "DevicePath" key is there,where I have given my dirver folder path.
Here funda is that whenever you plugged in usb device it will search the
drivers into "DevicePath" Key value folder and if windows could not find the
appropriate drivers then It will pop's up the New Hardware Found Box.
On Vista,I tried same thing but it's popping up the new hardware found dialog.
I don't know how to do this on vista I have read the help from msdn help
for this.It seems on vista have some different way to do.
I have read link http://msdn2.microsoft.com/en-US/library/aa477011.aspx
Please let me know if any body have some idea about this.
Thanks
Sonani
sonani prakash
|
|
|
|
|
I've got an MFC dialog box with a combo box and several text boxes. I have to know what item in the combo box is selected in order to display the right content in the text boxes. Right now I have it set up so that when the user clicks a button it executes this segment:
CurrentSelection = ComboBoxPtr->GetCurSel();
CurrentContact = m_pMainWnd->OperationsClass.PhoneBookClass.ReturnContact(CurrentSelection);
//update text boxes based on name combo box selection
UpdateContactTextBoxes(CurrentSelection);
How can is I set it up so that it will detect when the user makes a change in the combo box, gets the current selection, and automatically executes UpdateContactTextBoxes(CurrentSelection), all without using a button? I saw a tutorial on how to do it with a wizard, but can anyone tell me how to do it with straight MFC code? I hate wizards.
|
|
|
|
|
Use events associated with the combo box.
We Believe in Excellence
www.aqueelmirza.cjb.net
|
|
|
|
|
Just add a handler to CBN_SELCHANGE message and put your code there..
|
|
|
|
|
CoffeeAddict19 wrote: How can is I set it up so that it will detect when the user makes a change in the combo box,
Use CBN_SELENDOK .
|
|
|
|
|
Thanks for your help. I got it working now.
|
|
|
|
|
How do I create NCB file with Visual Studio 6 so I can have intellisense enabled? Thanks
Norman Fung
|
|
|
|