|
Ed Gadziemski wrote:
Why, Mazy, you disobeyed the order to Send Source Code!!!! If he'd wanted a link, he would've asked you to Post Article Link!!!
Hey this is very common way in answering questions. Many times people don't ask foe link but after that when somebody give them some link they become glad for it.So why should I disobey.
|
|
|
|
|
That was a joke. You see, the person who wrote "Send Source Code!!!!" was making demands on CP members as if he were King or President. Similar to "You must do this. I command you." So, the joke was that you did not give him what he commanded. Sorry if I was not clear.
|
|
|
|
|
I create a ListBox in a Dialog dynamically!I want to capture
the message LBN_SELCHANGE of the control ListBox,I create it like this:
m_ListBox.Create (WS_CHILD|WS_VISIBLE,rc,this,IDC_LIST_BOX);//CListBox m_ListBox
And I use the following code to check if the dialog capture
the message:
LRESULT CMyDlg::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
if(message==LBN_SELCHANGE)
{
AfxMessageBox ("LBN_SELCHANGE");
}
return CDialog::WindowProc(message, wParam, lParam);
}
But to my surprise,I found that it can capture the mesage only once,it occured at the begin of the program.after that ,it can't be captured.
How can solve the problem!
Thank you!
Don't look at me in that way!
|
|
|
|
|
How can I write text and draw lines in a MS Word Application from an MFC Project without DOC/VIEW Architecture???
Please send me some source code!!!!
|
|
|
|
|
I THINK there is an article in CP about MS Word Application.Search this site.
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|
|
Do you know how should i test if a directory exists in the file system, or a file?
Is that an article on CP regarding this subject?
rechi
|
|
|
|
|
#include <io.h>
if (_access(dir, 0)==0)
then it exists
-c
Cheap oil. It's worth it!
|
|
|
|
|
is this a better method that using CFindFile? does the _access function verify the user has access to the path as well, instead of just that it exists?
-dz
|
|
|
|
|
with mode 0, _access only checks for existence. other modes can test for read/write access.
-c
Cheap oil. It's worth it!
|
|
|
|
|
Or: if( ::GetFileAttributes( pszFSpec ) == FILE_ATTRIBUTE_DIRECTORY ) ...
Neville Franks, Author of ED for Windows. www.getsoft.com
|
|
|
|
|
heres what i use..
BOOL CCommonFunctions::DirectoryExists(CString strPath)
{
CFileFind finder;
if (strPath.Right(1) != "\\")
strPath += _T("\\");
strPath += _T("*.");
BOOL bWorking = finder.FindFile(strPath);
if (!bWorking)
return FALSE;
finder.Close();
return TRUE;
} use it by saying:
if (!CCommonFunctions::DirectoryExists("C:\\Temp\\")
AfxMessageBox("ERROR!");
and for files..
BOOL CCommonFunctions::FileExists(CString strFilename)
{
CFileFind ff;
BOOL result = ff.FindFile(strFilename);
if (!result)
return false;
ff.Close();
return true;
} use it by saying:
if (!CComonFunctions::FileExists("C:\\test.txt")
AfxMessageBox("ERROR!"); that should help.. if someone has a better written function let me know..
-dz
|
|
|
|
|
I have a strange problem:
Because we need to run a process under another account (for COM+ rolebased security). To do so, we create a little startup application that displays a dialog where the user can enter its credentials. Then it uses the API call
CreateProcessWithLogonW to startup the real app. After this, our help does not work anymore. We use Windows 2000/XP with HTML help.
Does anyone have an idea?
Thanks,
Remon
|
|
|
|
|
An idea: Check the permissions on the HTML help directory and files.
|
|
|
|
|
Thanks for your reply.
It was much simpler. The default directory when running under another account was not the same (not the module directory). Therefore the helpfile could not be found.
|
|
|
|
|
Where to get HTTP proxy sources?
I mean REAL HTTP.
|
|
|
|
|
Go to sourceforge.net and search for "HTTP proxy". There are several projects under work that may suit your needs.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hi,
I am trying to thorughly test out some image processing code I have developed using GDI+.
I am wanting to test it with bottom-up scanline images, btw. the stride member of the bitmapdata class indicates this.
My problem is where can I get a bottom-up scanline image from!
Cheers
Richard
|
|
|
|
|
all bitmap files are bottom-up scanline. so a LoadBitmap might be what you need.
|
|
|
|
|
All of a sudden I'm having trouble opening my workspace in Visual C++ 6.0. When I try to open the workspace, it acts as if it's opening and has the status bar at the bottom to make it look like everything is fine, but then nothing comes up. No files open and the classview information doesn't show up. If I open up another workspace and then try to insert the project into that other workspace, I get an error message that just says "Out of Memory". Any ideas on what might be happening?
It started after I tried to run my program in Debug mode and my system blue-screened on me. I had to turn off my computer and then turn it back on and ever since then, it's been giving me this error.
|
|
|
|
|
No good answer, but the first thing i would do is delete all the .opt, .ncb, .aps, .clw, .plg and *.pch files in that project's folder(s) (these are all created as part of the build process).
-c
Cheap oil. It's worth it!
|
|
|
|
|
Thank you! Thank you! Thank you!
|
|
|
|
|
I guess that got it
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?
|
|
|
|
|
I want a sample program to create two threads & only one thread access the CList object at a time. that is, one thread uses some(i don't know which) synchronization object to lock the CList object & writes to it and then releases the CList object. Next another thread does the same process, but instead of writing, it reads from the CList.
can anybody help?
Rsh
|
|
|
|
|
I'm sorry but time is not my friend right now to make an example, but you can start searching for this on MSDN: CMutex or CCriticalSection.
Hope this helps.
PS: if you have installed the MSDN Help from Visual Studio.NET then use this address:
ms-help://MS.VSCC/MS.MSDNVS/vccore/html/_core_Multithreading.3a_.How_to_Use_the_Synchronization_Classes.htm
Andres Manggini.
Buenos Aires - Argentina.
|
|
|
|
|
You should use something like this:
CCriticalSection cs;
void CMyClass::FunctionThatAccessTheCList ()
{
cs.Lock ();
cs.Unlock ();
}
Best regards,
Alexandru Savescu
|
|
|
|