|
toxcct wrote: sorry sir, my finger slided too fast on my mouse button, and i unvoluntarily voted you down...
No worries, mate
|
|
|
|
|
toxcct wrote: sorry sir, my finger slided too fast on my mouse button, and i unvoluntarily voted you down... all appologies
No worries! I voted 5 on your Behalf !
"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
|
|
|
|
|
qfegd = quo fas et gloria ducunt
|
|
|
|
|
qfegd wrote: qfegd = quo fas et gloria ducunt
sorry, i don't speak latin regularly this means ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
it mean:
Everywhere you go, glory will follow
Premature optimization is the root of all evil
|
|
|
|
|
Hi all
I'am using these member functions of CDC class to calculate the
monitor size. none of these functions return the correct value.
I need to calculate the exact size of the monitor.
you can also use this function in your PC and try.
double CMonSizeView::CalcSize()
{
CClientDC dc(this);
int width_mm = dc.GetDeviceCaps(HORZSIZE);//width in mm
int vert_mm = dc.GetDeviceCaps(VERTSIZE);//height in mm
//calculate the diagonal length in mm
double d = sqrt(width_mm*width_mm + vert_mm *vert_mm);
d = d*0.0393700787;//convert it in to inches
return d;
}
please give your feeback and suggestions.
thanks and regards
pradish
|
|
|
|
|
pradish wrote: I need to calculate the exact size of the monitor.
Why? What difference does it make if you have a 15" CRT or a 21" flat panel? Both of them are capable of displaying various resolutions. What you should be concernced about, if at all, is the resolution of the monitor.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
Search the MSDN 2003 for the
"Video and Monitor Classes"
There are some class like
Win32_DesktopMonitor
Win32_DisplayConfiguration
...
..
U can try finding
thank you
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
pradish wrote: I'am using these member functions of CDC class to calculate the
monitor size. none of these functions return the correct value.
Is this Api Help GetMonitorInfo
"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
|
|
|
|
|
Hi all
I'am using these member functions of CDC class to calculate the
monitor size. none of these functions return the correct value.
I need to calculate the exact size of the monitor.
you can also use this function in your PC and try.
double CMonSizeView::CalcSize()
{
CClientDC dc(this);
int width_mm = dc.GetDeviceCaps(HORZSIZE);//width in mm
int vert_mm = dc.GetDeviceCaps(VERTSIZE);//height in mm
//calculate the diagonal length in mm
double d = sqrt(width_mm*width_mm + vert_mm *vert_mm);
d = d*0.0393700787;//convert it in to inches
return d;
}
please give your feeback and suggestions.
thanks and regards
pradish
|
|
|
|
|
Do the int width_mm and & vert_mm right for
the monitor u are using .
I mean have u tried to calculate the real heght
and width of your screen and compare it with
what u get it in the variables.
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
-----> hr = db.Open(_T("SQLOLEDB.1"), dbinit);
if (FAILED(hr))
{AfxMessageBox("Failed To Connect Datasource"); }
My code is terminating on above line please help.
Actually senior programmer who developed code left for me to debug
help.
|| ART OF LIVING ||
|
|
|
|
|
RU are trying to connect to database
whose name is "SQLOLEDB.1" {it should be ".mdb",..)
Try specifying the full path name
of the data source.
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
yes I am trying to connect to database but its name is not
sqloledb. There is lot description of this word in msdn.
but i didnot understood.Anyway this type of connectivity he has used at
another place successfully but here it is giving error
void OleList::ExecuteQuery(CString str,bool refreshcol,bool fillcheckbox)
{
ptr=new CObArray;
USES_CONVERSION;
CDataSource db;
HRESULT hr = db.Open(_T("SQLOLEDB.1"), dbinit);
if (FAILED(hr))
{
AfxMessageBox("Failed To Connect Datasource");
return;
}
CSession session;
session.Open(db);
int i=0;
CCommand<cdynamicaccessor> product;
CString temp=GenerateSQL();
LONG row;
char tt[50];
hr=product.Open(session,temp, NULL, &row, DBGUID_DEFAULT, true);
if (FAILED(hr))
{
AfxMessageBox("Failed To Create Table");
return;
}
if(refreshcol)
{
// coltype.RemoveAll();
DBTYPE pType;//=NULL;
for(ULONG j=0;j< product.GetColumnCount() && j < colsize;j++)
if(product.GetColumnType(j+1,&pType))
coltype->SetAt(j,pType);
}
i=0;
if(product.MoveFirst()==S_OK)
do{
CStringArray* sarr=new CStringArray;
sarr->SetSize(colsize);
for(int k=1;k<=colsize;k++)
{
CString st;
switch(coltype->GetAt(k-1))
{
case DBTYPE_STR :
{
char* tm=(char*)product.GetValue(k);
st=A2T(tm);break;
}
case DBTYPE_DBTIMESTAMP : st=GetTime(product.GetValue(k)); break;
case DBTYPE_BOOL : GetBool(product.GetValue(k),&st); break;
case DBTYPE_R4 : GetFloat(product.GetValue(k),&st); break;
case DBTYPE_R8 : GetDouble(product.GetValue(k),&st); break;
case DBTYPE_I4 : GetLong(product.GetValue(k),&st); break;
case DBTYPE_I2 : GetSort(product.GetValue(k),&st); break;
case DBTYPE_UI1 : GetUInt(product.GetValue(k),&st); break;
}
/*if(k==1)
InsertItem(i,st);
else
SetItemText(i,k-1,st);*/
st.TrimRight();
sarr->SetAt(k-1,st);
}
ptr->Add(sarr);
i++;
product.FreeRecordMemory();
}while(product.MoveNext()==S_OK);
if(checkarr!=NULL)
checkarr->RemoveAll();
checkarr=new CWordArray;
checkarr->SetSize(i);
for(int m=0;m<i;m++)
checkarr-="">SetAt(m,fillcheckbox+1);
SetItemCountEx(i);
//char tt[50];
//AfxMessageBox(itoa(i,tt,10));
// SetItemCount(i);
Invalidate();
m_HeaderCtrl.listsize=i;
m_HeaderCtrl.checkarr=checkarr;
product.Close();
session.Close();
db.Close();
m_HeaderCtrl.ptr=ptr;
SetCursor(hcurSave);
}
|| ART OF LIVING ||
|
|
|
|
|
MY PROBLEM IS UNSOLVED
|| ART OF LIVING ||
|
|
|
|
|
shivditya wrote: ...but here it is giving error
What's the error?
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
-----> hr = db.Open(_T("SQLOLEDB.1"), dbinit);
if (FAILED(hr))
{AfxMessageBox("Failed To Connect Datasource"); }
My code is terminating on above line please help.
Actually senior programmer who developed code left for me to debug
help.
|| ART OF LIVING ||
|
|
|
|
|
You already mentioned this. I asked what the error is that you are receiving. Have you stepped into the Open() method to see what the problem might be?
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
We want to change the format and the attribute of the .wav
media file.How we can change this format.
Hi i am am fine now a day.
ok bye take care
|
|
|
|
|
You can pass the data through the audio compression manager.
|
|
|
|
|
Dear All,
In VC++, I don't know the function to get the full path of execute file.
I found AfxGetApp()->m_pszExeName, but it return execute name only.
Please help me to find this function.
Thanks alot.
inew
|
|
|
|
|
|
//->Get the application path for the database
CString app_path=GetModuleLoadPath();
Use this code u will get the file name in the
format as (D:\\PMR\\vc++\\conndevices.mdb)
enjoy
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
inew wrote: I found AfxGetApp()->m_pszExeName, but it return execute name only.
GetModuleFileName is only Function that can reterive file path for you..
http://alok.bizhat.com/site/tipandtrick.php?tiptype=2&tipid=55#55[^]
"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
|
|
|
|
|
When I click a tab page I want to be able to set a flag to indicate to the system that this page has been visited.
Something like OnGetFocus(). Does such a funciton or something similar exist?
Basically when a page gets focus it needs to ensure that any activity on its sister page has been saved before it can proceed, so the sister page will need to have set something
GER
Ger
|
|
|
|