|
http://vcfaq.mvps.org/ide/7.htm
The more a man knows, the more he forgives. - Catherine the Great
|
|
|
|
|
try using
#pragma warning(disable : 4089)
if not successfull try the following
disable LNK4089 by adding /IGNORE:4089 to your linker options
Rinu Raj
|
|
|
|
|
LNK4089[^]
if you still want to keep the dependency, you can remove the warning with a #pragma warning directive
|
|
|
|
|
So how exactly does this describe LNK4089? His post plainly asked what it was, not how it could be circumvented.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
But it also explains how it comes, and then how to avoid it...
|
|
|
|
|
Hey, no fair, Tox! My reply was supposed to go to Rinu_Raj. Your reply was the only good one. I hate it when CP twists things up like that.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
lol, nevermind... i misunderstood your post
|
|
|
|
|
Here is my event handling code:
LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, <br />
WPARAM wParam, LPARAM lParam)<br />
{<br />
switch(msg)<br />
{<br />
case WM_CREATE:<br />
Init();<br />
case WM_PAINT:<br />
PaintScreen();<br />
break;<br />
case WM_CLOSE :<br />
DestroyWindow(hwnd);<br />
break;<br />
case WM_KEYDOWN:<br />
if(wParam == 13){<br />
ProcessCommand();<br />
}<br />
case WM_COMMAND :<br />
if(LOWORD(wParam) == ID_COMMAND)<br />
ProcessCommand();<br />
break;<br />
case WM_DESTROY :<br />
PostQuitMessage(0);<br />
break;<br />
<br />
<br />
}<br />
<br />
return DefWindowProc(hwnd, msg, wParam, lParam);<br />
}
This only works if the main window has the focus, so how can i check which key was pressed if the editbox (ID_EDITBOX) has the focus.
Ie so that if the user presses enter i can run the proccessing needed on it.
|
|
|
|
|
Map the EN_CHANGE notification
Rinu Raj
|
|
|
|
|
How would i go about using the EN_CHANGE notifcation?
As checking for it in the switch case does not work as the code is not executed when i key is pressed.
<br />
LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, <br />
WPARAM wParam, LPARAM lParam)<br />
{<br />
switch(msg)<br />
{<br />
case WM_CREATE:<br />
Init();<br />
case WM_PAINT:<br />
PaintScreen();<br />
break;<br />
case WM_CLOSE :<br />
DestroyWindow(hwnd);<br />
break;<br />
case WM_KEYDOWN:<br />
if(wParam == 13){<br />
ProcessCommand();<br />
}<br />
break;<br />
case EN_CHANGE:<br />
if(wParam == 13){<br />
ProcessCommand();<br />
}<br />
break;<br />
case WM_COMMAND :<br />
if(LOWORD(wParam) == ID_COMMAND)<br />
ProcessCommand();<br />
break;<br />
case WM_DESTROY :<br />
PostQuitMessage(0);<br />
break;<br />
<br />
<br />
}<br />
<br />
return DefWindowProc(hwnd, msg, wParam, lParam);<br />
}
|
|
|
|
|
case WM_COMMAND :
if(LOWORD(wParam) == EN_CHANGE)
check MSDN for details
Rinu Raj
|
|
|
|
|
you know how to exit from aplication ?
i need something like :
PostQuitMessage(125);
Bravoone
|
|
|
|
|
what kind of application ? Console ? Win32, MFC ? .NET ?
|
|
|
|
|
whats happening ?
is that one not wuiting ?
Rinu Raj
|
|
|
|
|
#include <stdlib.h>
...
exit(0);
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
in console, yes, but there are better ways otherwise. that's why i'm waiting for his answer...
|
|
|
|
|
Yes, you're right. Since he is not specific about the question, I gave a more generic answer, which is applicable into MFC/Console
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
yes mfc
and thanks all !
Bravoone
|
|
|
|
|
Bravoone_2006 wrote: yes mfc
then Call CDialog::EndDialog(IDOK) (or IDCANCEL )
|
|
|
|
|
Or SendMessage(WM_CLOSE);
|
|
|
|
|
Hi,
I need to know if there is C or C++ code for reading and writing any image format and another source code for creating B-SPLine surface.
Thank you
|
|
|
|
|
Either you use Chris Maunder's DIBSection wrapper[^] or Davide Pizzolato's CxImage[^] (CxImage is a C++ class to load, save, display, transform BMP, JPEG, GIF, PNG, TIFF, MNG, ICO, PCX, TGA, WMF, WBMP, JBG, J2K images), but I don't know anything for creating B-SPLine surface. Good luck!
|
|
|
|
|
Also you can use CImage class for load/save bmp,jpeg,gif,tiff
|
|
|
|
|
send function only send char*, how to send a struct.
thanks!
|
|
|
|
|
you need to write each member to a char buffer, then send that
|
|
|
|