|
hi,
i have used a dialog box in my application.i want the dialog box with minimize,restoredown,close on title bar of my dialog box.
how to do so????????
In the property page of dialog box i have set
style:Popup
border : dialog frame
and enabled title bar,system menu,minimize and maximize box.
I want the restore down icon instead of maximize box while loading of dialog box.
In vb.net we use set the window state to be maximized in the property page what to do for dialogbox in mfc
zari
|
|
|
|
|
If you set min/Max/ now what problem?
|
|
|
|
|
i want my dialog box to be loaded to a maximized state while executing and on clicking the restoredown icon the dialogbox size has to be reduced
this is my task.
zari
|
|
|
|
|
zareee wrote: want my dialog box to be loaded to a maximized state while executing and on clicking the restoredown icon the dialogbox size has to be reduced
ShowWindow(<name>SW_SHOWMAXIMIZE);
"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
|
|
|
|
|
By default only the Close button is enabled. You can add the Minimize Box or Maximize Box styles to add the respective buttons to the caption bar.
|
|
|
|
|
Hello EveryBody
I want to establish a connection between two modem which are not connected by the internet but are connected by the telephone line i.e our PSTN line both are at remote location
And after establishing connection i want to transfer some data like was some lines in a file.
1) communication can be done through tapi between 2 modem,but I wanted to know how is it possible to send the data after establishing a TAPI connection.
is there anything possible to establish an FTP connection
or
Transfer some 100 line
Thank you for the reply in advance
Sarguna
|
|
|
|
|
Yes. You can use TAPI to place a call (to the other modem), and then transfer data between the modems.
And use TAPI to wait for a call, answer it and then transfer data between the modems.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
|
I want to store data coming from remote server.Is there any open source code link or any good direct good link which will tell abt the database prograaming in vc++.About the how to make DSN connection with odbc and all.
Thanks
|
|
|
|
|
view[^]
May be it will help u
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
|
The input is an int with no spaces, how would i get it to do this, 111,
int n=0;
int decimal=0;
cin>>binary;
if(binary!='/n'){
decimal=binary*2^n
n++}
The thing is it has to affect only one digit of the int at a time, and I'm not allowed to use arrays.
Any Ideas on how this could be achieved.
binary=111
decimal=(1*2^0)+(1*2^1)+(1*2^2)=7
like that but for 32 bits.
any ideas are appreciated, thx.
|
|
|
|
|
aflothmann wrote: I have to convert any binary number up to 32 bits to decimal.
Is this some kind of assignment to you?
Anyway's here's the code:
#include "math.h"
#include "iostream"
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
cout<<"Enter a number in the binary format:"<<endl;
unsigned int num;
cin>>num;
int t=0;
int result=0;
int j=0;
while(num!=0)
{
t=num%10;
result+=t*pow(2,j);
num=num/10;
j++;
}
cout<<"The equivalent of the binary number is :"<<result;
return 0;
}
The code just shows how this can be done.Modify the code to meet your needs.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
aflothmann wrote: int n=0;
int decimal=0;
cin>>binary;
if(binary!='/n'){
decimal=binary*2^n
n++}
isn'y you need some thing like this
while(binary!=0)
{
int nTmp=binary%10;
binary=binary/10;
decimal+=nTmp*pow(2,n);
n++;
}
"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
|
|
|
|
|
In addition to the above posts, an alternative to pow(2, n ) is the bitwise left shift operator ( 1 << n ).
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Are you simply wanting to convert from base-2 to base-10? If so, just use strtol() .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Yes that's what I'm trying to do, but waht is strtol()? and how do I use it.
Thanks
|
|
|
|
|
aflothmann wrote: ...waht is strtol()? and how do I use it.
See here.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
want to store data in txt file my code works fine but i dont want to uppend the record in that,so is there any function which will alwyas overwright the txt file and not do the uppend
<br />
if(txtMarket == "EURUSD")<br />
{<br />
m_MainEdit_EUR =m_MainEdit_EUR + Market +"," + Bid +","+ b +","+ Ask +","+ c +","+ High +","+ Low +","+ d +","+ Timestamp+"\n";<br />
myfile.Open("EurUsd.txt",CFile.modeCreate | CFile.modeWrite);<br />
LPSTR buf;<br />
int i = m_MainEdit_EUR.GetLength();<br />
buf = m_MainEdit_EUR.GetBuffer(i);<br />
myfile.Write(buf,i);<br />
myfile.Close();<br />
}<br />
<br />
TXT FILE OUTPUT I AM GETTING
<br />
EURUSD,1.2677,D,1.2680,D,1.2696,1.2679,1,01:20<br />
EURUSD,1.2676,D,1.2679,D,1.2696,1.2679,1,01:21<br />
EURUSD,1.2677,U,1.2680,U,1.2696,1.2679,1,01:21<br />
EURUSD,1.2676,D,1.2679,D,1.2696,1.2679,1,01:21<br />
EURUSD,1.2677,U,1.2680,U,1.2696,1.2679,1,01:22<br />
EURUSD,1.2676,D,1.2679,D,1.2696,1.2679,1,01:23<br />
EURUSD,1.2677,U,1.2680,U,1.2696,1.2679,1,01:23<br />
EURUSD,1.2678,U,1.2681,U,1.2696,1.2679,1,01:23<br />
EURUSD,1.2677,D,1.2680,D,1.2696,1.2679,1,01:23<br />
EURUSD,1.2676,D,1.2679,D,1.2696,1.2679,1,01:23<br />
EURUSD,1.2677,U,1.2680,U,1.2696,1.2679,1,01:23<br />
<br />
expecting output<br />
EURUSD,1.2677,U,1.2680,U,1.2696,1.2679,1,01:23<br />
It will always update by last record.
Do you have any suggestion
|
|
|
|
|
abrakadbra wrote: m_MainEdit_EUR =m_MainEdit_EUR + Market +"," + Bid +","+ b +","+ Ask +","+ c +","+ High +","+ Low
I think this line is the problem. You are always concatenating to an existing string.
I guess it should be
m_MainEdit_EUR = <code>m_MainEdit_EUR +</code> Market +"," + Bid +","+ b +","+ Ask +","+ c +","+ High +","+ Low +","+ d +","+ Timestamp+"\n"; You are appending to the previous buffer that you had. You should clear it first and then assign.
|
|
|
|
|
no it is not working..it state the error
: error C2110: cannot add two pointers
|
|
|
|
|
abrakadbra wrote: no it is not working..it state the error
: error C2110: cannot add two pointers
Yeah it will not work if Market is itself a pointer...
Try this...
m_MainEdit_EUR = "";
m_MainEdit_EUR = m_MainEdit_EUR + Market +"," + Bid +","+ b +","+ Ask +","+ c +","+ High +","+ Low +","+ d +","+ Timestamp+"\n"; This will work.
|
|
|
|
|
|
I agree with ThatsAlok use of CString:Format instead for example str="1"+"2"+"3"...
|
|
|
|
|
abrakadbra wrote: m_MainEdit_EUR =m_MainEdit_EUR + Market +"," + Bid +","+ b +","+ Ask +","+ c +","+ High +","+ Low +","+ d +","+ Timestamp+"\n";
In Continuation with Mr Thomas,
what about
m_MainEdit_EUR.Format(_T("%s,%s,%s,%s,%s,%s,%s,%s,%s\n"),Market,Bid,b,Ask,c,High,Low,d,Timestamp);
"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
|
|
|
|
|