|
I just use nano. But then again I am a windows programmer so I don't really do much unix work.
Matt
|
|
|
|
|
I personally used the editor (X)JED with Make, DDD and Qt professionally a couple of years ago. When it comes to IDEs comparable with Visual Studio, KDevelop must be the number one choice.
--
Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. (Douglas Adams)
|
|
|
|
|
Hi,
I have embedded a windows media player 9 control in a CFormView of an SDI Appln. The default properties of the control in the resource dialog is set as
1) Play Full Screen - true
2) Auto Start - false
3) File Name - swiss.avi
4) Windowless video - true
5) Mode - None (No button controls)
In the code I trigger the AVI to play using
m_Player.SetUrl(avi_file); // avi_file is a variable that holds different AVI file names
m_Player.GetControls().play();
if (! m_Player.GetFullScreen())
m_Player.SetFullScreen(true);
It doesn't play the file in fullscreen when I run it. In fact it throws a blank error message box after it starts playing the file. I want to be able to switch the AVI files based on the key pressed by the user.
If I comment the Get/Set fullscreen code....it plays in fullscreen mode the first time and not after that. I don't know if this is a bug in windows media player 9 or am I doing something wrong ?
Also how do I maximize the windows media control to occupy the entire form view area when it starts up ?
Please help.
Thanks
v3man
|
|
|
|
|
I am trying to convert a NT-Service skeleton to UNICODE and I am stuck on one point:
USES_CONVERSION;
.
.
.
TCHAR chMsg[256];
.
.
.
printf(T2A(chMsg));
does not print out plain text instead I get the following on output in the command window(exact length may vary):
????????????????????????????????????????????????????????
My question is, is this the problem spot, if so how should i fix it, or is a conversion earlier in the code causing the odd output? I would greatly appreciate some ideas.
Matt
|
|
|
|
|
Matt Newman wrote:
My question is, is this the problem spot
Try putting this code just before :-
_tprintf("%s", chMsg);
That way we know if the wide string is okay.
Nish
"I'm a bit bored at the moment so I'm thinking about writing a new programming language" - Colin Davies
My book :- Summer Love and Some more Cricket [New Win]
Review by Shog9 Click here for review[NW]
|
|
|
|
|
I did that but the only way I could get it to compile was to change it to
_tprintf(_T("%s", chMsg);
When i did this I got the same output.
vsprintf(T2A(chMsg), pFormat, pArg);
This is the only code executed on chMsg pFormat is LPCSTR and pArg is va_list
Matt
|
|
|
|
|
try "%S" instead of "%s"
-c
|
|
|
|
|
That didn't work either, It did add alot of special characters though
Matt
|
|
|
|
|
Hi,
I developed dll. I tried to regsvr32.exe to load the dll. I had a error message.
"filename.dll was loaded, but the DllRegisterServer entry point was not found"
what is problem of my dll?
Thanks.
|
|
|
|
|
regsvr32.exe is used to register COM DLLs and COM DLLs implement an exported function called DllRegisterServer for this purpose. regsvr32.exe simply LoadLibrary 's the DLL and calls this function.
Nish
"I'm a bit bored at the moment so I'm thinking about writing a new programming language" - Colin Davies
My book :- Summer Love and Some more Cricket [New Win]
Review by Shog9 Click here for review[NW]
|
|
|
|
|
Hi, Nish
Do you have an example to implement this function? Any ideas are
appreciated.
Thanks
|
|
|
|
|
li0000 wrote:
Do you have an example to implement this function?
First of all is your DLL a COM DLL? If it is just a regular DLL you don't need it. If it is a COM DLL you should probably read up on COM.
Matt
|
|
|
|
|
I'm new to this, but I have a problem I can't solve, and could do with some help please.
I'm writing an encrypted chat program with VC++ 6, which uses the Winsock API. The encryption is provided by Peter Gutmann's cryptlib library.
The problem is that the encryption process outputs a void pointer to a binary string variable, and sockets as far as I'm aware take a pointer to a character string. The cryptlib documentation suggests using the S/MIME format but I'm not writing an e-mail client/server, I just want to send the data through a socket, something like this:
send( mySocket, encryptedDataBuffer, 1024, 0 );
Is there a way I can convert the binary into a character sequence, send that and then convert it back at the recieving end?
Thanks in advance.
noxon
|
|
|
|
|
Hi noxon
The 2nd argument for the send function is a const char* but remember that send was first written during the old C days and then a byte and a char were the same. This does not mean send can send only null terminated text strings. You can definitely use send to send binary text.The 3rd parameter specifies the number of bytes to send.
Regards,
Nish
"I'm a bit bored at the moment so I'm thinking about writing a new programming language" - Colin Davies
My book :- Summer Love and Some more Cricket [New Win]
Review by Shog9 Click here for review[NW]
|
|
|
|
|
Thanks Nish,
that has cleared up the question of whether I can do it or not. Im glad it was you who answered, it was your tutorial that got me off the ground with Winsock when I started writing the prog.
According to Microsoft void and char pointers are interchangeable without having to cast the pointer. So I'm giving cryptlib a NULL pointer to a character string like so:
char* encryptedDataBuffer = NULL;<br />
<br />
cryptPushData etc...<br />
<br />
cryptPopData( cryptEnvelope, encryptedDataBuffer, encryptedDataBufferSize, &bytesCopied );
But when i then use the code to send it on the Socket:
send( mySocket, encryptedDataBuffer, 1024, 0 );
The program just falls over (crashes), this same function works with a plaitext character string, so if I can send the binary, do you think I need to convert it to a hexadecimal representation of the actual binary, or am I missing something (quite possible).
Many thanks for help.
noxon
|
|
|
|
|
Yes, I know that this is a Visual C++ forum but is there a chance that anyone knows how do I compile a project in unix using gcc or g++ composed in C++ and spread in several .cpp and .h files? To be exact I have nine files the eight of them are pairs .h & .cpp which contains classes and the last one is my main.cpp.
Thanks for any help, Themis
|
|
|
|
|
Themis wrote:
using gcc or g++ composed in C++
At the command prompt type (if the compiler locker isn't already added):
add egcs
then type:
g++ -o ExecutableFileName File1.cpp File2.cpp File3.cpp MainFile.cpp
The -o does not create an object file, this is just an option. The header files should be #include 'ed within their perspective .cpp files. Hope this helps.
-Nick Parker
|
|
|
|
|
You can use gcc to compile individual object (*.o) files from each .cpp file and then you can again use gcc to link these objects files into an executable. But I think you should better construct a "Makefile" and use the gnu utility "make" with it in order to accomplish this job fairly easier. Search for how-to's in google and I'm sure you'll get the answers.
|
|
|
|
|
i m chinese, and i jioned here 5 momth. i like C++, but i m pool in english, wish you can touch me.
|
|
|
|
|
and my msn:
kuhx@msn.com
let us be a friend!
|
|
|
|
|
Hi!
I've got a problem when I use the AfxGetMainWnd function to get a pointer of the main window. I've created a thread to complete some operations, and I want to add an item in a list of my main window (a dialog). Visual C++ crashes. But in the primary thread, I can add an item without crashing.
Can anyone help me????
My code:
UINT MyThread(LPVOID pParam)<br />
{<br />
CGCDlg* Dlg=(CGCDlg*) AfxGetMainWnd ();<br />
ASSERT_KINDOF(CGCDlg, Dlg);<br />
Dlg->m_List.InsertItem (0, "Item");<br />
return 0;<br />
}<br />
Thks in advance!
Appstmd
http://www.appstmd.com
|
|
|
|
|
try to pass this as pParam to your thread-func and cast pParam to CGCDlg* instead of AfxGetMainWnd() .
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I doubt it is VC++ crashing, but instead it is your app. AfxGetMainWnd()returns the current threads main window, which isn't what you want.
Try:
AfxGetApp()->GetMainWnd();
There are many restrictions on what you can do with CWnd's in a worker thread, as they aren't in the worker thread's message map.
Neville Franks, Author of ED for Windows. www.getsoft.com
Make money with our new Affilate program
|
|
|
|
|
|
Hello
While Neville's suggestion is good, the main issue in your case is that you are using a worker thread to access the UI of another thread (a strict NO-NO). Read up on Joseph Newcomer's writings on UI threads or refer MSDN and see how to create a UI thread.
Regards,
Nish
"I'm a bit bored at the moment so I'm thinking about writing a new programming language" - Colin Davies
My book :- Summer Love and Some more Cricket [New Win]
Review by Shog9 Click here for review[NW]
|
|
|
|