|
yes, you can, even if this is quite dangerous to.
you can always use the keyboard to size pxl by pxl your controls, otherwise do this :
1. close VisualStudio
2. open the .rc file of you project in a WYSIWYG editor (notepad is sufficient).
3. find the id of the control to edit (e.g. IDC_MY_BUTTON)
4. set its position/size in the following order :
- left border position
- up border position
- width
- height
cheers,
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20] | soon : [VisualCalc 3.0]
|
|
|
|
|
No, units in the RC file are in DLU ( dialog (un)logical unit ) and will be converted to pixel when displayed; will scale the dialog according to the DPI and font scaling ( big font vs. normal font ) ( unless I'm really mistaken )
toxcct wrote: in a WYSIWYG editor (notepad is sufficient).
me think notepad is not a WISIWYG editor ...
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Maximilien wrote: me think notepad is not a WISIWYG editor ...
please explain...
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20] | soon : [VisualCalc 3.0]
|
|
|
|
|
MSWord is a wisiwyg editor, what you see on the screen is (normally) really what you get when you print it out.
This is not the case for notepad, since you do not know how what you write will come out when you print it (additional footers and headers, page nums and so). You can turn the printer settings in landscape mode while nothing will change on your screen when using notepad.
I think what you meant is a plain text editor, not a wysiwyg.
~RaGE();
|
|
|
|
|
word is not a wysiwyg 'cause all the formatting stuff modify the rendering of the file. create a word file, then open it into another editor (ok, you don't want notepad, so let's say edit or vi) and you'll see some horrible character... with word, What You See Is NOT What You Get !!!
now, i'dd like to know (as notepad is supposed not to be WYSIWYG) where are those hidden bytes which make it not a plain text editor...
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20] | soon : [VisualCalc 3.0]
|
|
|
|
|
toxcct wrote: word is not a wysiwyg 'cause all the formatting stuff modify the rendering of the file
I think your definition of wysiwg is wrong : it describes a screen to printer behaviour, not screen to file content behaviour. As Maximilien explained, you expect the formatting to be rendered directly on the screen, but you do not care about the file content.
toxcct wrote: ok, you don't want notepad, so let's say edit or vi
I do not think I said anything against notepad
toxcct wrote: with word, What You See Is NOT What You Get !!!
In the file, definitely not, on the printer, it is indeed. So word is wysiwyg.
toxcct wrote: now, i'dd like to know (as notepad is supposed not to be WYSIWYG) where are those hidden bytes which make it not a plain text editor...
Here you mix up two things which are completely different: wysiwig and plain text editor.
Notepad is a plain text editor : no formatting, no special rendering on the screen, one char you type is saved as one or two chars in the file.
Notepad is not wysiwig : printing an HTML file opened with notepad does not render it, as would when printed with FrontPage
Word is not a plain text editor : you have formatting, you can insert a lot of objects (tables and so), and you save far more in a .doc file as the few chars you have typed (this is what you call horrible character)
Word is wysiwig : print a word document, and it comes out exactely as it is displayed on your screen.
~RaGE();
|
|
|
|
|
ok, my mistake, i thought that WYSIWYG was talking about file content...
so replace it in my first reply in this thread with "plain text editor"
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20] | soon : [VisualCalc 3.0]
|
|
|
|
|
|
|
a WYSIWYG editor would be something like Word, FrontPage ( in norma view ), where you see mostly graphical changes directly on the screen, and not only when rendered either on paper or on a web page.
for example, "coding" HTML in notepad does not show you the end-result IN the editor; like FrontPage do; so it's not "What You See Is What You Get"
in your example, notepad, if it were a WYSIWYG you display the RC file the same way the resource editor display it to you, even there, it's not a fully WYSIWYG editor because the result will be different than what you expect.
the accronym WYSIWYG is/was really usefull for Page Layout software ( quark, pagemaker, ... ) where the user would place object on the virtual page, and when printed you look the same as on the screen.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
i am using two class
i want to update the CEdit of dlg form different clas
xyz
{
//non MFC Class
extren CEdit *ed
SetEditText()
{
ed->SetDlgItemText(IDC_EDIt1,"Waiting for Call");
ed->UpdateData(FALSE);
}
----
---
--
};
dlg
{
//MFC class
CEdit *ed;
//m_ed is member variable IDCEDIT1 control
oninitdlg()
{
ed=*m_ed;
}
onbutton1()
{
x->setEditText() // x is an instance of xyz
}
----
---
--
};
and also i tried using
((CIVRTraficInfoSystemApp *)AfxGetApp())->m_pMainWnd->SetDlgItemText(IDC_EDIT1,"Waiting for Call");
and
in xyz class
CIVRTraficInfoSystemDlg *dlg;
dlg=(CIVRTraficInfoSystemDlg *)::GetActiveWindow();
// dlg->m_ed2.SetWindowText(IDC_EDIT2,"Waiting for Call");
//dlg->UpdateData(FALSE);
// dlg->UpdateDialogControls(((CIVRTraficInfoSystemApp *)AfxGetApp())->m_pMainWnd,TRUE)
//dlg->UpdateWindow();
and i also tried the following
from xyz class
SetDlgItemText (AfxGetApp ()->m_pMainWnd->m_hWnd, IDC_EDIT2, "some thing");
//delete [] lpBuffer;
UpdateWindow (GetDlgItem (AfxGetApp ()->m_pMainWnd->m_hWnd, IDC_EDIT2));
but i am not able to update the text in the IDC_EDIT1
pls suggest me some idea
Thanks & Regrads
kattavictor
|
|
|
|
|
You can use:
class CXyz<br />
{<br />
public:<br />
CEdit* m_pEdit;<br />
void SetTheText()<br />
{<br />
m_pEdit->SetWindowText("Hello");
}<br />
<br />
};
//here, m_Xyz is a member variable of CMyDialog, an object of CXyz.
void CMyDialog::OnButton1()<br />
{<br />
m_Xyz.m_pEdit = &m_Edit;
m_Xyz.SetTheText();<br />
<br />
}
this is this.
|
|
|
|
|
Dear Khan
Thanks u very much for ur reply
int CLSINet::WaitForCall()
{
//here i would like to set the CEdit text, ie.. non MFC Class
//because the control is not going to return back immd.
//to the MFC Class
int rc;
module = "CLSINet::WaitForCall";
LogEntry("Enter", LOG_OBJFUNCTION);
ed->SetWindowText("Waiting For incomming call");
---
---
--
}
pls given me an idea for this
Thanks & Regrads
kattavictor
|
|
|
|
|
WaitForCall() will be called form another non MFC class
not form the dlg
kattavictor
|
|
|
|
|
I am not sure what you are trying to acheive, but I think it is this:
To set the m_pEdit to the actual variable's address, you can do it when creating the control. Like:
class CMyDialog : public CDialog<br />
{<br />
public:<br />
CXyz m_Xyz;<br />
...<br />
...<br />
};<br />
<br />
CMyDialog::OnInitDialog()<br />
{<br />
m_Xyz.m_pEdit = &m_Edit;
}
Now the pointer is set, and there is no need to set it again. Now any function in CXyz can set the edit's text, like:
void CXyz::SetNewText()<br />
{<br />
m_pEdit->SetWindowText("asdf");<br />
}
Your question is not clear, so:
Are you using multi-threading? If no, then learn some multi-threading, and use threads, so the program won't freeze while it is processing.
this is this.
|
|
|
|
|
thanks for u reply
ya i understood
i am not useing multi threading
it is compiled with our errors
but CEdit box is not update with text
i dont know why ?
Thanks & Regrads
kattavictor
|
|
|
|
|
You can put breakpoints in the code and watch the code set the text in the edit. While stepping through the code, you can check if the edit's pointer is valid etc.
this is this.
|
|
|
|
|
ya i did that also
it is getting hangged
before OnButton()
if i remove CEdit form the class and inil. the pointer
everything is ok except setting the CEdit text(it is not hanged)
i dont know why
Thanks & Regrads
kattavictor
|
|
|
|
|
Hi
I need to get the current logged in USERNAME ID and also the Outlook profile user name. How can i get it
Regards
Anniyan
|
|
|
|
|
cuteanniyan wrote: I need to get the current logged in USERNAME ID
Is GetUserName() api is of any help!
"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
|
|
|
|
|
Thanks Alok...It worked out!!!!!11
|
|
|
|
|
i have test the program winmacro(http://www.codeproject.com/tools/winmacro.asp) but i find sometimes it does not work stably in windows xp platform. SomeTime is stops in playing back , but when i move my mouse manually it resumes to go.Can anyone tell the reson?
|
|
|
|
|
I have a problem using CDateTimeCtrl. When I choose a date using the DatePicker, the OnChange function associated with the CDateTimeCtrl was called twice, but if I enter a date using the keyboard it was only called once. I hope you could help me on my problem.
|
|
|
|
|
hi all..
i have used memory dc for drawing some images in VC++..
can any one tell me wat are all the major advantages of Memory DC plz..
Thanks,
vj
vj
|
|
|
|
|
By using a Memory DC you can prepare the image in memory and then in your WM_PAINT handler you can use BitBlt for a fast copy to the Screen DC. This way you avoid the anoying flicker when working with complex drawings.
|
|
|
|