|
Can you tell me about DDX and DDV more details.
I have just try the Aqueel's suggestion. I deleted all member variable and function of the Component in .h file, compile and run, everything is OK. But when i delete the component in Resource View Window, i met an Assertion and when i chose Retry to debug, the code have to debug is:
if (hWndCtrl == NULL)
{
TRACE1("Error: no data exchange control with ID 0x%04X.\n", nIDC);
ASSERT(FALSE); -->Point at this row
AfxThrowNotSupportedException();
}
Can i solve this problem.
Thanks you so much.
Thuan Pham, student of Ha Noi university of technology.
|
|
|
|
|
In function DoDataExchange maybe contain some DDX or DDV code to the control you deleted in resource view. such as DDX_Control(pDX, IDC_BUTTON1, m_btn);
I think it should be the reason according to your last reply.
|
|
|
|
|
thanks for your support. I tried to do time by time but nothing change.
Thuan Pham, student of Ha Noi university of technology.
|
|
|
|
|
Hi all,
First of all, I'm very comfortable with command-line compilation
with GCC, and VS.net IDE environment, but I'm trying to figure
out how to use VS.net compiler tools in command-line environment.
<br />
In command prompt, I typed: <br />
<br />
cl main.c <br />
<br />
and I got this error: <br />
<br />
/out:main.exe<br />
main.obj<br />
LINK : fatal error LNK1104: cannot open file 'LIBCMT.lib'<br />
<br />
Have I done anything wrong? Did I forget to set any PATH? What am I
supposed to do to compile a simple main.c?
Thanks
|
|
|
|
|
|
ok you compile main.c, but you don't tell it neither the name of the target exe, nor the libs to link, nor anything else...
if you want to loose time with the commande-line compilation, do this
<code>C:\></code>cl /?
|
|
|
|
|
When using CEdit (VC++ 6) with multiline.
How to input New Line ?
like following:
CString strMsg;
strMsg.Format("\tHello\n\tWorld");
SetDlgItemText(DLG_ITEM_ID, strMsg);
Expect result is:
"
Hello
World
"
But the CEdit output as following:
"
Hello World
"
How to input New Line in CEdit ?
-- modified at 20:27 Wednesday 8th March, 2006
|
|
|
|
|
try add ES_MULTILINE to edit style
you can modify edit style by resource editor ,or code.
Code sample:
CEdit *pEdit = GetDlgItem(DLG_ITEM_ID);<br />
pEdit->ModifyStyle(0,ES_MULTILINE);<br />
<br />
CString strMsg;<br />
strMsg.Format("\tHello\n\tWorld");<br />
SetDlgItemText(DLG_ITEM_ID, strMsg);<br />
|
|
|
|
|
MULTILINE Added, but still not have new line...
Using '\r' solved
-- modified at 21:40 Wednesday 8th March, 2006
|
|
|
|
|
edit control -> mouse right click -> properties -> styles -> Multiline
strMsg.Format("\tHello\n\tWorld"); -> strMsg.Format("\tHello\r\n\tWorld");
\n New line
\r Carriage return
|
|
|
|
|
After added the '\r', the new line problem Solved.
Thanks ~
|
|
|
|
|
LRESULT CALLBACK MainProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)<br />
{<br />
switch (uMsg)<br />
{<br />
case WM_MYMESSAGE:<br />
PostMessage(hWnd, WM_COMMAND, MAKELPARAM(IDCANCEL, BN_CLICKED), hWndCancel);<br />
break;<br />
}<br />
<br />
return CallWindowProc(wpPrev, hWnd, uMsg, wParam, lParam);<br />
}
Is it not right?
why some time it happen error?
if use SendMessage, not right?
PostMessage(hWnd, WM_COMMAND, MAKELPARAM(IDCANCEL, BN_CLICKED), hWndCancel);
|
|
|
|
|
Is this a dialog window? If so, call EndDialog(hWnd, IDCANCEL) . If not, post a WM_CLOSE message to the window.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
I am using MFC Visual C++ 6.0. I have a dialog based app. In the main dialog I can define another dialog such as CInstrument aDlg and then use aDlg.DoModal() to display it. I can do this (on the same lines) with many of the other dialog boxes I have defined in the resource editor, but I have a couple of dialog boxes that give errors instead. One classes DoModal() will give me an illegal operation error while another classes DoModal() gives me a debug assertion error. I created all of these dialog boxes the same way and I am a bit confused as to why these two dialogs would give me errors. I have triple checked the code and can't find anything out of the ordinary. Any ideas as to what might be causing this?
Buck
|
|
|
|
|
There are all sorts of things that could be causing problems.
Post the errors / assertions that you're getting, along with callstacks.
|
|
|
|
|
Sometimes, a "rebuild all" would do the trick....
William
|
|
|
|
|
Visual Studio 6 C++ says "cannot execute program" on my XP machine.
The same Release .exe throws an exeption implicating ntdll.dll when launched outside of Visual Studio.
Debug edition runs OK.
Release edition runs OK on an NT machine.
An intriguing database entry mentions a 'NO_NTDLL' option. Any experience with this?
dahill
|
|
|
|
|
This[^] could help.
Nibu thomas
Software Developer
|
|
|
|
|
dahill wrote: The same Release .exe throws an exeption implicating ntdll.dll when launched outside of Visual Studio.
What is the exception? It sounds like the application hasn't linked properly. Try doing a clean rebuild.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
are you sure to provide all the dll needed with your program ?
you could use dependency walker[^] to see which libs are required by your application to run...
|
|
|
|
|
Hi!
In a window, there are several triangle objects.
I want one of these to blink if I hit a button that is related with.
I don't want to use any MFC etc, only standard c++ and OpenGL.
Is there any good way?
Yonggoo
|
|
|
|
|
Yonggoo wrote: How to make an object blink with OpenGL?
Shine a really, really bright light in its eyes
Seriously though, I think the only way is to add/remove your object to/from the scene at the speed you want it to blink at.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Ryan is correct. OpenGL has no memory of the previous frame, you redraw it each time. Though there are shortcuts for repeated structures to shorten and speed up operations, you are drawing each frame one at a time, so blinking, you basically don't draw it (or draw it with a very dim grey, or don't alternate shining a light on it and away). This provides the blinking.
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
I need to do something like this
// somefile.h
namespace MyNamespace {
void* operator new ( unsigned int nAllocBytes )
{
return ::operator new( nAllocBytes );
}
};
// mainfile.cpp
int main( void )
{
int *p;
p = ( int* )MyNamespace::operator new( 2 );
delete p;
return 0;
}
But I would like to stick to new's sintaxe, so that I could do:
int main( void )
{
{
using namespace MyNamespace;
p = new int;
delete p;
}
return 0;
}
Anybody knows how?
regards [[]]
hint_54
|
|
|
|
|
Interesting.
One possible approach is typedef.
Kuphryn
|
|
|
|