|
Ok, i have a dialog which i made with the resource editor. all the code is done with pure win32, no MFC.
Now when i have list control on the dialog, the CreateDialog function fails and the dialog is not created. When i set the "No Fail Create" (or something like that) prop on the dialog, the function succeeds the window is made but the list control doesnt show up.
when i take the list control off, it doesnt matter whether the "no fail create" prop is set or not, the function succeeds and everything works fine.
i also have the same problem when i add a progress bar.
extra info:
a while back, i made a MFC project that used a list control and a progress bar, the list control caused no problem, but when the progress bar was put on the dialog, the program crashed.
|
|
|
|
|
|
that didnt seem to make a difference
keep in mind im not using MFC, and i dont plan on it.
i suspect that function is for MFC?
seems to be alot of trouble to get access to it.
|
|
|
|
|
|
some people are just better at finding things on msdn than others, guess you are one of them.
thanx to both of you
|
|
|
|
|
I want to connect Oracle database through VC++ without using ODBC connection.
I got OCL library from http://crlab.com/ocl but its not working properly.
Can anybody provide me a sample code for this problem(Connection wiht Oracle 9i database through VC++ without ODBC connection).
|
|
|
|
|
Hello all,
I would like to get a small help from you all. My company is planning to develop a software which writes a CD/DVD on the fly. The input of the writer will come directly from a webcamera through any encoder software. The important thing is the data is not keeping as a temporary backup in hard disc but it is writing directly. As soon as the camera stops(Or before 30 sec.) I would like to get the CD in return with all of the captured images like a video CD.
Anybody have similar products? Please give me some idea.
It would be a great help for me if you have any idea about the usage any API in the writing section.
Thanking you in advance. Please help me at your maximum.
Manu Philip
|
|
|
|
|
I did something like this for backup software.
First, if you have a choice use DVD+R or DVD+RW for this, because they have the best support for preventing "underrun". In fact if you are using CDs, to be legal you must be sure that your datastream is always big enough to write data when the drive is ready! (even if you are not!) I break this rule all the time on a modern drive, without too many problems, but if you sell this you need to require that your customers have a drive with good underun protection.
Next, go to www.t10.org and buy the MMC standards. (you can download them too, but not the latest versions...) You might want to consider joining, depending on how technical your people are. t10 is the scsi standards orginization. Every CD writer that is faster than 4x is scsi! (it may be electrically IDE or USB, but it speaks the scsi standard, so that is what you care about). Read the standard several times until you think you understand it.
Now, figure out how to send SCSI commands on your os. On Windows NT/2000/XP it is a device_ioctl SCSI_PASSTHROUGH_DIRECT (or something like that). Windows 95/98/me uses something else. Unix is something different again, different for each unix.
Next you need to figure out what standard you will write data in. I don't know anything about the video CD standard, so I can't help you there. You can define your own format if you don't care about nothing else being able to read the disk.
If you want to write a file, then you can either figure out UDF (I didn't, but this is perhaps the right way to go), or you can write ISO-9660. ISO-9660 is most easially found under the name ECMA-119. Get the spec, and learn that inside and out. There is just one detail you need to know: reserve a track at the begining of the disk, then write data to the next track, when done you write your directory to the reserved track.
It took me about 4 months to write this myself (design through release). I had the advantage of a SCSI abstraction layer in place so I didn't need to worry about many of the details you will need to learn. Once you understand the standards and have a design the code is only a couple weeks, but it takes a while to figure out how to read all the standards.
Good luck. If you have any more questions let me know, but not until you have studied all the documents I listed above!
|
|
|
|
|
Hi All,
I am creating Print Processor that allows AS400 to send the print job via network. The print processor will then do the conversion from EBCDIC to ASCII. However, if something goes wrong (INI file missing, etc...), I would like the spool file (SPL/SHD) remains in the Print Queue.
I have tried to return FALSE in PrintDocumentOnPrintProcessor(), but still, the spool file gets removed. How can I preserve the spool file (SPL/SHD file)?
Thanks for any help in advance
Cheers...
Samin Thomas
|
|
|
|
|
how can i get com port device's ip address.
|
|
|
|
|
hai friends
i have a problem on event handling. i create some buttons at runtime, by using the CButton *pbtn; pbtn->create(caption,WS_CHILD|WS_VISIBLE,CRect(0,23,50,70),this,0x302);
and i am adding the buttons to the windows, but i don't no how to handle the envent of the created buttons... So, if any one have idea, plz help me.
for example , if i click mouse left button on aan indexed button the appropriate event should fire..
thanks in advance .
Surya prakash.
|
|
|
|
|
I think ,you can find answer in your problem,
if you generating button ,you muct have a Unique ID for Each Button.
Let i=1 (Minimun Unique ID) and j = 100 (maximum Unique ID)
then you can use this macro to catch Button Click
ON_CONTROL_RANGE( wNotifyCode, id1, id2, memberFxn )
check for BN_CLICKED message in wNotifyCode
"I Think this Will Help"
Alok Gupta visit me at http://www.thisisalok.tk
|
|
|
|
|
I made a program that comes up on the first day of every month to remind me to scan for viruses. I made it in MFC. How would I set the OK button to open my antivirus program? Any help is appreciated.
----------------------------------------
I HATE Resource Compiler Error RC2104!! It won't go away >:@
|
|
|
|
|
There are Many api to accomplish that
- WinExec
- ShellExecute
- CreateProcess
I you Case Most Suited is ShellExecute
"I Think this Will Help"
Alok Gupta visit me at http://www.thisisalok.tk
|
|
|
|
|
Try using
ShellExecute(NULL, NULL, [PATH TO THE ANTIVIRUS EXECUTABLE], NULL, NULL, SW_RESTORE);
..RR..
|
|
|
|
|
I tried that and it doesn't do anything. Does the exe have to be in the same directory? Earlier, I almost got it to work yesterday using system(mcagent.exe);. mcagent is the name of the executable. Well, I'll work on that a while, maybe I can get it. HAPPY NEW YEAR!
----------------------------------------
I HATE Resource Compiler Error RC2104!! It won't go away >:@
|
|
|
|
|
|
--------------------------------------------------------------------------------
Now i am using C++ try to create a Thread class, and used by main function.
in the main function i will create 2 threads and 1 critical section and 1 com port handle, i want the 2 threads share the same handle and critical section.
in the construction of thread, i pass the address of handle and critical section in.
In the function of thread i will try to enter the critical section and do something.
But now the condition i met is that neither of the 2 threads can enter the critical section.
If i don't care about the critical section, neither of them can use the send thing to com port handle.
So is there anyone met this condition before? what's the problem?
Thanks a lot for your help in advance...
|
|
|
|
|
(
Who can help me?
#include "stdafx.h"
template<class T>
struct S
{
int qqq;
friend bool operator< (const S<T>&t1,const S<T>&t2);
};
template <class T>
bool operator< (const S<T>&t1,const S<T>&t2)
{
return true;
}
int _tmain(int argc, _TCHAR* argv[])
{
S<int>s;
S<int>s2;
bool uintb = s2<s;
return 0;
}
compler tell me
TestSTL.obj : error LNK2019: 无法解析的外部符号 "bool __cdecl operator<(struct S<int> const &,struct S<int> const &)" (??M@YA_NABU?$S@H@@0@Z) ,该符号在函数 _main 中被引用
Debug/TestSTL.exe : fatal error LNK1120: 1 个无法解析的外部命令
~_~
|
|
|
|
|
|
o sorry ,i am a Chinese,so the words is Chinese.
|
|
|
|
|
im new to c++, currently doing project with vc++ .net is there any tutorials, for beginners on guis' and event driven programming??????
thanks!!!
|
|
|
|
|
Hi,
Why are you guys search outsides? Try to learn from MSDN itself. In MSDN lot of tutorials, articles and other staffs are there.
Regards,
Selvam
|
|
|
|
|
Hi, I have some debugging code, one of these functions writes a message to a file, but i also wan't to know from where the message was sent, so my prototype looks like this:
Debug(const unsigned int Line,const char* File,const char* Function,const char* Message,...);
The problem with this is that it'll need a lot of parameters, Line will always be __LINE__, File will always be __FILE__ and Function will always be __FUNCTION__, so i thought i could just define a macro(#define) which take Message and ..., but the problem is that ... can't be taken as a parameter for a macro and there is no way to send the "..." to the real debug function. So do anyone got any idea how i can do this. I want to call the function something like this:
Debug("Int with the value of 42: %i, and in hex: %x",42,42);
And then in the file it'll look something like this:
...
Car.cpp[Line: 52] (Called from: StartEngine()):
Int with the value of 42: 42, and in hex: 2A
...
|
|
|
|
|
I know I've seen an article on this subject in the Debug section here on CP, but in short you make a class that has an operator() overload which resolves to a call to your Debug() function. Debug() then takes a va_args parameter instead of ... , and uses vsprintf() or FormatV() if you're using CString .
The end result is something like (this is rough and untested, but should be enough to get you started):
#define DEBUGMSG CLogWrapper(__LINE__,__FILE__,__FUNCTION___)
class CLogWrapper
{
public:
CLogWrapper(unsigned uLine, LPCTSTR szFile, LPCTSTR szFunction) :
m_uLine(uLine), m_szFile(szFile), m_szFunction(szFunction)
{ }
void operator()(LPCTSTR szMessage, ...)
{
va_args va;
va_start(va, szMessage)
Debug(m_uLine, m_szFile, m_szFunction, szMessage, va);
va_end(va);
}
protected:
unsigned m_uLine;
LPCTSTR m_szFile, m_szFunction;
}; Then call it like:
int main()
{
DEBUGMSG("Int value: %d", 42);
}
--Mike--
LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ | You Are Dumb
Magnae clunes mihi placent, nec possum de hac re mentiri.
|
|
|
|
|