|
Hi,
Sorry if this is off topic. Is there a free windows equivalent of syslog you would recommend, preferably one that also works with linux.
Maybe it doesn't exist but what I'm looking for is a library that will allow me to call a function which will do just the right thing depending on which platform it is running on.
Thanks
Hua-Ying
|
|
|
|
|
|
Thanks for the link, it is interesting to see alternatives out there.
Maybe it doesn't exist but what I'm looking for is a library that will allow me to call a function which will do just the right thing depending on which platform it is running on.
Hua-Ying
|
|
|
|
|
For a example I want to create a child dynamic ListBox control like ComboLBox.
ComboLBox is a system class and can we use it?
Or another way?
|
|
|
|
|
I have a dual monitor pc that I need to PROGRAMATICALLY turn extended desktop on/off as needed.
In other words, I need to perform the same function as RT. mouse-click Desktop,
Properties->Settings, then turn the "extend my Windows Desktop on to this monitor" checkbox on/off as needed.
Please note: I do not want to simply change my application window size to accomplish this. I must be able to turn extended desktop on/off programatically.
Can anyone help me please??????
|
|
|
|
|
Search the machine's registry (HKLM hive) for a key named TwinViewDisabled. That's where I would start.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hummm. I am using Windows XP Home. Probably should have mentioned that. I cannot find the Reg Key you are talking about (TwinViewDisabled).
|
|
|
|
|
It may not exist for your display/adapter configuration. It might be specific to Nvidia. Either Google for it, or use Registry Monitor to see what changes are made to the registry when that checkbox is [un]checked.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hello all.
I've developed this helper application that helps me to rename files. I have a main dialog that has a "Begin" button on it. When you press the begin button, it calls another dialog's .DoModal() method.
When the "helper" dialog loads, I want to automatically run code that begins to search the folders and populates a listbox.
I've tried to put a call to the method in my helper dialog class that does the processing in the OnInitDialog() method, but this does not work. Instead, it just hangs there until the call is completed (never displays the dialog).
The only other way that I've found around this is to create a new thread using AfxBeginThread. This works fine but I'm just curious as to is this the proper way to do this ... or if there is some other method of running code when a dialog starts up. (ie, the code that I want to run actually populates a list box on the dialog, etc...)
Thanks in advance
Shultas
|
|
|
|
|
At the end of the main dialog's OnInitDialog() method, post a "begin processing" message. In the handler for that message, populate the listbox.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I have two IF() statements that shouldn't be executing, but they are anyway. I'm using a CFormView-based class and I'm executing this code in the CFormView's OnInitialUpdate() function. Here's the code:
if(m_bRefresh)
{
m_nSeconds = theApp.GetProfileInt("Settings","Refresh",0);
if(m_nSeconds > 0)
{
m_nTimer = SetTimer(1,nSeconds,NULL);
}
}
both of these values , m_bRefresh and m_nSeconds, are equal to 0 but it still goes into the if blocks when I step through the code. I've never seen anything like this before, does anyone know what's going on?
[insert witty comment here]
bdiamond
|
|
|
|
|
Check if you have declared a variable with prefix 'm_' locally in your method somewhere above the code you have showed. Microsoft debugger gets confused when you have (by accident) a member varaiable and a local variable with the same name. It gives exactly the strange behaviour you described.
/Moak
|
|
|
|
|
Sorry, I think I found out what the problem was. I still had my configuration set for 'Release'. the values it was returning were true, but I just couldn't see them when I stepped through because I was in Release Mode. Once I set my configuration back to 'Debug' I was able to see the true values. Thanks, though!!!
[insert witty comment here]
bdiamond
|
|
|
|
|
hi,
how can open a USB - Port with CreateFile (...) function, i know how to use this function but which String should i pass for the first parameter?
i know that this => CreateFile("USB", ...) doesnt work.
does somebody has an idea?
thanks thomas.
|
|
|
|
|
It depends of the device connected. Check the documentation supllied with the driver of your device.
|
|
|
|
|
Hi there,
i am working on "Sniffer application".... can anyone please suggest any resources for help/code examples.
Regards.
|
|
|
|
|
|
You may want to take a look at WinPCap[^] And Ethereal[^]
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
I have an application where I am attempting to set a socket option using "setsockopt." I want to set the KEEPALIVE feature to "ON."
The format is: setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, &optval, sizeof(optval)); I am trying to detect if a socket is HUNG, or if a network wire has become disconnected. Some documentaion indicates that optval must be a pointer to a char but other places I have seen it should be an int. I cant seem to get it to work.
This code snippet will not work as some of the documentation seems to indicate:
*************************************
int value = 1; //ON
setsockopt(mysocket, SOL_SOCKET, SO_KEEPALIVE, &value, sizeof(value));
*************************************
Can someone tell me how to set up the KEEPALIVE feature.
Thanks.
Jerry
|
|
|
|
|
Hi!
I have a dialog based application with one modal dialog as an inserted dialog resource. The modal dialog is always displayed in the middle of the dialog based application. I would like to display it not in the middle but with given coordinates e.g. in the upper left corner of the screen. Can somebody help me?
Regards.
|
|
|
|
|
You can reposition the dialog by making a call to MoveWindow() or SetWindowPos() in the dialog's WM_INITDIALOG handler. Here's an example of how to position the dialog at the top left corner.
CRect rectDlg;
GetWindowRect (&rectDlg);
int nWidth = rectDlg.Width();
int nHeight = rectDlg.Height;
rectDlg.left = 0;
rectDlg.right = nWidth;
rectDlg.top = 0;
rectDlg.bottom = nHeight;
MoveWindow (&rectDlg);
- or -
SetWindowPos (NULL, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOZORDER);
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
|
Call SetWindowPos() from the dialog's OnInitDialog() method.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
|
I am having an issue with my toolbars when changing themes in windows XP.
In the application I have several toolbar buttons that are inactive based on the settings the user has selected.
Under some themes, a greyed out button will be displayed as a grey box the full size of the button (looks nasty).
Under other themes, the greyed out button is a normal shadow of the colored part of the button (which is what I want).
I can get it to work under different themes, but it's a matter of going back and re-doing the background color of the toolbar. Then it will work under one, and not under others.
Am I doing somethign wrong?
Is there a 'standard' background color I am supposed to use?
I use VS C++ 6.0 and RougeWave Stingray toolkit.
I can hack my 256 color bitmaps down to 16 color and those work under all themes.. but of course.. they look awful.
(no clue why VS doesn't have a 256 color editor built in).
Thanks..
|
|
|
|