|
You didn't take my advice and make sure the debug version of Paintlib is called paintlibd.lib. So now the release version is trying to link to the debug version of paintlib. Just make the path to the release version of paintlib higher in your include paths ( i.e. in the tools/options menu not in your code ) and it will link to that instead.
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
I used MFC Wizard to create a exe project and added the following codes in OnDraw() function to save a BMP file to a JPG file. It is OK. I can get a new.jpg file from the snapshot1.bmp.
CAnyPicDecoder Decoder;
CWinBmp Bmp;
Decoder.MakeBmpFromFile( "C:\\snapshot1.bmp", &Bmp );
CJPEGEncoder Encoder;
Encoder.MakeFileFromBmp( "C:\\new.jpg", &Bmp );
But when I added the same codes to another project which I want to save a JPG file from the memory or BMP file. The project can be built with no error. But when I run the program, it gave me a dialog to say:
Debug Error!
Program D:\VizMarine\VizMarineView\Debug\VizMarineView.exe
abnormal program termination
Press Retry to debug the application
If I choose Retry option, I found the program will meet problem in the function jpeg_start_compress( j_compress_ptr cinfo, boolean write_all_tables ) ( ...\libjpeg\jcapistd.c ). I traced into the jinit_compress_master( j_compress_ptr cinfo ) function. And found when the program run to function jinit_color_converter(cinfo) ( ...\libjpeg\jcinit.c ), some errors catched.
Don't know why. But the same library run correctly in other applications. I have asked some friends to debug for me. But they have no idea about this. So sad.
|
|
|
|
|
Dear Sir:
I am now using the Parallel Port to read & edit the
EEPROM(24C08 IC/Via I2C bus)data from our device.And I
use the 25Pin-9Pin cable to do this.(To connect the
cable to our device directly).How can I program it with
TC/VC++6.0 language?Would you please give me some
advice?(Steps?)Need I have to write the Device Driver?
TKS! Waiting for your reply.
***
We are making progress everyday!
At XiaoYu Workshop.
***
|
|
|
|
|
It would be helpful if you were stating on what OS you are developing.
Apparently, you are driving an I²C bus by toggling some I/O lines at the PC's parallel port.
Windows NT/2000/XP would certainly need a device driver to allow such a thing.
Windows 95 (or any of it's reincarnations) is slightly more relaxed here.
That you are trying to connect your device via a 25-pin to 9-pin adapter makes me wonder; such adapters are intended for serial ports and won't match to parallel ports.
I'd recommend getting a firm knowledge about I²C, trying to locate an I²C driver for the OS of your choice, and only _then_ start to implement hardware for it.
Whatever, good luck.
|
|
|
|
|
Dear Sir:
Thank you for your reply.The situation is:I have a DOS program to read/Edit the data from 24C08(EEPROM IC),no source code.It uses the 25Pin-9Pin cable to do this.I want to re-write the program with VC++6.0,a Win32 application in Windows95/98.There is no any small boards.Only one cable.I have no the I2C-Bus driver.Maybe I will simulate the I2C-Bus protocol.How is the detailed step?
Thanks in advance!
***
We are making progress everyday!
At XiaoYu Workshop.
***
|
|
|
|
|
Does someone konw how to remove the scrollbar on th CWebBrowser ?
I have tried ModifyStyle, ModifyStyleEx and ShowScrollBar on the contorl and also on all its childs. Nothing works !!!
Thanks
Olivier
|
|
|
|
|
hi,
In the body tag put SCROLL=no.
Good luck,
Dror
|
|
|
|
|
Hello all,
I've got a CEdit (read-only) in which continuously lines are added at the end (debugging stuff). Of course... if I do nothing, its memory usage will grow and grow (64k Max for Win9x, 'unlimitted' for WinNT/2k). What I want to do is to delete the first line when it passed a predefined maximum amount of lines.
But... CEdit doesn't implement a 'delete-line' method. The only way I've found out was:
-First select the line(s), than replace the selection with nothing.
This sounds CPU-consuming to me...
Does anyone knows an efficient way to do this?
Thanks in advanced,
EiSl
|
|
|
|
|
I think there's no other option than select/replace with nothing. Is this a real problem?
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Better you should create a loop that replace the first line with the second, the second with the third... and you should call this loop after verify wheather the comming line are going to exceed the limit.
|
|
|
|
|
Thanks for your reaction !
Just a summary of what you suggested:
1. First get access to complete memory block in CEdit
2. Do the loop-stuff as you suggested (outside the scope of CEdit)
Probably by using memmove
3. Give this block of memory back to CEdit
Now a little question...
Let's say we're talking about 1000 lines of average 50 characters in width. What do you know about your method that it's probably faster than the 'select-and-replace-with-nothing' method?
Curious about your answer,
EiSl
|
|
|
|
|
How can we capture the message of the occurance of multiple characters if a key is pressed and left as such
ThanQ
|
|
|
|
|
in the WM_CHAR message handler there is a nRepCnt variable that tells the number of times the key is pressed. This is in MFC handling.
|
|
|
|
|
Thanks GLS/\/\artee
|
|
|
|
|
Hi All,
I have a problem with disconnected recordsets.I have a component.One if
it's function will get selected Records in a Database.I am passing the
Recordset pointer from the server to the Client.I am using disconnected
recordsets for this.
I can see that at the server side I am getting the Recordset
pointer.But, I could not get this pointer on the client side.
the function has the protoype
STDMETHODIMP GetSpecificElements([in]struct filterData, [out] IUnknown
**ppRecordset); //filterData is a structure containing the Filter
Conditions for getting selected Records from Database .
I could get the Recordset pointer at the server side, but could not pass
it to client.I am using Client side cursor(adUseClient) and standard
Marshaling.I am using some user defined classes inside this
function to Open Database and get the Recordset Pointer .I could
get the Recordset Pointer inside these classes , but failed to get
this pointer from this function to client .Does the Disconnected
Recordsets vary between ADO and ADOX ?
what could be the problem ?
Thanx in advance for the help.
Regards,
yamini
|
|
|
|
|
hai
my project works on WindowsNT.i was asked to code for the faxing madule.we r trying to implement this through code.i know that we can fax the documents from MicrosoftoutLook,so we can call its object from our code and we can fax the things.but the thing is we r trying to make it without using third party controls.in MSDN April201 versionHelp they have given the APIs which support only 2000 or later.i want to run it only from NT.so can anybody help me to complete my task?u guyz have played with these type of small codings, right?
|
|
|
|
|
I'm not aware of any free faxing code but maybe you might find this site useful http://www.ntfaxfaq.com/pages/faxapi.htm
Michael
|
|
|
|
|
i got this programming assignment that i cannot figure out how to design an algorithm for ... is someone could help, please do ... thanks .... here is the problem:
suppose the integers 1,2,3,...n are given in this order and offered as input to a collection of two queues, queue 'q0' and queue 'q1'. the number '1' is given first, followed by '2', etc. this input sequence can be permuted in different orders by executing the queue operations q0.enq, q1.enq, q0.deq, and q1.deq a particular order. for example, if the input sequence 1,2,3, then five different outputs can be obtained:
OUTPUT: CONTROL SEQUENCE:
1,2,3 q0.enq, q1.enq, q0.enq, q0.deq, q1.deq, q0.deq
1,3,2 q0.enq, q0.enq, q1.enq, q0.deq, q1.deq, q0.deq
2,1,3 q0.enq, q1.enq, q1.enq, q1.deq, q0.deq, q1.deq
2,3,1 q0.enq, q1.enq, q1.enq, q1.deq, d1.deq, q0.deq
3,1,2 q0.enq, q0.enq, q1.enq, q1.deq, q0,deq, q0.deq
3,2,1 not possible
Not all permutations on n integers are possible as output, as illustrated above with desired output 3,2,1, and some permutations have many possible solutions. in fact, the sequence 1,2,3 can always be recovered regardless how the numbers are distributed over the queues q0 and q1 and this project is to write an algorithm that determies if the desired output sequence is possible, and if so, which sequence leads up to it. we will do this by attaching two contol numbers to the control sequence, one control number for the 'enqueues' and one for the 'dequeues', as followeds: interpret and 'q0.enq' as '0' and an 'q1.enq' as '1', so that the sequence of enq's becomes a string of 0's and 1's, that can be interpreted as a binary number. the same can be done for the deq's. thus the above table becomes:
OUTPUT: enq-number deq-number
1,2,3 (010)=2 (010)=2
1,3,2 (001)=1 (101)=5
2,1,3 (011)=3 (101)=5
2,3,1 (011)=3 (110)=6
3,1,2 (001)=1 (100)=2
3,2,1 not possible
okay ... hopefully you understand what my project is, if someone could help me out with the algorithm for this problem i would be in great debt to you ... btw, if you are concerned about this being illegal to help me on the project, don't be ... we are allowed to get help from published sources ... ie here ... thank you
|
|
|
|
|
i'll take any ideas or suggestions ... please help
|
|
|
|
|
Hi,
Can we make dialog with ALPHA EFFECT(we can see through the current dialog) with all the version of Win32
Thank
|
|
|
|
|
The SetLayeredWindowAttributes function which makes this possible is available on W2K and XP only.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
There is a sample named sampgrabcb in directshow sdk.I used GraphEdit to learn
how many filters used in the filter graph and found the BitBucket Filter
connected between decompressor and null renderer,who knows the BitBucket filter's
functionality and usage?
|
|
|
|
|
I am supposed to create dynamic controls at runtime. I have to create a class that accepts some parameters, based on the active window. Then based on the parameter, it has to create controls at run time, in the left pane. The number of controls and their type varies based on the active window in the right pane.
Then, I need to handle the values from the controls that are created. I may have to maintain a string table or something for all the controls created and then handle it seperately.
I am new to VC++ and any help will be greatly appreciated. Any sample code or location of examples will be a lot of help. Please help.
|
|
|
|
|
One approach I've seen is to add all the controls you'll need to the form before hand, but without the 'Visible' attrib. Then you just get pointers to the controls you need and ShowWindow(SW_SHOW) - maybe positioning them as well, depending on how cluttered your form gets in the resource editor.
An array of control IDs for each pane type could be useful both for the display and later data retrieval.
|
|
|
|
|
Hello All,
In my App. I have the full Path and the Full name of a File, So I was wondering if there is a way (or an Win. API) to get or Convert this Full Qualified Path to its Dos format.
Thanks in Advance for your Help
Fady Elias
|
|
|
|
|