|
How can I in get MX Records from DNS when I know only hostname or ip of main server?
Please Reply to my email:piopawlu@interia.pl
Piotr Pawluczuk
|
|
|
|
|
Does anyone know how to use DeviceIoControl()??? I read the document from microsoft and MSDN...but still don't know how to use it.....can anyone give me a small tutorial about this function?
Thanks
|
|
|
|
|
Hi All,
I'm beginner in VC++ and I have VC++ 6.0. I have this problem now.
How I create user items in system menu of my applications ?
Thanks,
Libor
Libor Matejka
|
|
|
|
|
Please explain ? If you want to add items to the menus, use the resource editor to create items and then Class Wizard to create functions linked to the item ID's. If that is not what you mean, please re-state the question.
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.
|
|
|
|
|
Thank you for your answer, but I mean SYSTEM menu. This is menu under Application icon in caption bar of application.
Libor Matejka
|
|
|
|
|
Create a sample Dialog based application, then look at the implementation of the OnInitDialog member function. In here you will see how the About Box menu option is added to the System Menu. From this you should be able to add almost anything you like to the System Menu.
Michael Martin
Pegasystems Pty Ltd
Australia
martm@pegasystems.com
+61 413-004-018
|
|
|
|
|
Thank you,
this is very simle and fast
Libor Matejka
|
|
|
|
|
I send when I click on a static text (CLabel) a message to my main app that I intercept with the OnNotify() routine.
(I don't have the listing right now this explain the aproximate syntax sorry bout this)
But I noticed annoying long delay (1 second) before I can re click on the static
should I return 0; once I get the message ?
For now I alway return to the normal OnNotify procedure
Onnotify( wparam, lparam ...)
{
switch(proc)
{
case:
some code;
return 0; <---For now I just have a "BREAK;" here
}
return Onnotify();
}
Many thanks
|
|
|
|
|
I have declared a function called solve like this :
double Solve(double (pFn) (double), double pX);
Now I don't know how to use this function with for example pFn = 2*X-1...
the following code doesn't work :
lSoluce = Solve( (2*X-1) (X), X) ????
Thank in advance for your help.
Leo
|
|
|
|
|
Hi !
if pFn - is a pointer to a function that date a double and returns double your code should be change into:
iSoluce = Solve(pFn, X);
Best regards,
-----------
Igor Soukhov (Brainbench/Tekmetrics ID:50759)
igor@soukhov.com | ICQ:57404554 | http://soukhov.com
|
|
|
|
|
2*X-1 is a statement not a function. A function would be something like sqrt(). The documentation for qsort() usually has a good example of function passing.
|
|
|
|
|
Hi,
I wrote a DLL with an exported class containing a template method.
When using this DLL, I got a linker error on this method.
How to correct this in VC++ ?
Thanks a lot
Nicolas
|
|
|
|
|
I am trying to generate a continuous tone at a desired frequency. I cannot use Beep() because once the tone begins, I need to do other processing. I need it to continue until I stop it from elsewhere in my code or send another frequency. Beep() does not return until the specified duration has elapsed. Any suggestions? I have looked at PlaySound and Direct Sound, but these appear to be much more complicated solutions than should be required to play one tone.
Thanks.
|
|
|
|
|
Windows has no APIs for generating a continuous tone.
If you only need one frequency, or at most a small set of frequencies, you should probably create .wav files and use PlaySound to play the specific file you need, with looping turned on. If you need arbitrary frequencies, you're getting into hairier territory.
|
|
|
|
|
I know this is not a nice solution, but it works...
Start another thread that calls Beep(), when you need to stop the tone, just kill the thread, and eventually start it again with another frequency...
something like:
DWORD WINAPI WorkThread(LPVOID lpParameter)
{
Beep(500, 1000000);
return 0;
}
int main(int argc, char* argv[])
{
DWORD dwThreadId, dwThrdParam;
HANDLE hThread;
dwThrdParam = 1;
hThread = CreateThread(NULL, 0, WorkThread, &dwThrdParam, 0, &dwThreadId);
Sleep(1000);
CloseHandle(hThread);
return 0;
}
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
I have a question regarding the ADO Data Controls that Microsoft provides with C++ ( i.e. Adodc, DataCombo, DataGrid, DataList, DataRepeater) It seems that these controls were primarily designed for use in VB. However, I am a cheap C++ programmer and wish to include these tools in an application that I am building. The problem I am experiencing arises when I attempt to bind DataCombo and DataList and run time, as the interfaces for the controls don't exposes any methods/properties to assign the DataSource and the DataField. They only provide the methods/properties to assign the RowSource and ListField. I know the methods/properties exist cause VB shows them and the VC++ dialog editor shows them too. I also tried to just statically bind them, however it seems they lose their binding at run time. Where do the DataSource and DataField properties disappear too, or where do they come from? Why do the controls lose their binding at run time if I statically bind them in the dialog editor? Are these two problems related? I attempted to solve this problem myself however, documentation on using these controls in C++ is scarce. Any help would be greatly appreciated.
Luke Stamm
luke@win-world.com
Wholesale Information Network, Inc.
|
|
|
|
|
Writing a short routine which opens a file I noticed the following:
try {
CFile file;
file.Open(filename, CFile::modeRead);
file.Read(buffer, file.GetLength());
file.Close()
}
This will not throw an exception if the file does not exist.
A slight change:
try {
CFile file(filename, CFile::modeRead);
file.Read(buffer, file.GetLength());
file.Close()
}
This code will throw an exception if the file is missing.
It must just be a misunderstanding on my part about the purpose
of exceptions/handlers, but could someone explain it?
|
|
|
|
|
CFile::CFile() must throw an exception because it does not return a value.
CFile::Open() does not throw an exception because its return value and CFileException *pError parameter can be used to handle any unsuccessful calls.
|
|
|
|
|
Constructors cannot return a value, as such they must throw exceptions to signal exceptional activity. Functions like CFile::Open can return a value, and are there for situations where you don't want to throw an exception.
This is how it is supposed to work.
By the way, you should know that CException based objects are thrown by reference, not by value, which means you need to call the Delete() memeber function on them or you will get a memory leak.
try
{
CFile(filename);
}
catch (CFileException *e)
{
e->Delete(); // do not call "delete e;"
}
This is handled automatically for you with the uppercase macro's TRY and CATCH, which I don't like using. when using the lower case try and catch, just remember to call Delete() on CException based exceptions.
|
|
|
|
|
I have an MFC app that compiles in DEBUG but the compiler hangs in Release mode. If I kill Winoldap in the task list the compiler comes back and then I can finish the compile. Other release projects compile OK. Any ideas.
Win ME
VC6 SP 5
|
|
|
|
|
Have you tried deleting the Relase folder and trying a rebuild all?
Michael
|
|
|
|
|
Thanks
I did that but no joy.
It appears that my system is hooped. Another system compiled the project no problem so ----- FORMAT C:
|
|
|
|
|
Dear All
How to get LOGFONT from COleControl?
Please Help Me...
Best Regards,
======================
www.activePower.idv.tw
+886-932-306-142
Jason Liao
======================
|
|
|
|
|
Hi,,
my question is where to store my data. but i like to explain what my application does first.
I have a MDI application, it displays Bitmaps, then it detects a certain number of points on the displays image. the user can move the points, add point, and delete points.
i store all the points in a linked_list,, in CView
so basically i dead with CView alot..
but now i have to add serialization to my application.. so i could store and retrieve my work.
1- Should i add all the data in the CDoc class, or i can leave them in CView.
2- can i use serialization in CView.
Thanks
Ehsan Behboudi
|
|
|
|
|
i am displaying a cedit control, made using pnt->Create( WS_VISIBLE, r, this, ID_EDIT1), where r is a rect. this displays fine but then i cant click back onto the form and make it lose focus... why? im not doing modal or anything...
thanks in advance
|
|
|
|