|
Friends,
I need to develop a client side application in VC++ that has to communicate with some web-service.
I never did such work before. So can you guide me how to communicate with web service in unmanaged C++. Do i need to take winsock approach ?
Imtiaz
|
|
|
|
|
|
In SDI CView-based application, in OnOK() of CDialog class, how to call a function in CView?
For example:
when clicking a button on a dialog, invoke a funtion in CView to invalidate drawing on the view
thanks very much!
don't stop me now!!!
|
|
|
|
|
unidentify wrote:
In SDI CView-based application, in OnOK() of CDialog class, how to call a function in CView?
Using OnOK() will be not right method, i think you better use Custom Window Messages!!!
keep smilling.....b'coz smile is the shortest distance between people....
|
|
|
|
|
My project is Splitter window application. First view is inherrited from CFormView. Two other view is CView-based. This class add 3 class that inherrited from CPeropertyPage to use as Tabbed control and follow that there are 3 Dialog.
Then I want each event occur at these dialog (clicking an button) will be display an message in second view (in OnDraw())
Please help me!! Thanks a lot.
don't stop me now!!!
|
|
|
|
|
Hello
I am working with a MDI application in VC++. I have to pass command line arguments to my program. The arguments will be specified as comma seperated text for ex: test.log,test.xml. If these two arguments are passed then I should disable the maximize & minimize buttons,disable the File Menu option of the MainFrame window and also disable the first toolbar button on the MDI Child window. If none of these arguments are passed then the application should work as a normal MDI application.
I need information on two items:
1) How do I pass and process the command line information. I tried overriding ParseParam function of CCommandLineInfo class to change the default parsing ,but could not succeed in doing so. I never worked with this class before.
2)My main window has File & Window menu items. I need to disable them. My child window has a tool bar with two buttons. I need to disable only a the first toolbar button.
Can any one please give me some suggestions or information for implementing the above mentioned items in my project.
Your expert guidance can be of great help to me.
Thanks
Madhavi.
Thanks
|
|
|
|
|
|
Hi Alok
Thanks for the suggestion. Can you please give me some links to samples that have used this API. Can I ovveride the default behaviour of ParseParam() using this API. I do not wnat MFC to parse the command line information anymore. I want to do it myself.
Thanks
Madhavi.
|
|
|
|
|
|
|
hi can anyone point me to the right tutorials or give me a snippet of code to connect to a remote mysql database from an MFC application using ODBC or MySql++ or whatever ?
i have checked the tutorials section and found one tutorial that compiled..but it works only for localhost
Thanks.
Kane
http://www.coderkane.com[^]
"Some guys hack just to get themselves a girlfriend.What a pathetic reason huh ?"
|
|
|
|
|
For remote connections, i think you need to add your remote ip to the mysql database table (dont exactly remember which one... check the manual). If it worked for localhost, it should also work for remote host after you have the permission for the remote ip. Hope this helps.
- tareq
|
|
|
|
|
yes it does..it works fine now...thankx tareq !
-kane
http://www.coderkane.com
"Some guys hack just to get themselves a girlfriend.What a pathetic reason huh ?"
|
|
|
|
|
How to keep the indentation when posting code? I use a
tag around the code and it looks fine in the preview but when I view actual thread the indentation is gone. Is it a tab vs. space thing or perhaps a Firefox thing?
<pre>
this (0 spaces)
should (2 spaces)
be (4 spaces)
indented (6 spaces)
|
|
|
|
|
johtib wrote:
How to keep the indentation when posting code? I use a tag around the code and it looks fine in the preview but when I view actual thread the indentation is gone. Is it a tab vs. space thing or perhaps a Firefox thing?
It happens with Firefox (don't know if it's a Firefox problem).
Use for explicit indentations
|
|
|
|
|
No more easy cut-n-paste eh?
|
|
|
|
|
johtib wrote:
No more easy cut-n-paste eh?
Not with FF. CP is optimized for IE, FF seconds. Maybe you post in the 'Suggestions' forum?
|
|
|
|
|
i write some codes,that compute the fibonacci number:
#include<iostream.h>
#include<iomanip.h>
int fib(int n)
{
if(n<=2) return 1;
else
{
int i,j,k,l;
j=k=1;
for(i=2;i<=n;i++)
{
l=j;
j+=k;
k=l;
}
//if there has the return statement,the result "2" will be absent!
//return j;
}
}
void main()
{
int n,i;
cout<<"Compute fibonacci number,pelease input the index:"<<endl;
cin="">>n;
cout<<"fibonacci "<
|
|
|
|
|
kcynic wrote:
but if i alter the Cyc like this :for(i=2;isomebody would tell me why?
???
Don't try it, just do it!
|
|
|
|
|
i'm sorry,there should be :for(i=2;i
|
|
|
|
|
When you post your code, check the "Do not treat <'s as HTML tags" so that your for(int n = 0; n < 10; n++) comes out correctly.
|
|
|
|
|
Hello,
I was just wondering how hard it would be to take 'output' from a 3rd party program and use it as 'input' into my program. for example.
list_folder_contents.exe | myprog.exe
What I'm trying to do...
I have a 3rd party program that images drives. This program allows you to pipe the data/image as its creating it, so my thought was to pipe it into my program and as that data is coming in I would send it over a TCP socket.. The sending and receiving via the socket is easy enough.. I just havent ever tried to take output from another program and used it as input..
Any pointers on where I should start?
Thanks,
Rob
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
|
Would these lines allocate valid memory for a 2D dynamic array?
.
.
.
float (*tmp)[4] = NULL;
if (( tmp = (float (*)[4])calloc(somenumberofmemblocks,4*sizeof(float) )) == NULL)
... error occurred
|
|
|
|
|
What error are you getting? This compiles cleanly and works under VC++ 7.1. Observe:
<br />
#include "stdafx.h"<br />
#include <iostream><br />
#include <conio.h><br />
<br />
int _tmain(int argc, _TCHAR* argv[])<br />
{<br />
const int block_count = 12;<br />
const int float_count = 4;<br />
<br />
float (*tmp)[float_count] = (float (*)[float_count]) <br />
calloc(block_count, float_count * sizeof(float));<br />
if(!tmp)<br />
{<br />
std::cout << "calloc failed";<br />
char c = getch();<br />
return 1;<br />
}<br />
<br />
float counter = 0;<br />
for(int n = 0; n < block_count; n++)<br />
{<br />
for(int nn = 0; nn < float_count; nn++)<br />
{<br />
tmp[n][nn] = counter;<br />
counter += 1.0;<br />
}<br />
}<br />
<br />
for(int n = 0; n < block_count; n++)<br />
{<br />
for(int nn = 0; nn < float_count; nn++)<br />
{<br />
std::cout << tmp[n][nn] << std::endl;<br />
}<br />
}<br />
<br />
char c = getch();<br />
return 0;<br />
}
Prints from 0 to 47.
|
|
|
|