|
Hi
i used EM_SETCUEBANNER But Shows Charater Like Chineese My Text is "Enter .... " Could you help me how can improve this
|
|
|
|
|
Code?
"One man's wage rise is another man's price increase." - Harold Wilson
"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
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Set text inside your edit box like that:
L" Enter ..."
|
|
|
|
|
I want to read the memory private working set value of a process in a window machine, I don't know how to get it yet.
Please help me.
|
|
|
|
|
Could you explain why do you want (or need) it?
|
|
|
|
|
|
Even if you can access it, the chances of you being able to understand what the contents are is not very high.
|
|
|
|
|
|
In the below code snippet, why do we use '&' ? Is it because we're passing the reference of the member function?
BEGIN_MESSAGE_MAP(CMFCListViewDoc, CDocument)
ON_COMMAND(ID_MYCOMMAND, &CMFCListViewDoc::OnMycommand) END_MESSAGE_MAP()
Excuse me for this question. It's like I know and I don't know too .
|
|
|
|
|
|
I want to get a positive integer from the user.
|
|
|
|
|
"I want" is not a question.
"Five fruits and vegetables a day? What a joke!
Personally, after the third watermelon, I'm full."
|
|
|
|
|
There's only about a couple dozen different ways to do that, depending on the application type you're writing and the context in which you're getting this input.
Without a lot more detail about what you're doing, anything anyone replies with will be just guess work that will probably not work in your situation.
|
|
|
|
|
Do it!
Good luck!
|
|
|
|
|
You could start from
#include <stdio.h>
int main()
{
int i;
for (;;)
{
printf("please enter a positive integer\n");
if ( scanf("%d", &i) == 1 && i > 0 ) break;
}
printf("you entered %d, a good one\n", i);
return 0;
}
and then find a better way...
|
|
|
|
|
How can I access controls of one class from another class.
Example, Initially the button is hidden. I tried to make it visible from another class by doing like this
GetDlgItem(IDC_BUTTON)->ShowWindow(TRUE); inside a function.
But this doesn't seem to work. How can I make it visible from another class.
Thanks in advance.
|
|
|
|
|
Member 14575556 wrote: But this doesn't seem to work.
What exactly "doesn't seem to work"?
Could you show your code?
|
|
|
|
|
There are two button in Dialog 1.
BOOL CMyFirstDlg::OnInitDialog()
{
CDialogEx::OnInitDialog();
GetDlgItem(IDC_BUTTON)->ShowWindow(FALSE);
ShowWindow(SW_MINIMIZE);
return TRUE;
}
When I click one button i want to make the other button visible again.
void CMyFirstDlg::OnBnClickedButton()
{
CSecondDlg* Obj = new CSecondDlg();
Obj->DisplayButton();
}
Inside the DisplayButton function which is in another class there is
GetDlgItem(IDC_BUTTON)->ShowWindow(TRUE);
|
|
|
|
|
Member 14575556 wrote: When I click one button i want to make the other button visible again.
void CMyFirstDlg::OnBnClickedButton()
{
CSecondDlg* Obj = new CSecondDlg();
Obj->DisplayButton();
}
You created the object of CSecondDlg class but you have not created the window of this dialog!
|
|
|
|
|
Member 14575556 wrote: CSecondDlg* Obj = new CSecondDlg();
Obj->DisplayButton(); See here.
"One man's wage rise is another man's price increase." - Harold Wilson
"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
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Member 14575556 wrote: How can I access controls of one class from another class. Your question should probably be something like, "How can I access controls on one dialog from a separate dialog?" While it is not a good idea to do so directly (see "loose coupling"), a better way would be to send a message to the parent (the one that owns the control) dialog.
"One man's wage rise is another man's price increase." - Harold Wilson
"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
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Thank you for the pointing me to the right direction.
I'll read about "loose coupling" and to be honest I don't really get how to send message as of now, so I'll read about that too.
I've solve my problem in a naive way for now but i'll definitely follow your suggestions.
Thanks again.
|
|
|
|
|
I have created a simple dialog application where it can perform crud operations but how I did it was I open a connection an do some operations inside most of the buttons as I'm still starting out as a beginner(noob).
What will be a good approach to separate all the database related operations in another class? or keeping as it is, is it a good practice?
I would like some suggestions.
Thank you.
|
|
|
|
|
Since you're asking the question, you probably already know the answer.
The Master said, 'Am I indeed possessed of knowledge? I am not knowing. But if a mean person, who appears quite empty-like, ask anything of me, I set it forth from one end to the other, and exhaust it.'
― Confucian Analects
|
|
|
|
|
I did something similar here. It may not be exactly what you are after, but it does give you another perspective, which could ultimately get you to your goal.
"One man's wage rise is another man's price increase." - Harold Wilson
"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
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|