|
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..
|
|
|
|
|
I have to admit that I have not used 256 colour toolbars with Stingray toolkit. Have you asked Roguewave support the same question? It sounds like their owner drawn toolbar is not coping with the theme change correctly.
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 create some dynamic CEdit controls..
e.g...
CEdit newEdit; // as a member var of class in the header
newEdit.Create(WS_VISIBLE|ES_NUMBER|WS_DLGFRAME ,startRect,this,NULL);
...
What window style flags do I need to set so the CEdit looks like a standard CEdit that you get when adding to a dialog resource?
Thanks in advance
|
|
|
|
|
WS_VISIBLE|WS_BORDER
Jaime
|
|
|
|
|
Hi, how can I identify a carriage return (\n)using fscanf ?
Thanks,
Deepak Samuel.
|
|
|
|
|
It has an ascii value of decimal 13, eg.
if(nChar==13)AfxMessageBox("Carriage Return");
|
|
|
|
|
I am scanning the file for interger values what happens if my file itself contains a integer value of 13 ? How can I differentiate between my data and a carriage return?`
Thanks,
Deepak Samuel
|
|
|
|
|
Maybe you can tell by looking for CR, LF...at the end of each line.
|
|
|
|