|
|
hi,
i like to have to code to detect the client browser and according to that i have alter my tag.
eg
if ie then
if netscape then
if mozilla then
div align='left'
i need javascript code. anyone help me?
|
|
|
|
|
cnsathya wrote:
i need javascript code. anyone help me?
Perhaps you'd get better results at the Web Development forum...
This is Visual C++. Web Development is this way --->> (third door down the center corridor)
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
Hi!
I found some APIs in MSDN for embeding Fonts like TTEmbedFontEx, TTGetEmbeddedFontInfo etc.
As per the documentation it says
Requirements
Header: Declared in T2embapi.h.
DLL: Part of T2embed.dll
Windows 2000/XP
Windows 98/98 SE/Me
but I can not find T2embapi.h any where, I have got all SDK's and DDk's installed.
Has any one ever used these Api's? I am not sure if these will serve my purpose.
Actually I want to embed font in the PS file from PS printer driver so that it is printed fine on the printer.
If anybody has got any idea how to do so pls. let me know
Thanks
Naveen
|
|
|
|
|
|
Hello friends,
I am saving telephone numbers in a combo box control. I want to delete the current selection in the combo box. DeleteString deletes item at specified index.
How do i go about this?
thank you
pallavi
|
|
|
|
|
mpallavi wrote:
I want to delete the current selection in the combo box. DeleteString deletes item at specified index.
If you are using Single Selection combo Box :-
int nIndex = pmyComboBox.GetCurSel();
if ((nIndex != LB_ERR))
{
pmyComoBox.DeleteString(nIndex);
}
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
mpallavi wrote:
I want to delete the current selection in the combo box. DeleteString deletes item at specified index.
How do i go about this?
int nCurrent = combo.GetCurSel();
if (nCurrent != CB_ERR)
combo.DeleteString(nCurrent);
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
If you want to delete the item from the drop list:
<br />
int nCurSel = m_myComboBox.GetCurSel();<br />
if (nCurSel != CB_ERR)<br />
m_myComboBox.DeleteString(nCurSel);<br />
If you just want to clear the text (if combo is not a drop list):
<br />
m_myComboBox.SetWindowText(_T(""));<br />
Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!
|
|
|
|
|
Thank you all..
Can anyone tell me how do i get the data associated with the current selection .. i mean the value of the current selection.
thanx
pallavi
|
|
|
|
|
mpallavi wrote:
Can anyone tell me how do i get the data associated with the current selection ..
See it this Help CComboBox::GetLBText
Here is small code to help :-
int nIndex=m_combo.GetCurSel();
if(nIndex==LB_ERR)
{
CString str;
m_combo.GetLBText(nIndex,str);
}
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
ThatsAlok wrote:
if(nIndex==LB_ERR)
I think you mean if(nIndex!=LB_ERR)
Technically, in this case CB_ERR should be used instead of LB_ERR , but in practice both are defined as -1
Hey, this peer programming thing does work!
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
Jose Lamas Rios wrote:
I think you mean if(nIndex!=LB_ERR)
Yeap, Sorry for Silly Mistake
Jose Lamas Rios wrote:
Hey, this peer programming thing does work!
Yeap, thats why we are here
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Thanx.. its working. I have still more problems with ComboBox..
I am saving all these telephone numbers in a text file.. If you remember, few days back i was coding for persistent combo box. Its working perfactly fine but the problem is when i delete a number.
I am creating a temp file .. i want to write all the values in this file except for the current selection..
how do i go about this?
pallavi
|
|
|
|
|
mpallavi wrote:
I am creating a temp file .. i want to write all the values in this file except for the current selection..
how do i go about this?
Let this variable m_arr of type CStringArray contain all the phone number present in combo box.
<font color=#008000>
CString szPhoneNo;
int nIndex=m_combo.GetCurSel();
if(nIndex!=CB_ERR) <font color=#008000>
{
m_combo.GetLBText(nIndex,szPhoneNo);
}
else
<font color=#008000>
return;
<font color=#008000>
CString szTempPath;
GetTempPath(szTempPath.GetBuffer(MAX_PATH),MAX_PATH);
<font color=#008000>
szTempPath.ReleaseBuffer();
<font color=#008000>
szTempPath+=CString("temp.txt");
<font color=#008000>
CStdioFile m_File;
if(m_File.Open(szTempPath,CFile::modeCreate|CFile:modeWrite))
{
for(int i=0;i<m_arr.GetUpperBound();i++)
{
<font color=#008000>
if(m_arr.GetAt(i)!=szPhoneNo)
m_File.WriteString(m_arr.GetAt(i));
}
m_File.Close();
}
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
ThatsAlok wrote:
GetTempPath(szTempPath.GetBuffer(MAX_PATH),MAX_PATH);
I am getting the following error at above line:
'GetTempPathA' : cannot convert parameter 1 from 'char *' to 'unsigned long'
Please help.
|
|
|
|
|
mpallavi wrote:
GetTempPath(szTempPath.GetBuffer(MAX_PATH),MAX_PATH);
Sorry, Just Exchange Argument
i.e.
GetTempPath(MAX_PATH,szTempPath.GetBuffer(MAX_PATH));
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Hi Alok..
temp file is getting created but its empty.. i am trying to find what went wrong..
regards
pallavi
|
|
|
|
|
oops..
My array of strings is empty.. I used
m_arr.Add(m_strPhoneNum);
to add phone numbers in the array.
I think the syntax is wrong..
pallavi.
|
|
|
|
|
mpallavi wrote:
m_arr.Add(m_strPhoneNum);
what is m_arr , and how are you iterating throught it when writing to the file?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
mpallavi wrote:
to add phone numbers in the array.
I think the syntax is wrong..
Hi Pal,
First Add all the member of ComboBox to CStringArray or directly Enumerate them, When you are entering data in temporary File.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Hi all
can anybody help me out with a sample,that can store some GDI calls and later play it back, i came to know that metafile device context can be used for this purpose
thanks for your help
regads
pradish
|
|
|
|
|
|
2 Jose Lamas Rios
thanks for ansering my mail,but i need a sample that makes use of Win32 GDI API's only. no MFC.
regards
pradish
|
|
|
|
|
pradish wrote:
thanks for ansering my mail,but i need a sample that makes use of Win32 GDI API's only. no MFC.
That was the first link. It's about using metafiles with Win32 APIs (No MFC) and includes a downloadable sample...
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|