|
When I run it, I get the messagebox error and when the dialog appears, I donot have the fileds loaded?
I have the code where I have tried to load the field..
void CMgen1View::OnInitialUpdate()
{
m_pSet = &GetDocument()->m_mgen1Set;
CRecordView::OnInitialUpdate();
LoadListbox(); //CALLING HERE
}
void CMgen1View::LoadListbox()
{
CMgen1Doc* pDoc = GetDocument();
CListBox* pLB = (CListBox*) GetDlgItem(IDC_LIST1);
CSectionSet sect(&pDoc->m_database);
sect.Open();
while(!sect.IsEOF()) {
pLB->AddString(sect.m_CourseID);
sect.MoveNext();
}
}
|
|
|
|
|
The database query you're executing has probably a misspelled column name. Check the SQL text.
Tomasz Sowinski -- http://www.shooltz.com
What is "scratch" and why can everything be made from it?
|
|
|
|
|
too few paramaters expected one.
I'm sure that your SQL command is incorrect;P
Hung Son
A Vietnamese student
i-g.hypermart.net
dlhson2001@yahoo.com
|
|
|
|
|
I want a user to definitely input a value into a certain editbox. If GetWindowText is "" I SetFocus back to it. But this doesnt prevent them from still ignoring it and pressing another button "Done" that proceeds with the rest of the code Needless to say the code crashes if you dont have an input in the editbox. Short of checking to see if the editbox is filled (and setting focus back to it if not)in the BN_CLICKED event of the "Done" button is there a way of forcing the user to make an entry in the editbox?
Thanks,
ns
|
|
|
|
|
disable everything else until the edit control is filled ?
Conservative:
One who admires radicals centuries after they're dead.
-- Leo C. Rosten
|
|
|
|
|
Thats a great solution! Thnaks,
ns
|
|
|
|
|
I really should post my GUI helper class that makes it trivial to do this. Meanwhile, if you want to be really cool do the following:- In the resource editor, set the OK button's "disabled" property.
- Write a handler for the edit control's
EN_CHANGE notification.
- In the handler, get the edit control's text and enable the OK button only when the text is non-empty. Be sure to
TrimRight() and TrimLeft() the text after you get it. /ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Okay. I'l give that a shot as well. I did a less sophisticated version without the EN_CHANGE, but thats a cool idea like you said.
|
|
|
|
|
I'm emailing you a "preview" version of the GUI helper stuff I as talking about. Stay tuned...
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
The compiler doesnt like for a CButton m_Dismiss:
m_Dismiss.Enable(FALSE);
I cant find anything resembling this. I want to prevent them from clicking on the button, and I guess you cant disable a button. So I'm going to have to pop up a messagebox if they press the button and the editbox is empty, and set focus back to it. Am I being klugey here? Can you disable a button?
Thanks,
ns
|
|
|
|
|
ns wrote:
going to have to pop up a messagebox if they press the button and the editbox is empty, and set focus back to it. Am I being klugey here? Can you disable a button?
Sure.. Use m_Dismiss.EnableWindow(FALSE);
--------------------------------------------------
|
|
|
|
|
Check on Button Click and then prompt the user with an irritating Message asking that the data be entered. After the message box ok button is clicked, set focus to the control. If you us the disable button approach you are not informing the user that the one edit control must be populated. You will be amazed at the number of users who will just sit and stare at the screen wondering what to do if the button is disabled.
|
|
|
|
|
Hi I wrote(/writing) an app for my old highschool and need to know how to update the changes made in the database.
Let me explain, say I added some tables/relations to mydatabase.mbd, how do I let Visual C++ know?
|
|
|
|
|
If your program is affected by that changes, you must recode it
Hung Son
A Vietnamese student
i-g.hypermart.net
dlhson2001@yahoo.com
|
|
|
|
|
What if it is an upgrade?
New features added but everthing that was there before stayed.
Like I added some new tables/attributes.
|
|
|
|
|
I deleted the clw file and rebuilt the project but now I dont have a clw file at all, and theres no clas view information. Its not a read-only folder. Please help! I am so dependent on this pane for navigation...
Thanks,
ns
|
|
|
|
|
bring up the class wizard (ctrl-w). it will ask if you want it to rebuild your .clw file. say yes.
-c
Conservative:
One who admires radicals centuries after they're dead.
-- Leo C. Rosten
|
|
|
|
|
I did as you said. A clw file got built. I reloaded the project. It still doesnt want to load any class info!! Inciedntally this is the project that was crashing intermittently while exiting with the right cross system menu (dont know why yet - waiting for an answer to my thread on how to debug an empty WM_SYSCOMMAND handler!!). MAybe theres a connection?
Anyways the classes stubbornly wont load in the Class View pane....
|
|
|
|
|
ns wrote:
Inciedntally this is the project that was crashing intermittently while exiting with the right cross system menu (dont know why yet - waiting for an answer to my thread on how to debug an empty WM_SYSCOMMAND handler!!)
Close MsDEv and then try running the task manager. You probably have an instance of MSDEV.EXE running. End that process and start MsDev again and load the project..
--------------------------------------------------
|
|
|
|
|
The CLW file is rebuilt when you envoke ClassWizard. Just do a Ctrl+W and it should be rebuilt.
Roger Allen
Sonork 100.10016
He dodges, he weaves, and he never gets enough sleep. He is kind to small animals. - Chris maunder.
You can tell from his picture he doesn't sleep, and what kind of things does he weave?
|
|
|
|
|
The .clw file has nothing to do with the ClassView. You may have a corrupt .ncb file. Try deleting the .ncb file before you start VC++.
|
|
|
|
|
Remove the "Read Only" attribute from the .ncb file.
Did you put that file into source safe? It is not a good idea. When putting the files of a project into VSS, do it via VC++. If this is not the case, I apologize.
Michel
It is a lovely language, but it takes a very long time to say anything in it, because we do not say anything in it, unless it is worth taking a very long time to say, and to listen to.
- TreeBeard
|
|
|
|
|
I was wondering how one goes about debugging windows services? Any pointers to tutorials would be greatly appreciated.
|
|
|
|
|
For a start, check KB article Q98890.
Tomasz Sowinski -- http://www.shooltz.com
What is "scratch" and why can everything be made from it?
|
|
|
|
|
The biggest problem with a service is, that you can not launch it from inside VStudio debugger because it has to be launched by the SCM. However, it is still possible to debug it:
If the service already has been started, you can connect a debugger via the task manager (right click on the process name and choose "Debug") or from the Debug/Attach to Process menu in VStudio. You can then load the source files and set breakpoints into the source.
However, if you have to debug the service startup code the above technique does not work because the service stops running even before you had a chance to attach the debugger. In this case it is useful to put a hardcoded breakpoint into the code, e.g. at beginning of your ServiceMain(). A hardcoded breakpoint is an software interrupt 3:
#define BREAK __asm int 3
Just put the BREAK statement at an appropriate place in your code. If the service is started via SCM an "unhandled exception" message appears. Choose cancel to start the debugger and voila - execution is halted at the position of BREAK.
On thing to keep into mind, because it may be confusing: If the service runs under another user account or LocalSystem (as almost any service), the debugger (VStudio) instance is also started under this user account. Therefore it might be that your user defined settings (shortcuts, toolbars, keyboard mapping, etc.) are not available.
--
Daniel Lohmann
http://www.losoft.de
(Hey, this page is worth looking! You can find some free and handy NT tools there )
|
|
|
|