Type: Posts; User: ovidiucucu
Search took 0.17 seconds.
Which is value of MAX_CONTROLS?
12, 666. 65535, INT_MAX, something else?
C++ is neither Java, nor C#
Once you dynamically allocated stuff like in your example
...there's no chance to release it other place than inside CChangeSettings::OnInitDialog.
Review your application design.
April 30th, 2015, 12:59 AM
Beware! In your case the lambda call is asynchronous, so it's not OK to capture local variables by reference.
April 30th, 2015, 12:52 AM
Let’s Write a “Hello Lambda!”
It's intentionally made enough stupid, in order to explain lambdas at beginners level. :)
April 23rd, 2015, 07:58 AM
[ off-topic ]
Just for my curiosity: for which purpose are you using VTK in an MFC application?
April 23rd, 2015, 05:38 AM
You are calling SetCursorPos inside WM_MOUSEMOVE message handler (OnMouseMove). If the cursor is inside the view's client area (or the view has captured the mouse) a new WM_MOUSEMOVE message is...
April 22nd, 2015, 04:26 AM
Smoking few threads with a flavor of GUI can make you feel great but sooner or later may give nasty and painful headaches.
In case of abuse, of course. :)
[ later edit ]
Never forget the KISS...
April 22nd, 2015, 03:55 AM
I'm pretty sure you already know but please let me explain to others: in C/C++ a macro is expanded/resolved at preprocessing time which is the very first phase of code compiling. Besides,...
April 21st, 2015, 01:06 AM
Of course it works. I never thought it doesn't... :)
April 18th, 2015, 11:37 AM
The shortest answer is: No.
A little bit more elaborated: It is not possible to "edit the message map" at run-time as long it uses macros and the macros are expanded in the first compiler phase....
April 18th, 2015, 10:49 AM
The MDI main frame may have in its clent area, aside with MDI Client window (of pre-defined window class "MDIClient"), other docked windows: a status bar, a ribbon bar, toolbars etc. The framework...
April 18th, 2015, 04:27 AM
This picture shows who's the child of which parent in a classic MDI application.
April 9th, 2015, 02:35 PM
In your case you must not even call ScrollWindow but just move the child controls relative to parent's client area then invalidate.
Alternatively, you can try derive the custom control from...
April 9th, 2015, 02:07 PM
[ off-topic ]
I met a guy who recently ported a VC5 (VC5, not VC6) project to one of the latest VS versions.
And I know that's a pretty big project because I worked on it, over a dozen years...
April 7th, 2015, 10:28 AM
I would like to suggest a more reliable method for customizing a message box:
before calling ::MessageBox, set a CBT Hook.
in the CBT hook procedure, catch the creation of the message box and...
March 27th, 2015, 02:32 PM
A: 99.999% yes, is a problem of improperly handling of CString
You can simply reproduce this behavior writing the following simple code:
CString* pString = new CString(_T("Geo luvs...
March 21st, 2015, 04:17 AM
A little bit aside: in which path runs your application?
March 20th, 2015, 12:16 PM
Just a hint:
The Japanese codepage 932, maps the same ASCII code (0x5C) to backslash and Yen Sign (¥).
See Code page 932and Windows Codepage: 932 (Japanese Shift-JIS) for more details.
March 20th, 2015, 10:30 AM
A programmer must never say "certainly" before testing.
AfxMessageBox(_T("There was an old man of Five Rocks"));
March 20th, 2015, 09:47 AM
Another reason why I said "I would like to use the first solution" is to avoid shuffling lambda calls in worker threads. I'm not sure if that matters but who knows... anytime a mighty architect may...
March 20th, 2015, 04:14 AM
Indeed, the solution from previous example is not thread safe.
So, to prevent calling CSomeApplication::PostLambda from a thread, other than main application's thread, we can simply use an ASSERT.
March 19th, 2015, 11:41 AM
To make possible multiple asynchronous lambda calls in the same message handler, one solution is to store them in a list.
These having been said, my example from post #14 can be improved a little...
March 19th, 2015, 08:47 AM
But if someone is a good developer and not only a good architect (:)), has no sweat to put an '=' sign in lambda capture list, instead of shooting a burst in the message queue, from a single...
March 19th, 2015, 08:06 AM
I would like to suggest the following: instead of try handling OnCLick event in a HTML element, which may be pretty complicated, handle BeforeNavigate2 event in Web control, which is easy. Especial...
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.