|
i guess he wants to create own font
whitesky
|
|
|
|
|
A_Laxman wrote: Use CreateFont method
Create font will return handle of font which is currently present in system!
"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 Friends,
Currently i am provinding German Langauge support to my application.
I have edited the .rc file and developed a resource only dll from it.
I almost finished doing it.
The problem i am facing is,whenever i wanna save a file or Open a file.The default CFileDialog that is getting opened is English.But I want a German dialog (CFileDialog) to be opened.
Can anyone help me out fixing this problem.
Thanks in Advance.
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
In most cases you don't have to worry about it - just like text buttons in Message boxes, this dialog depends on windows version. And users of your German version will use German windows, so they will see it in German. Still you can change the texts, but not with rc file - by using custom template extension for FileOpen dialog, and then directly iterating and translating controls on main dialog.
Igor Green
http://www.grigsoft.com/ - files and folders comparison tools
|
|
|
|
|
Thanks for u r reply Green.
Can i mail u, incase if i get some other problem related to Multilingual Support.
Thanks for the help.
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
Sure, but do not expect too much
support[]grigsoft.com
Igor Green
http://www.grigsoft.com/ - files and folders comparison tools
|
|
|
|
|
Hi,
i get some errors if i build cximage with visual c 8:
<br />
c:\cximage\cximage\ximatran.cpp(183) : error C2666: 'div' : 2 overloads have similar conversions<br />
c:\programme\microsoft visual studio 8\vc\include\stdlib.h(508): could be 'ldiv_t div(long,long)'<br />
c:\programme\microsoft visual studio 8\vc\include\stdlib.h(482): or 'div_t div(int,int)'<br />
while trying to match the argument list '(long, int)'<br />
c:\cximage\cximage\ximatran.cpp(301) : error C2666: 'div' : 2 overloads have similar conversions<br />
c:\programme\microsoft visual studio 8\vc\include\stdlib.h(508): could be 'ldiv_t div(long,long)'<br />
c:\programme\microsoft visual studio 8\vc\include\stdlib.h(482): or 'div_t div(int,int)'<br />
while trying to match the argument list '(long, int)'<br />
ximawbmp.cpp<br />
<br />
div_r = div(y + dlineup, 8);<br />
div_r = div(y, 8);<br />
<br />
<br />
c:\cximage\demo\bcmenu.cpp(2603) : error C2065: 'i' : undeclared identifier<br />
c:\cximage\demo\bcmenu.cpp(2604) : error C2227: left of '->nID' must point to class/struct/union/generic type<br />
c:\cximage\demo\bcmenu.cpp(2667) : error C2227: left of '->nID' must point to class/struct/union/generic type<br />
ChildFrm.cpp<br />
<br />
for(int i=num-1;i>=0;--i)pSubMenu->DeleteMenu(i,MF_BYPOSITION);<br />
for(i=m_MenuList.GetUpperBound();i>=0;i--){<br />
if(m_MenuList[i]->nID==(UINT)pSubMenu->m_hMenu){<br />
<br />
c:\cximage\demo\quantize.cpp(128) : error C2065: 'i' : undeclared identifier<br />
c:\cximage\demo\quantize.cpp(139) : error C2227: left of '->nRedSum' must point to class/struct/union/generic type<br />
c:\cximage\demo\quantize.cpp(140) : error C2227: left of '->nGreenSum' must point to class/struct/union/generic type<br />
c:\cximage\demo\quantize.cpp(141) : error C2227: left of '->nBlueSum' must point to class/struct/union/generic type<br />
c:\cximage\demo\quantize.cpp(142) : error C2227: left of '->nAlphaSum' must point to class/struct/union/generic type<br />
c:\cximage\demo\quantize.cpp(143) : error C2227: left of '->nPixelCount' must point to class/struct/union/generic type<br />
TwainCpp.cpp<br />
<br />
for (int i=nColorBits - 1; (i>0) && (pReducibleNodes[i] == NULL); i--);<br />
<br />
NODE* pNode = pReducibleNodes[i];<br />
pReducibleNodes[i] = pNode->pNext;<br />
<br />
UINT nRedSum = 0;<br />
UINT nGreenSum = 0;<br />
UINT nBlueSum = 0;<br />
UINT nAlphaSum = 0;<br />
UINT nChildren = 0;<br />
<br />
for (i=0; i<8; i++) {<br />
if (pNode->pChild[i] != NULL) {<br />
nRedSum += pNode->pChild[i]->nRedSum;<br />
nGreenSum += pNode->pChild[i]->nGreenSum;<br />
nBlueSum += pNode->pChild[i]->nBlueSum;<br />
nAlphaSum += pNode->pChild[i]->nAlphaSum;<br />
pNode->nPixelCount += pNode->pChild[i]->nPixelCount;<br />
free(pNode->pChild[i]);<br />
pNode->pChild[i] = NULL;<br />
nChildren++;<br />
}<br />
}<br />
<br />
pNode->bIsLeaf = TRUE;<br />
pNode->nRedSum = nRedSum;<br />
pNode->nGreenSum = nGreenSum;<br />
pNode->nBlueSum = nBlueSum;<br />
pNode->nAlphaSum = nAlphaSum;<br />
*pLeafCount -= (nChildren - 1);<br />
|
|
|
|
|
1) problem with your diff function. Solution cast the parameters to int or long, compiler seems to be confused between using one with int parameters or long parameters, since you call it with a mix (one param is int the other long).
2) the counter in your for loop has local scope in the for-loop alone now, so you need to redefine it
3) the -> must point to structure etc... Perhaps you need to cast... Did you define these as void pointers perhaps?
|
|
|
|
|
Hi,
I have 2 edit box in my dialog, word and selecting a file ..
first i have to enter the word then i have to select the file name
in the file name i have used the below code, once i select the file, text which i have entered in the word edit box is getting erased, is there any way that after selecting file text in the word edit box does not get erased ..
-----------------------------------------------------
void CSearchDlg::OnOpenIndex()
{
CString fname;
CFileDialog m_ldFile(TRUE);
if (m_ldFile.DoModal() == IDOK)
{
fname = m_ldFile.GetPathName();
m_INDEX_FILE=fname;
UpdateData(FALSE);
}
}
---------------------------------------------------
Using the above code we can open all types of files, i want to know how we can open only with file with specfic extenshion.
Regards,
Vinay Charan.
|
|
|
|
|
try this
void CSearchDlg::OnOpenIndex()
{
UpdateData();
CString fname;
CFileDialog m_ldFile(TRUE);
if (m_ldFile.DoModal() == IDOK)
{
fname = m_ldFile.GetPathName();
m_INDEX_FILE=fname;
UpdateData(FALSE);
}
nave
|
|
|
|
|
|
Vinay wrote: UpdateData(FALSE);
Instead of FALSE use TRUE like
UpdateData(TRUE);
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Hi LaXman,
if i use the UpdateData(TRUE);
the nthe value is not getting displayed....
|
|
|
|
|
vinaycool wrote: if i use the UpdateData(TRUE);
the nthe value is not getting displayed....
Why don't you use SetWindowText and GetWindowText for such simple manipulations.
As PJ said UpdateData should be avoided for complex manipulations. Of course you can use it for one touch updations. Except for that it shouldn't be used.
The name UpdateData itself is confusion. I personally get confused as to what's happening. I am not sure whether it's updating to the variable or to the control.
Nibu thomas
Software Developer
Programming Tips[^]
|
|
|
|
|
Hi Nibu thomas,
I used m_ctrlINDEX_FILE.SetWindowText(fname); this is working fine...
Thanks a lot .....
|
|
|
|
|
vinaycool wrote: Hi Nibu thomas,
I used m_ctrlINDEX_FILE.SetWindowText(fname); this is working fine...
Thanks a lot
You're welcome.
Nibu thomas
Software Developer
Programming Tips[^] My site[^]
|
|
|
|
|
Nibu wrote: The name UpdateData itself is confusion. I personally get confused as to what's happening. I am not sure whether it's updating to the variable or to the control.
Hey Nibu,
don't get confused , let me clear the working of UpdateData()
UpdateData(TRUE) Initialises all the control variables by retriving the contents from dialog controls
UpdateData(FALSE) Initialises all the dialog controls by retriving the contents from Control variables.
Hope you will understand how UpdateData works.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
|
hello all ...
how can i run external app when pressing a button or click on menu ...
iam work in win32 and i need to run flash file
thank you
|
|
|
|
|
F.Smadi wrote:
how can i run external app when pressing a button or click on menu ...
iam work in win32 and i need to run flash file
Try using ShellExecute or CreateProcess API
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
like this:
::ShellExecute(NULL, "open", "iexplore.exe", "your_url.htm", NULL, NULL, SW_SHOWNORMAL);
whitesky
|
|
|
|
|
Look up ShellExecute , ShellExecuteEx , CreateProcess .
Nibu thomas
Software Developer
Programming Tips[^]
|
|
|
|
|
Hi,
U can try this ..
WinExec("pbrush.exe", SW_SHOW);
|
|
|
|
|
F.Smadi wrote: how can i run external app when pressing a button or click on menu ...iam work in win32 and i need to run flash file thank you
try this article:-
http://www.codeproject.com/system/newbiespawn.asp[^]
"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
|
|
|
|
|
please see MSDN:
This function is provided only for compatibility with 16-bit Windows.
Applications should use the CreateProcess function.
whitesky
|
|
|
|