|
ForNow wrote: It has a MainWindow CFrameWnd SDI or MDI?
ForNow wrote: Something about the way I build it I think That's kind of what I was leaning towards. If it was a dialog-based app, I was going to suggest to you to use the DS_NOFAILCREATE style.
"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
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
I think SDI as there is only 1 MainWindow and dialogs Modal and non-modal that come
in response to user selection
|
|
|
|
|
I want to get my program to change the database password (MS Access MDB file). I used to be able to do this using CDaoDatabase class, but that is now depreciated. I am in the process of changing my code to use CDatabase class, but can not figure out how to add some of the functionality that I had before.
Anybody know how to do this?
|
|
|
|
|
I am also looking into upgrading the MS Access version we are using and from what I finding is that a lot of things previously done using the DAO library should now be done using an SQL command.
The SQL command for changing the password is ALTER DATABASE PASSWORD[^] and can be executed on the database using the CDatabase::ExecuteSQL[^] function.
I have not tried this myself but it looks like it should work.
0100000101101110011001000111001011101001
|
|
|
|
|
You are right. Your SQL method works. Just one thing though. You have to have the database opened with exclusive access.
|
|
|
|
|
Hi all,
I am setIcon on button,its working fine on vista or windows 7 but on xp the icon on button not displayed only text is displayed.
HICON addIcon = (HICON)LoadImage(AfxGetApp()->m_hInstance, MAKEINTRESOURCE(IDI_ICON_HELP),IMAGE_ICON, 24, 24, LR_DEFAULTCOLOR);
m_btn.SetIcon(addIcon);
how can I display the icon on button in xp.
thanks in advance.
|
|
|
|
|
You can't. Although the documentation suggests otherwise, it does not work in Windows XP.
Use the best guess
|
|
|
|
|
how can I do this with any other method
|
|
|
|
|
|
Can you change the icon to bitmap and try CBitmapButton class to load it on the button?
You talk about Being HUMAN. I have it in my name
AnsHUMAN
|
|
|
|
|
Hi, I have a global variable, in one thread, it be updated with new value, another thread read the variable.
Now I want to synchronized the 2 thread, that means, when it is updating in thread 1, then thread 2 have to wait to read it.
I wonder what synchronization method to use.
|
|
|
|
|
Solved, I use a AutoResetEvent now
|
|
|
|
|
If you do this more than once during the lifetime of your worker thread then this isn't enough.
|
|
|
|
|
You must use a critical section.
|
|
|
|
|
yes, later I turn to critical section, user mode synchronization way
|
|
|
|
|
hey,
i m very new to programming . could u pls help me with this isssue,
i have to read abt 300 files of the format 4 letter word followed by 4 digits "." 2 digits and 1 alphabet
|
|
|
|
|
hmgm wrote: help me with this isssue
You would need to explain exactly how that is an issue to begin with.
|
|
|
|
|
oh look, another indian pretending to be an american so he can get his code written for him.
==============================
Nothing to say.
modified 26-Jun-13 7:21am.
|
|
|
|
|
|
So show us what you've put together so far (relevant code only), and explain in detail what problem(s) you are having. Anything short of that and you're barking up the wrong tree.
"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
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
Hello
I wanted to log the value of a variable at all times. In fact I want to log the value of the variable every time its value changes. I searched but I didn't find what I wanted. I appreciate your answers.
Thanks in advance
modified 26-Jun-13 5:34am.
|
|
|
|
|
I think I understand your problem;
You will definately have to log the variable value every time it changes - AFAIK there is no way of doing this 'automatically'.
The easiest way to log is probably to write the variable value into the stdout stream:
int main(void){
int myVariable = 0;
cout<<"myVariable has the value "<<myVariable;
myVariable = 345;
cout<<"myVariable has the value "<<myVariable;
return 0;
}
However, if you want to log the value outside of the IDE and are not developing a console app, you would need to write it to a file[^].
cheers,
Marco
|
|
|
|
|
Traditional "inline" logging always comes handy, but I was wondering maybe there could be a way to do it more precisely and automatically. Since there are many statements changing the value of the variable, this won't be a practical solution.
Thank you
|
|
|
|
|
ErfanNoury wrote: Since there are many statements changing the value of the variable, this won't be a practical solution.
I thought that you were thinking about something like that - The most important precondition is that you know when a variable value changes.
It is impossible to find this out when the variable of type char, int or any other native type.
The easiest way would probably be to encapsulate the variable with a setter where you can reckon that the value has changed:
int main(void){
int myVariable;
SetMyVariable(myVariable, 0);
SetMyVariable(myVariable, 345);
return 0;
}
void SetMyVariable(int variable, value){
variable = value;
cout<<"myVariable has the value "<< value;
return;
}
|
|
|
|
|
Yeah it's a good idea! I think it is better to wrap the variable into a class and through operator overloading I can log the value of the variable whenever it changes.
|
|
|
|