|
i want to save short date
but it dont save that i enterend, it saves default date which is 1970-01-01 if i use 'getyear' o it save todays date ir i use 'gettoday', but i need to save entered date, and it even saves time in the database but i in both places selected short date
|
|
|
|
|
Unfortunately, without seeing the code, I can only guess you are doing something wrong
Mark
|
|
|
|
|
Without seeing any relevant code, how are we supposed to know what you are doing wrong?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
well i found some text which maybe can help me, so i gona try this and if this dont work i try to provide my code somewhere
|
|
|
|
|
we found a defect do to a typo today check out this code
#include <iostream>
using namespace std;
class Test
{
public:
string m_sUserID;
string m_sUserId;
};
int main(int argc, char ** argv)
{
Test A;
A.m_sUserId = "lower";
A.m_sUserID = "Upper";
printf("m_sUserId : %s m_sUserID : %s " , A.m_sUserId.c_str(),A.m_sUserID.c_str());
return 0;
}
if you use intelisence you will notice that intelisence will only show you two variable associated with class test m_sUserId and m_s if you break the program before it exits and use the hover over feature or the watch window the debugger thinks the members have the same value.
There is no need to comment that it is bad form to mix case in variable names it was an accident.
a programmer traped in a thugs body
|
|
|
|
|
Yeah - reproduced it. The bug's in the debugger (both in the visualizer tip as well as in the watch window).
|
|
|
|
|
ky_rerun wrote: if you use intelisence you will notice that intelisence will only show you two variable associated with class test m_sUserId and m_sUserID if you break the program before it exits and use the hover over feature or the watch window the debugger thinks the members have the same value.
Yup, a defect, I can reproduce it too.
|
|
|
|
|
Hello,
I'm receiving some linking errors while attempting to build my Visual C++ program. Here is an example of one such error: "nafxcw.lib(apphelp.obj) : error LNK2001: unresolved external symbol __mbctype". Any help is appreciated.
Mike
|
|
|
|
|
See Q166504 maybe its some helpful for you
|
|
|
|
|
After viewing http://support.microsoft.com/default.aspx?scid=kb;en-us;166504, I checked my project settings. In
Project, Settings, General, Microsoft Foundation Classes: "Use MFC in a Static Library"
Project, Settings, C/C++, Category, Code Generation, Use run-time library: "Multithreaded"
Project, Settings, Link, Input, Ignore Libraries: "libcmt"
Perhaps I'm missing something.
Mike
|
|
|
|
|
mla154 wrote: Use run-time library: "Multithreaded"
Try Multithreaded DLL, see if that solves the problem.
|
|
|
|
|
Multithreaded DLL gives me a different set of linker errors:
--------------------Configuration: Icdm - Win32 Release Windows 95--------------------
Linking...
nafxcw.lib(apphelp.obj) : error LNK2001: unresolved external symbol __mbctype
nafxcw.lib(timecore.obj) : error LNK2001: unresolved external symbol __mbctype
nafxcw.lib(dcprev.obj) : error LNK2001: unresolved external symbol __mbctype
nafxcw.lib(filelist.obj) : error LNK2001: unresolved external symbol __mbctype
nafxcw.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argv
nafxcw.lib(appcore.obj) : error LNK2001: unresolved external symbol ___argc
D:\code\Visual C++ Projects\!Work\ICDM - Mike L\HC-Release\Icdm.exe : fatal error LNK1120: 3 unresolved externals
Error executing link.exe.
Icdm.exe - 7 error(s), 0 warning(s)
|
|
|
|
|
See here[^] I think its helpful for you
|
|
|
|
|
How would ichange the color of text written in an edit box?
I use the following to write the text
CEdit m_mycontrol
m_mycontrol.SetWindowText("my control text");
If it is possible to change the color of the text, how would i do that using the above?
|
|
|
|
|
|
Here's a way...
Add a handler in the parent window/dialog for the WM_CTLCOLOR
message.
For example, to set the text of an edit control with an ID of
"IDC_MYEDITCONTROL" to light blue:
<br />
HBRUSH MyDialogOrWindowClass::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)<br />
{<br />
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);<br />
<br />
if (pWnd->GetDlgCtrlID() == IDC_MYEDITCONTROL)<br />
pDC->SetTextColor(RGB(0, 0, 255)); <br />
<br />
return hbr;<br />
}<br />
Mark
|
|
|
|
|
|
Im working with MFC in VC6.0
I have a button which sets a edit box some stuff, then waits, then sets it again and waits three times:
on click:
set box "3"
sleep 1000
set box "2"
sleep 1000
set box "2"
sleep 1000
//stuff
set box "done with stuff"
it counts down, but then ignores setting the box... it only sets the last one, done with stuff...
ive tried with SetDlgItemText, UpdateData(FALSE) [and the rest of that one] and manualy hiding/showing dlg items.. it allways just skips the ones withing waits...
why/how can i fix it?
thanks!
/Johannes
Johannes
|
|
|
|
|
code snippet
"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
Support CRY- Child Relief And you
|
|
|
|
|
Johannes,
Calling Sleep() in your UI thread prohibits the Windows messages
required (WM_PAINT) to update the control from being processed.
Try this:
on click:
set box "3"
box.Invalidate()
box.UpdateWindow()
sleep 1000
set box "2"
box.Invalidate()
box.UpdateWindow()
sleep 1000
set box "2"
box.Invalidate()
box.UpdateWindow()
sleep 1000
Keep in mind, calling Sleep() like this effectively freezes your
user interface for 3 seconds...not always the desired effect
Hope this helps,
Mark
|
|
|
|
|
Yea it kinda frezes but thats OK,
Im not exactly sure how thoes functions are to be used, the dlg box is called status, and the variable to it (add member variable) is m_status, so normaly i use:
m_status = "Two!";
UpdateData(FALSE);
To set it to "Two!". But how would i use th ones you said?
ive got loads to learn..
thanks!!
/Johannes
|
|
|
|
|
m_status = "Two!";
UpdateData(FALSE);
That's fine. UpdateData() will set the text of the control.
But still, if you are going to sleep, you need to make sure the
text is redrawn on the screen beforehand, otherwise it won't be repainted
until after the Sleep()s.
Mark
|
|
|
|
|
How do i make it repaint?
thanks!
/Johannes
|
|
|
|
|
Force it to repaint immediately (after setting the new text)
by using these two functions:
Invalidate();
UpdateWindow();
Mark
|
|
|
|
|
Works perfectly!
thanks a million!
/Johannes
|
|
|
|