|
kflrei wrote: Can you tell me how to use graphics in a console application(Ex : Draw a line or something)!
Well you have to grab the device context of the Console Application. Then use normal SDK paint functions to paint to this device context.
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
kflrei wrote: !I can do that in turbo C but in VC++ I dont know any function or any thing to do that!Please help me!
you have to learn Windows Programming to DRAW in Windows World!
"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
|
|
|
|
|
Thank for your advice!I'll think about that!
(I only want to create some program that can run before windows start!Graphics only to make it easy to use!)
|
|
|
|
|
Hi,
I have 2 edit box in my dialog m_INDEX_FILE & m_WORD & a Search button.
on the OnSearch()i want to check if the user has entered data or not if the user has not entered data then i want to disply a message box for that i have used below code. but the problem is below code has no effect ...can u please tell what changes has to be made....
void CSearchDlg::OnSearch()
{
UpdateData(TRUE);
if (m_INDEX_FILE.GetLength() < 0 )
{
MessageBox("Select the Index File before searching !","Asis Search Engine",MB_OK | MB_ICONINFORMATION);
return;
}
if (m_WORD.GetLength() < 0 )
{
MessageBox("Enter the word to be searched","Asis Search Engine",MB_OK | MB_ICONINFORMATION);
return;
}
}
Regards,
Vinay Charan.
|
|
|
|
|
what is m_INDEX_FILE ?CString and m_WORD
whitesky
|
|
|
|
|
check equality too... zero length strings
m_INDEX_FILE.GetLength() <= 0
|
|
|
|
|
<br />
void CAnswerDlg::OnBnClickedMybutton()<br />
{<br />
CString str;<br />
m_Edit1.GetWindowText(str);<br />
if(str.IsEmpty())<br />
MessageBox("Empty");<br />
else<br />
MessageBox("not");<br />
}<br />
<br />
whitesky
|
|
|
|
|
Hi ,
Instead of UpdateData() try using GetWindowText():
void CSearchDlg::OnSearch()
{
CString szCaption;
m_INDEX_FILE.GetWindowText(szCaption);
if (!szCaption.IsEmpty())
MessageBox("Select the Index File before searching !","Asis Search Engine",MB_OK | MB_ICONINFORMATION);
return;
}
Regards,
Eli
|
|
|
|
|
Vinay wrote: I have 2 edit box in my dialog m_INDEX_FILE & m_WORD & a Search button.
on the OnSearch()i want to check if the user has entered data or not if the user has not entered data then i want to disply a message box for that i have used below code. but the problem is below code has no effect ...can u please tell what changes has to be made....
Try the following Code.
void CSearchDlg::OnSearch()
{
UpdateData(TRUE);
if (m_INDEX_FILE.IsEmpty())
{
MessageBox("Select the Index File before searching !","Asis Search Engine",MB_OK | MB_ICONINFORMATION);
return;
}
if (m_WORD.IsEmpty())
{
MessageBox("Enter the word to be searched","Asis Search Engine",MB_OK | MB_ICONINFORMATION);
return;
}
UpdateData(FALSE);
}
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Hello All,
I got the solution I used below code,its working fine.
void CSearchDlg::OnSearch()
{
UpdateData(TRUE);
if (m_INDEX_FILE.GetLength() <= 0 )
Thank you very much ......
|
|
|
|
|
vinaycool wrote: on the OnSearch()i want to check if the user has entered data or not if the user has not entered data then i want to disply a message box for that i have used below code. but the problem is below code has no effect ...can u please tell what changes has to be made..
what about handlling NM_CHNAGE MESSAGE, and setting flag accordingly
"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,
Im Delevoping a GUI in MFC.
I am facing the following problem in Output Window of my GUI.
I used stringray SECTabWnd class as my base class .My problem is ,When i click on the arrow head button on the scroll bar the text in the output window is getting scrolled but When I use the rectangle box(Thumb buttom) inside the scroll bar the thumb button ramins inactive(not getting scrolled as with the text).Can any body give me appropriate solution for this..Thanx.
Regards,
Hari
|
|
|
|
|
D.Srihari wrote: Can any body give me appropriate solution for this
Hey, we are not here for providing solutions ,but to show the way HOW to get solution .
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
void CChildView::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
{
// TODO: Add your message handler code here and/or call default
int p=GetScrollPos(SB_HORZ);
switch(nSBCode)
{
case SB_LINELEFT:
p-=1;
break;
case SB_LINERIGHT:
p+=1;
break;
case SB_PAGELEFT:
p-=5;
break;
case SB_PAGERIGHT:
p+=5;
break;
case SB_THUMBTRACK:
p=nPos;
break;
}
SetScrollPos(SB_HORZ,p);
CWnd ::OnHScroll(nSBCode, nPos, pScrollBar);
}
i think u might have forgot the highlighted code
E-Ramu
|
|
|
|
|
Hi All,
I want to Iterate a folder for specific files.I am given with only the filetype. Can anybody help me to achieve this.
Thanks in advance,
Poornima
|
|
|
|
|
Look up CFileFind .
A sample[^].
Or you can use
FindFirstFile --> Look up this in MSDN you will get two samples there.
FindNextFile
Nibu thomas
Software Developer
Programming Tips[^] My site[^]
|
|
|
|
|
atimpoo wrote: I want to Iterate a folder for specific files.I am given with only the filetype. Can anybody help me to achieve this.
try Modified version of CFileFind:-
http://www.codeproject.com/file/CFileFindEx.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
|
|
|
|
|
How we can create our own fonts without inherting from existing one?
SaRath
|
|
|
|
|
SaRath wrote: How we can create our own fonts without inherting from existing one?
Use CreateFont method
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
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
|
|
|
|