|
si_69 wrote:
however im having problems
You need to tell people what your problem(s) are...
|
|
|
|
|
i dont know how to do it, thats my problem
and i was looking for some pointers
thanks
|
|
|
|
|
Try to be more specific ... your int variable isn't incremented/decremented when the user changes the text? or something like this?
-Tareq
|
|
|
|
|
sorry, yes....when a character is entered the counter variable is incremented
when a character is deleteed the variable is decremented
thakns
simon
|
|
|
|
|
a chunk of your code would really help us to understand the problem.
-Tareq
|
|
|
|
|
Hummm, yes ! But that does exactly what you wanted, no ??? So where is the problem ??
|
|
|
|
|
My nick is not "ne1", but....
why don't you just use WM_GETWINDOWTEXTLENGTH to get the length of the text in the edit field?
"Der Geist des Kriegers ist erwacht / Ich hab die Macht" StS
sighist | Agile Programming | doxygen
|
|
|
|
|
peterchen wrote:
My nick is not "ne1", but
There has to be someone...
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
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"
|
|
|
|
|
who can help me? I have a question. I want to insert a C Program into a MFC Project, I have tried to write "#ifdef __cplusplus extern C{ #endif" at the begin of the file and "ifdef __cplusplus } #endif" at the end. but it didn't work too. could you tell me a good method to solve it? Thank you very much.
|
|
|
|
|
Could you perhaps post what the compiler says?
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|
|
1) The following goes in your header file or if use to surround the prototypes if you place them in one of your 'C++' files:
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
2) Now just add the 'C' file to your work space the same way that you would add a 'C++' file. The compiler knows that is is a 'C' and will compile it as 'C'.
OOORRRR
3) You can just change the .c extension to .cpp and the file will be compiled ass 'C++' whith out having to modify any code at all.
Trust in the code Luke. Yea right!
|
|
|
|
|
hello
i have developed a application.when i build it in debug mode it works fine but when i build it in release mode it gets crashed. can anybody help me in this issue . what might be the problem
thanking you
chan
|
|
|
|
|
Check your memory handling / array bounds.
In VC the Debug build generates safety pads for mem allocations / access, The release mode doesn't.
Check MSDN for more information. A search for 'Debug Build' will give you quite a few useful hints.
"It was when I found out I could make mistakes that I knew I was on to something."
-Ornette Coleman
|
|
|
|
|
thanx for ur answer.
is it necessary to ship application in release build? if i have small exe then why not to ship it in debug build as it generates safety pads for mem allocations / access?
thanking you
chan
|
|
|
|
|
Yes, you must ship the release-version. As far as I know it is
not allow to redistribute the debug-versions of the VC-DLLs.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
take a look at the following page .. maybe it will help.
http://www.geocities.com/firepower_50ae/CodeNote/WinAPIfaq.html#141
-Tareq
|
|
|
|
|
This article should be of help Surviving the Release Version[^]
Roger Allen
Sonork 100.10016
Were you different as a kid? Did you ever say "Ooohhh, shiny red" even once? - Paul Watson 11-February-2003
|
|
|
|
|
You might not know this, but if you build release with pdb files (debug information) you can actually debug (with some limitations like optimized code etc.) your release build. This way you can at least find where in your program that fault occurs.
|
|
|
|
|
One classic reason for this is to define a ON_MESSAGE handler incorrectly. The prototype for the ON_MESSAGE hander is:
afx_msg long OnMyMessage(WPARAM wParam, LPARAM lParam);
But, if you define it like this:
afx_msg void OnMyMessage(WPARAM wParam, LPARAM lParam);
It will work fine in debug mode and crash in release mode. You get no warnings and it can be very, very hard to debug (because it works in debug mode). This one has got me before. It took about 2 days to figure it out.
Hope this helps...
Jonathan Craig
www.mcw-tech.com
Jonathan Craig
www.mcw-tech.com
|
|
|
|
|
I've got an one-dimensional array of an picture.
I know the dimensions of the pic.
int x_dim=348;
int y_dim=256;
unsigend char *mypic;
mypic = new unsinged char[x_dim*y_dim];
//now i get a pic from a cam that writes into mypic values betwenn 0(black)
and 255(white)
CBitmap pic;
How to create a CBitmap out of this
Thanks Heiko
|
|
|
|
|
At first create a HBITMAP -> MSDN "CreateBitmap"
with you can create a CBitmap
Try this @ home. (B&B)
|
|
|
|
|
A little bit of code would be helpful
I've tried many things without succes.
Heiko
|
|
|
|
|
Create a bitmap of the correct size and call SetBitmapBits(). See ::SetBitmapBits or CBitmap::SetBitmapBits in the doc.
onwards and upwards...
|
|
|
|
|
Or just pass all params in the CBitmap::CreateBitmap method...
onwards and upwards...
|
|
|
|
|
I've tried the way you say but it doesn't work
CBitmap pic;
pic.CreateBitmap( 348, 256, 1, 1, NULL);
pic.SetBitmapBits( 348*256,mypic );
why this doesn't work. The pic seemed to be "randomly"
I,ve written an routine to save the data as bitmap. This works fine. the bitmap looks right.
what is my failure?
Heiko
|
|
|
|