|
I would like to know if there are any methods to intercept WIN32 API functions? For example, I want to get the string that would be displayed on the screen before it is actually displayed. Any code examples?
Thanks very much and I am looking for examples eagerly.
|
|
|
|
|
Hello eveybody
I didn't understand the values of lpdwFlags in the fonction InternetGetConnectedState
If we know that the possible values are:
#define INTERNET_CONNECTION_MODEM 1
#define INTERNET_CONNECTION_LAN 2
#define INTERNET_CONNECTION_PROXY 4
#define INTERNET_CONNECTION_MODEM_BUSY 8
why I had different results like these:
2: When i use only a LAN
18: When I use a modem (not connected)
81: When I use a modem (connected)
86: When I use LAN and PROXY
What is these values means?
Please I need your help
Thanks for all
Sylvain Demers
demerssy@ift.ulaval.ca
|
|
|
|
|
Hi,
I'm trying to set an enviroment variable from my program, but it vanishes after I make
the call, but it works (at least for the return code)
Is there any trick to make it work ? Or is there another function I need to use ?
Thanks,
Dennis
|
|
|
|
|
I have a dialogue based GUI aaplication,which i need to make a service.How can I do that ? I do not have any main function wherein I can take any commandline arguments.
Xzyeena.
|
|
|
|
|
There should be some helpful information in P.J. Naughter's article here on the site:
http://www.codeproject.com/system/cntservice.asp
|
|
|
|
|
check this:
CCommandLineInfo cmdInfo;
AfxGetApp()->ParseCommandLine(cmdInfo);
if (AfxGetApp()->m_lpCmdLine[0] != '\0')
{
char tmp[1000];
sprintf(tmp,"%s",AfxGetApp()->m_lpCmdLine),
AfxMessageBox(tmp);
}
else;
In CDialog-GUI you need the CWinApp-pointer (AfxGetApp()).
|
|
|
|
|
Hi all,
I have a problem that should have a simple solution. I have an MDI FormView-based app and it has two button on the toolbar where the user can choose to create a new form-based document version 1 or version 2.
Therefore I think I have 2 issues:
one, how to set the global variable after either clicking button 1 or 2. What function should I call after setting the var?
void CMainFrame::OnFileNew2()
{
view = 2; // set the global var
... // what function should be here to continue creating new doc?
}
two, how to choose the view based on the global var.
Can anyone help me? or does anyone have a sample code that just does that?
Thanks a lot in advance.
|
|
|
|
|
peace
every poor app can open an iexplore instance and tell it where to surf to ...
is there a doc on the web about this ?- i ownly found some on how to use CWebBrowser2 to write a new one
thanx
|
|
|
|
|
You can call ShellExecute() and pass it a URL (be sure to include the "http://" part) and it'll launch your default browser.
Look around in the registry under HKCR\http to find out more about the commands issued.
|
|
|
|
|
I am trying to manage a main dialog that must appear at the beginning of the app, disappear when the user has chosen an action an then reappear when the user has finished. It's kind of a primitive approach, but the users are all used to an old DOS program that I am converting to Windows. Can I mange the whole thing in CMainFrame?
Thanks,
F.L.
|
|
|
|
|
yup..make a function that displays your dialog and call that function from OnCreate and then later from OnDestroy... =)
|
|
|
|
|
Hi !
I wanna insert a bitmap in IE menu with the command InsertMenu (SDK) by an other app.
But i've never managed in that task
Someone could help me.
Shellmind.
|
|
|
|
|
Do you know how to export the settings under a directory in registry? I can use Export in Regedit, but i dont know how to invoke export programmatically. Any ideas? Thanks all!
|
|
|
|
|
Look up the RegSaveKey() function.
|
|
|
|
|
Hello,
for a project i want to be able to read contents from the registry of a remote machine (Windows 2000).
The problem is that the connection with RegConnectRegistry works, then i am able to open a key (RegOpenKeyEx and RegCreateKeyEx) and then read from it (with RegQueryValueEx). This goes ok for 2 times with REG_SZ values but then with a third ("VendorIdentifier" or "Identifier") i get an error message 997 that states error I/O operation pending.
I tried to work with WaitForSingleObject to wait until the 'server' is ready to send but this results in a wait failed and i am a bit clueless now!
Anyhelp would be very appreciated! =)
|
|
|
|
|
Hi,
isn't there any mapping function to convert a float to a unicode string?
_ttoi() and _ttol() are defined but im am missing _ttof().
Tx, Chris
|
|
|
|
|
Try
_stprintf(string, format, float value);
|
|
|
|
|
Hi Serge,
i need the conversion from ascii to float, not the other way round.
Tx, anyway for answering.
Chris
|
|
|
|
|
Hi all!
Maybe you can help me out with a little troubling issue I have regarding visual c++ 6. I have a piece of hardware that resides on 0x000D9000 (base), and that looks at the range (base to base + 603). This is a custom made piece of hardware so there is no driver for it. The thing is, I need to write a byte value to, lets say, (base + 30). But I can't get this to work correctly.
Does anyone have an idea on how to handle this?
Kind regards,
Bas Scholtemeijer
swave333@hotmail.com
|
|
|
|
|
Check www.sybera.de (SHA).
This package should have a memory-driver.
Try this site, maybe it's helpful.
|
|
|
|
|
I am new at Visual C++ and have an assignment due in a week. Not happy. Basically I need to be able
to select some files in some way, and add them to a list box so I can ouput the paths to a text file.
If anyone can help, I would be very thankful.
Thankyou
Matt
|
|
|
|
|
Use a CFileDialog to select files, then use the GetPath function to get the path selected ( I'm not sure of the mechanics of stepping through multpiple selections ), then add then to the list box as you get them from the dialog.
LMK if you have any other problems, but that should get you started. Do you have the MSDN help ? If not, get it, it is invaluable.
|
|
|
|
|
I'm trying to add a vertical rebar to the MFCIE sample application. As a start, I'm just adding a CStatic control that reads "test." It seems to work fine when I use a horizontal control, but not vertical (using CBRS_LEFT style). The rebar doesn't paint the space below the static control (so it takes a snapshot of whatever's behind the window). I can fix that problem by calling ModifyStyle(0,CCS_VERT) after I Create() the CReBar, but now the rebar width gets confused and is set to the same value as the height. The left edge of the client area moves way to the right and there is a big unpainted 'hole' between the rebar and the client area.
I found lots of complaints about this problem on microsoft.public.vc.mfc, but no solutions. Has anyone solved this problem?
|
|
|
|
|
Given the following code:
struct SLOT
{
CString sField1;
int nField2;
};
SLOT* m_pSlots[5];
void CMyClass::InitSlots()
{
for (int i = 0; i < 5; i++)
{
m_pSlots[i] = new SLOT;
if (m_pSlots[i])
{
m_pSlots[i]->sField1 = "Empty slot";
m_pSlots[i]->nField2 = i;
}
}
}
Would you say it is morte correct to say that m_pSlots is a pointer to an array, or that m_pSlots is an array of pointers?
My view is that it's an array of pointers, but my boss insists that it's a pointer to an array.
|
|
|
|
|
Aargh... the "pointers to pointers" syndrome.
Without looking at a C++ reference book or looking at the compiler output, my money is on your boss.
But then again...?
Stroustrup will hopefully give you the correct answer...
|
|
|
|