|
I think CArray is type-safe too.
But do you see the Table of “Characteristics of MFC Collection Classes” in MSDN? The last column is “Is type-safe”, in this column CArray is “No”.
Maybe it’s a publishing bug.
Thanks,
Ray
|
|
|
|
|
I found the list. Who cares ? You still would be better off not to use it.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
i am making a board game in MFC. i want to know how to insert a picture in application is there any simple tutorial. or just tell me how to use CBitmap class my pieces are still out side the board
|
|
|
|
|
Just insert a picture control in the dialog template. You can then assign it an icon or a bitmap.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
This is probably a very easy problem, but I haven't been able to find out how to do it.
I want to enter the text strings used in my application in a string table resource, and then use the strings from the table as captions and text on labels and buttons.
well... how do I do it?
Thanks for helping a newbie
Oh, I'm using VS 2003 and the .NET framework btw.
|
|
|
|
|
Nobody knows? I would really appreciate the help...
|
|
|
|
|
Am I posting this in the wrong forum? Does nobody know this? I'm confused.
|
|
|
|
|
is there a way to create a directory like this
"C:\somedir\subdir1\subdir2\subdir3"
when the directory "C:\somedir" does not already exist?
i have tried using CreateDirectory() but it seems to be only able to handle one directory at a time,
|
|
|
|
|
SHCreateDirectory
Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!
Painted on the side of a dog trainer's van: SIT HAPPENS
|
|
|
|
|
hmm, none of the headers i have for Visual C++ seem to have this function, nor do any of the headers for Dev-C++ (MinGW),
|
|
|
|
|
Minimum operating systems Windows 2000
You'd have to change your _WIN32_WINNT define in stdafx.h to 0x0500.
I don't think there is another way of doing it unless you write your own routine using splitpath or the like.
Painted on the side of a dog trainer's van: SIT HAPPENS
|
|
|
|
|
This would work
system("MD c:\\somedir\\sundir1\\sundir2\\sundir3");
|
|
|
|
|
You'll need the Platform SDK. Look in Shlobj.h .
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I really hate to be mean, but perhaps you should read more carefully
"none of the headers i have for Visual C++" that would include "shlobj.h"
|
|
|
|
|
Most folks that pose such a question about missing functions are ignorant to the fact that a Platform SDK even exists, or that perhaps it contains newer prototypes. I was just making sure you had not overlooked that. Glad you're ok!
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Visual Studio 6.0, C/C++
I would like to run a command (batch) file from within
my app that, among other things, copies some files that
are passed to it on startup.
In the 4th parameter of ShellExecute() I have 2 parameters
separated by a blank space.
=== the command file: copy.cmd
@echo off
REM the echo command is a dignostic.
echo 1 >> log.txt
copy %1 c:\dir1
copy %2 c:\dir2
=== the Shell Execute() call
ShellExecute(NULL, "open", "copy.cmd","C:\\file1.txt C:\\file2.txt", NULL, SW_SHOWNORMAL);
When this runs I get a quick flash of the screen.
I'm guessing that a command window is opening and
immediately closing.
The command file does not seem to run.
I've tried various machinations like running
cmd.exe in parameter 3, but still can't get
my command file to execute.
Any help would be very much appreciated
Robert
|
|
|
|
|
Check out CreateProcess().
Kuphryn
|
|
|
|
|
Thank-you Kuphryn for your help!
|
|
|
|
|
You should specify the fifth parameter.
For example:
I put copy.cmd, a.log, b.log all in my d:\\temp.
ShellExecute(NULL, "open", "copy.cmd", "a.log b.log", "d:\\temp", SW_SHOWNORMAL);
Ray
|
|
|
|
|
Thank-you for your help, Ray.
Yup, I've been ignoring the 5th parameter!
Got it working now.
|
|
|
|
|
Hi Robert,
You need not to specify fifth parameter. I have tested the following on my system:
HINSTANCE hInst = ShellExecute(NULL,NULL,"c:\\test\\copy.cmd","c:\\aa.txt c:\\tt.log","",SW_HIDE);
and this is working fine on my system.
Hope it will help you
Ritu Kwatra
|
|
|
|
|
Thank-you for your help, Ritu.
I've been ignoring the 5th parameter.
Got it working now.
|
|
|
|
|
<href ="www.google.com"="">
|
|
|
|
|
Can anybody tell me how to define, where a toolbar is displayed in a CRebar-Object. When I ad an second toolbar to a CReBar, this toolbar is displayed anywhere in the left free area od the CReBar. But I want the single toolbars displayed side by side.
Any ideas?
Gabriel
|
|
|
|
|
Hi, whenever I try to call OnOpenDocument within a function in my CDocument derived class, I get a debug assertion that I can't understand/
Example:
void CMyDoc::Whatever()
{
//call OnOpenDocument with pathname
CMyDoc::OnOpenDocument("C:\\whatever.txt");
}
This will cause a debug assertion at:
if (!CRichEditDoc::OnOpenDocument(lpszPathName))
return FALSE;
How do I fix this? It crashes on AssignCopy(SafeStrlen(lpsz), lpsz); at STRCORE.cpp
Thanks
|
|
|
|