|
URLIs[^] might help?
The thing is that URL's don't necessarily really refer to files and directories like paths into a file-system. Depending on how the web server is configured, it could treat http://www.somedomain.com/imagefolder/ differently to http://www.somedomain.com/imagefolder .
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I have an application which, for various reasons cannot be converted to Unicode (so please don't suggest it) and which needs to display Russian characters.
Now I can quite easily display them by setting lfCharSet in LOGFONT if I do the drawing myself. And I can get a dialog to display Russian chars if I set it's language to Russian. What doesn't work is that while the static text controls display Cyrillic characters, the edit controls don't and if I set the value of a static control that doesn't display Cyrillic either.
I'm running on Vista.
|
|
|
|
|
Keith Worden wrote: I have an application which, for various reasons cannot be converted to Unicode (so please don't suggest it) and which needs to display Russian characters.
Every time someone said this, I asked "why?" and their answer was downright silly or wrong on so many levels. Each and every time, I convinced them to do a Unicode build. But, since you do not want it to be suggested, I am not going to suggest you that. But out of curiosity, may I know why can an Unicode build not be performed?
I am assuming that you already know the advantages of doing an Unicode build and still are discarding it. Therefore my curiosity. Seriously, Why?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
There are some library functions that don't have a unicode build and we don't want to spend money buying in new libraries.
I think it should be possible; the fonts contain the characters in different code pages so I would think someone has done it in the past.
|
|
|
|
|
Create a LOGFONT object and set the "lfCharSet = RUSSIAN_CHARSET;" Then create a CFont object ,after that use CreateFontIndirect with the LOGFONT object.Then set this font as EditField font.I think this will help.
LOGFONT lf
lf.lfHeight = 15;
strcpy(lf.lfFaceName, "Arial");
lf.lfCharSet = RUSSIAN_CHARSET;
CFont myFont;
myFont.CreateFontIndirect( & lf );
yourEditField.SetFont( myFont );
|
|
|
|
|
No, tried that, doesn't work. It seems that all controls ignore the charset unless the dialog language is set to Russian. When it IS set to Russian, static text controls are displayed using the Russian character set but edit fields are not. Updates to the text in static controls is not displayed using the Russian character set either.
|
|
|
|
|
Hi,
i try to switch between tabs in a tab control, i mean, if i have more tabs, how to "get back to tab Index 0" programmaticaly??
Let say the tab with index 3 have a current focus and is showed, by click on button i want to set tab with index 0 as current selected tab??
All my trys before are without any results, because, the controls from a previous showed tab are visible if i go with the mouse over the tab??
This is the simple code:
<br />
void CMyDialog::OnClickChacheTab()<br />
{ <br />
m_cTabAll.SetCurFocus(0);<br />
m_cTabAll.SetCurSel(0);<br />
m_cTabAll.RedrawWindow();<br />
}<br />
But this take no effects
Does any one can help me here??
Thanks
termal
|
|
|
|
|
It sounds like the SetCurSel IS working in that the tab is changing. It depends how you are displaying the controls "inside" the various tabs. Tabs are dumb - they don't know what you're displaying in each tab or even know that there's anything there. It's up to you to hide/display the "contents" of each tab. I usually use a dialog for the contents of each tab and then process the NM_CLICK message to show or hide each dialog.
|
|
|
|
|
Hi,
can you show me how to process NM_CLICK message with sample, this is my idea too but dont know how to do this
Do you mean this message that is from the msdn:
<br />
lResult = SendMessage(
(HWND) hWndControl,
(UINT) WM_NOTIFY,
(WPARAM) wParam,
(LPARAM) lParam
); <br />
regards
termal
|
|
|
|
|
Yes, WM_NOTIFY/NM_CLICK is sent when the tab selection is changed. You can set a function to pick it up by adding
ON_NOTIFY(NM_CLICK, <tab control="" id="">, <function name="">)
to the message map.
Where your function is defined as -
void <class>::<function name="">(NMHDR* pNMHdr, LRESULT* pResult)
|
|
|
|
|
termal wrote: m_cTabAll.SetCurSel(0);
That's the one that will work. I've used it in my code successfully. However, I don't think it will fire your TCN_SELCHANGE handler - you'll need to do that yourself.
The structure I've used in the past is something like this:
MyDlg::OnTabChangedHandler(arguments)
{
ChangeTab(tab.GetCurSel());
}
void MyDlg::ChangeTab(int tab)
{
Do stuff
tab.SetCurSel(tab);
}
MyDlg::SomeButtonClickedHandler()
{
ChangeTab(0);
}
so - move the 'on tab changed' actions to a separate routine that you can call from other places.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I suppose you must be creating dialogs on each of the tab pages to place your controls.
If that is the case then use the following code to programatically switch to a tab page: ( else just let me know more details. )
void CMyDialog::ShowPage( int nPage )
{
//you need to hide the current dialog.
m_dlgArray[m_tabCurrent]->ShowWindow(SW_HIDE);
//switch the tab.
m_cTabAll.SetCurFocus(nPage);
m_cTabAll.SetCurSel(nPage);
//show the new dialog.
m_dlgArray[nPage]->ShowWindow(SW_SHOW);
m_dlgArray[nPage]->SetFocus();
}
|
|
|
|
|
|
SHBrowseForFolder Function may help you...
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
For lack of a better response, your question really makes no sense. If you want to access a file in the current directory, use ".\\somefile" notation. If you want to access a file in the parent directory, use "..\\somefile" notation. If you want to access a file in a subdirectory of the current directory, use ".\\subdir\\somefile" notation.
If that's not what you're after, blame it on my lack of understanding your request.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi All
How can i check path is exits or not in system(pc)?plz give me Api or function name?
Thanks is advance
|
|
|
|
|
|
i got solution from msdn.
(_access(path,0)==0)
|
|
|
|
|
Hello Davitor,
You can use function - PathFileExists()[^].
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
You can use of FindFirstFile.
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Also look at GetFileAttributes() (Which I used just yesterday!)
(One problem with FileExists() is that it returns true for both files and directories.)
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
hi every one
I create a static library with visual c++ 6.0 App wizard.
I create a new generic class and declared my variables in its header file.
Then I initialized my variables in class constructor.
I want to use it in a new dialog based project, so I add related header file and write my library name in linker tab at project setting.
I create one object of this class in my function, But at the end of function when application exits from function occurs an exception.
I can't handle this exception.
Note : when I comment initialized this exception don’t happen.
Please help me
////////////////////////////////////////////////////////////////
// static library class (Test.h)
///////////////////////////////////////////////////////////////
class CTest
{
public:
CTest();
virtual ~CTest();
int m_i1;
int m_i2;
bool m_b1;
bool m_b2;
unsigned int m_ui1;
unsigned int m_ui2;
unsigned short m_us1;
unsigned short m_us2;
BYTE m_bte1;
BYTE m_bte2;
CString m_str1;
CString m_str2;
};</afx.h></windef.h>
#include "stdafx.h"
#include "Test.h"
CTest::CTest()
{
m_i1=0;
m_i2=0;
m_b1=true;
m_b2=true;
m_ui1=0;
m_ui2=0;
m_us1=1;
m_us2=1;
m_bte1=0;
m_bte2=0;
m_str1="";
m_str2="";
}
CTest::~CTest()
{
}
////////////////////////////////////////////////////////////////
// My dialog base application
///////////////////////////////////////////////////////////////
void CUseTestLibDlg::OnBinitlib()
{
CTest *pcTest=new CTest();
delete pcTest;
pcTest=NULL;
}
void CUseTestLibDlg::OnBinitlib2()
{
CTest pcTest;
}
modified on Wednesday, April 29, 2009 6:26 AM
|
|
|
|
|
samira forooghi wrote: pcTest=NULL;
delete pcTest;
I would invert the order of the statements...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
thanks for u
i correct it ,but its not my problem.
|
|
|
|
|
Looks like good advice...
Steve
|
|
|
|