|
Windows NT/2000 Native API Reference
by Gary Nebbett
|
|
|
|
|
Anybody know how I can get SHBrowseForFolder to stop showing FTP sites? I am using CSIDL_NETWORK as the root path.
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
If it is showing sites that the user specifcally added as a "Network Place" (which can be a FTP site), it sounds like the function is working correctly (as designed)...?
Although I have never tried to filter the sites that SHBFF would display (because that might confuse the user as that would not be the expected/default behavior), I would be suprised if there was an easy way to do it.
Peace!
-=- James.
"Fat people are hard to kidnap."
(Try Check Favorites Sometime!)
|
|
|
|
|
Well, it doesn't consider those FTP sites to be valid as nodes (the OK button doesn't un-grey). It also allows you to browse the directory structure of the ftp sites.
It just seems strange.
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
That might have to do with the flags you have specified, for example BIF_RETURNONLYFSDIRS might cause that to happen.
Either way: I never suggested that MS' way of doing things (conventions) ever made sense!
Peace!
-=- James.
"Fat people are hard to kidnap."
(Try Check Favorites Sometime!)
|
|
|
|
|
Hi there,
I wrote a simple project by MFC exe dialog basad ...
In fact, I wrote a simple gdi game in only a dialog !
Now, i want to know, If i make a .DLL from my game by MFC DLL, How could i run it from other language like Delphi ?
I just can use LoadLibrary !
Please help me !
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
You cannot write a MFC extension DLL and run it from other languages, e.g., VB, Java, MFC extension DLL's can only be used by MFC applications. If you need to build a language dependent component, you need to do so using COM.
|
|
|
|
|
Hello, thx for reply !
For adding COM to project, i just need to add COM strcuture to my program ?
Or something else ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
COM is not s struct or class, it's a technique that introduced language independency on creating object models, if you do not have any background on using COM(or ActiveX), then I guess you need to spend a little time to actually learn it, COM is not such a simple thing that can be talked and mastered within this post.
There are quite some COM related articles in Code Project, just go to home page, find the "General" category on left bar and click on "COM/DCOM/COM+" link you'll get what you want. Good luck.
|
|
|
|
|
You will need to use COM
- Matt Newman / Windows XP Activist
-Sonork ID: 100.11179
01001001 00100000 01010000 01100001 01100100 00100000 01001101 01111001 00100000 01010000 01101111 01110011 01110100 00100000 01000011 01101111 01110101 01101110 01110100
|
|
|
|
|
Hello, thx for reply !
For adding COM to project, i just need to add COM strcuture to my program ?
Or something else ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
I don't really know that much about COM, other than it is language independent. I think it works like a DLL. I am pretty sure DirectX is in COM so it would be about the same way of using it.
- Matt Newman / Windows XP Activist
-Sonork ID: 100.11179
01001001 00100000 01010000 01100001 01100100 00100000 01001101 01111001 00100000 01010000 01101111 01110011 01110100 00100000 01000011 01101111 01110101 01101110 01110100
|
|
|
|
|
Hello,
Can anybody tell me whereabouts vc++ version 6 stores the directories that are entered under Tools, Options, Directories?
Everytime I switch computer or add a new profile I have to add these in manually again, and I'd like to just copy a file or create them programmatically.
Thanks,
John
|
|
|
|
|
In the all mighty registry, under
HKEY_CURRENT_USER\Software\Microsoft\DevStudio\6.0\Build System\Components\Platforms\Win32 (x86)\Directories\Include dirs
|
|
|
|
|
Go to:
Tools --> options --> Directories and you can set and change them in there or in the registry
"Isn't that the "write once, debug everwhere" language?" Tom Archer on Java...
|
|
|
|
|
Anybody knows how to mannually send the WM_SIZE message to a window given the handle of that window.
In other words, what is the params for SendMessage(WM_SIZE, ...,...)?
|
|
|
|
|
LRESULT CALLBACK WindowProc(
HWND hwnd,
UINT uMsg,
WPARAM wParam,
LPARAM lParam
); wParam
Specifies the type of resizing requested. This parameter can be one of the following values.
SIZE_MAXHIDE
Message is sent to all pop-up windows when some other window is maximized.
SIZE_MAXIMIZED
The window has been maximized.
SIZE_MAXSHOW
Message is sent to all pop-up windows when some other window has been restored to its former size.
SIZE_MINIMIZED
The window has been minimized.
SIZE_RESTORED
The window has been resized, but neither the SIZE_MINIMIZED nor SIZE_MAXIMIZED value applies.
lParam
The low-order word of lParam specifies the new width of the client area.
The high-order word of lParam specifies the new height of the client area.
You can use the LOWORD , HIWORD , MAKELPARAM , or MAKEWPARAM macros to assemble the wParam and lParam paramters.
Jeremy L. Falcon
"You do not know the power of the dumb side."
<nobr>
Homepage : Sonork = 100.16311 Maybe my mangling might misguide malicious miscreants momentarily?
|
|
|
|
|
If you are interested, you can simply call SetWindowPos or MoveWindow to change the size of the window as well, and windows will take care of the message sending for you.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
I'm writing an application which allows the user to set options in a property sheet with a few property page. The problem I'm having is with data validation. For each of the property pages, I've added some data validation when the user click the 'ok' button, i.e MyPropertyPage::OnOk()
The problem I'm having is that although the data validation is done, i.e
if (m_strName == "")
{
AfxMessageBox("Please enter a name!");
return;
}
when the OnOk() function exits from the return statment of the name check, the property sheet is closed?
I've tried commenting out
// CPropertyPage::OnOK();
to stop it called this method from the parent, but it is still called?
What I want is for the property sheet to stay modal, if the data entered is not valid.
Any help would be much appreciated.
Robert
fargo2k@hotmail.com
|
|
|
|
|
Override the CPropertySheet::OnApply
and set the modified flag
and after test if u want to return
return true else return false.
|
|
|
|
|
I am writing a console program that will go to a database at certian intervals. Basically, I am trying to implement an automated email system for expired records. My question comes when trying to decide between using a Timer or just have the program use Sleep().
So I want the program to check the database every x number of minutes (probally every hour) and see if anything needs to be sent.
My restrictions are that it has to be able to run on win98 and higher.
Any suggestions. Right now I am leaning toward Sleep(), but I am not sure if that is a viable business app solution.
Thanks in advance,
***********************
Tony Fontenot
Recreational Solutions
tony@recsolutions.com
***********************
|
|
|
|
|
If you are depending on executing something every minute, I would not rely on Sleep() since you don't know how long your database queries will take (unless you do some math to calculate the remaining sleep time, but still there are some things to consider). The query time might differ from call to call. If that minute is allowed to be fuzzy, then, a Sleep() might be the way to go.
Consider how you want the program to behave if a database query takes over (or about) a minute.
Consider that timers are system resources, and there might be none available at times.
Hmmm... well, can't think of anything more for the moment.
|
|
|
|
|
I would use a waitable timer. Because it will block your program while you are waiting, but if you expand your program in the future, you will have the ability to wake that thread up before the timer expires. With Sleep, your program will block for the same amount of time and this cannot be changed at runtime.
Here is an example from MSDN of how to use a waitable timer.
#include <windows.h>
#include <stdio.h>
int main()
{
HANDLE hTimer = NULL;
LARGE_INTEGER liDueTime;
liDueTime.QuadPart=-100000000;
hTimer = CreateWaitableTimer(NULL, TRUE, "WaitableTimer");
if (!hTimer)
{
printf("CreateWaitableTimer failed (%d)\n", GetLastError());
return 1;
}
printf("Waiting for 10 seconds...\n");
if (!SetWaitableTimer(
hTimer, &liDueTime, 0, NULL, NULL, 0))
{
printf("SetWaitableTimer failed (%d)\n", GetLastError());
return 2;
}
if (WaitForSingleObject(hTimer, INFINITE) != WAIT_OBJECT_0)
printf("WaitForSingleObject failed (%d)\n", GetLastError());
else printf("Timer was signaled.\n");
return 0;
}
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Hi,
I need to implement a SMTP server in my appl. Does anyone here have done this? Please, any source codes or ideas would be very useful.
Thank u very much,
Dirso.
|
|
|
|
|
An SMTP server? Or do you mean an SMTP proxy, that pushes the SMTP chat to the real SMTP server? If so, you can use my SMTP proxy class. It's a non-MFC C++ class.
http://www.codeproject.com/useritems/nishcsmtpproxymt.asp
Nish
The posting stats are now in PDF:-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
Updated - May 04th, Saturday
|
|
|
|