|
break; wrote: const char* acPath = (LPSTR)(LPCTSTR)csPath;
What are you doing here? Neither of the casts are necessary. Since you have Unicode, use:
const wchar_t* acPath = csPath;
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
When i run my application in my system the application window is looking good.But when i run my application in another system which has monitor size less than my system,scroll bar's are added both vertically and horizontally to the application window which is not looking good . Is there any way to restict the frame size auomatically during runtime so that no slide bars are added to it based on the environment in which we run.
|
|
|
|
|
When you create the main window, are the width and height parameters hard coded? If you used the resource editor the answer is probably yes. Use the function GetSystemMetrics() to find the screen size, and resize the window with SetWindowPos()
|
|
|
|
|
In SDK plateform,
How can i import a resource(say Dialog box)from a dll project to an exe project.
the aim should be not to hav the resource inside exe project, it will be included in dll project...
-- modified at 1:20 Monday 11th December, 2006
|
|
|
|
|
Can you be a little more clear about what you intend to do.
The easiest way would be to copy the resource into both projects. If the resource really is a DialogBox, then the size is not really an issue.
If you want to have a single resource and use it in both the exe and dll projects, then create a resource only dll ( a dll which contains no code and only resources ). Both projects can then load this dll and have access to the same resources.
|
|
|
|
|
Hi,
My intend is to hav that resource only in dll. the reason is memory at run time.
now by copting the resource in both project works fine, but my intention is to hav that resource in dll project only.
sir as u suggest to create a dll with resource only that i hav tried but it is giving an error 1813, using getLastError()..i.e the image file can not be find. Again i tyed to look for that image file in msdn, but didnt get proper solution..
|
|
|
|
|
All resource loading APIs take a HINSTANCE handle to the module containing the resource.
If the resource is in a dll, you use a module instance handle to the DLL.
|
|
|
|
|
hi..all
how can i use the function GetencoderClsid(L"",&CLSID);
in VC++ 6.
Please let me know about it ,it's urgent.
Thank you.
There Is Nothing Right & Wrong
|
|
|
|
|
|
What class is this method in?
|
|
|
|
|
Dear All,
I would know that what is Release mode and Debug mode ?
bye.
|
|
|
|
|
A release build is what you release to the public. A debug build is what you use when debugging. The debug version will contain a lot of extra information, hence have a larger size.
|
|
|
|
|
You can see an article about release & debug mode and different their on codeproject,search about it
|
|
|
|
|
How to pass the filename to my program on
right click a file -> select my app
I have modified the registry to show my app on menu & invoke my app.
How i pass the filename as commandline or anyother way
|
|
|
|
|
i think the file will be passed as the command line. Did u check the command line using GetCommandLine()?
nave
|
|
|
|
|
anilFirst wrote: How i pass the filename as commandline or anyother way
That's what the %1 was for that you added to the registry.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Am trying to oepn a text file( not empty file). Want to delete a specified portion of the file ( around 10 chars from the middle of the file). how can i do it? i've already calculated start position and end position. but don't know how to delete that part and again write that part.
Thanks in advance
kamalesh
|
|
|
|
|
Use feek and ftell functions.
Those two might help you.
bye.
|
|
|
|
|
One way is to read the entire file contents into a buffer, modify the buffer, and write the buffer back out to the file.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
Hello,
i am developing an application which i have to compare two wav files!Do you have to suggest me something(e.x. link)?How can i do it because i am newbbie on the issue!
Thanks
|
|
|
|
|
Hi all,
Simple question .... (funny that I can't remember how to do it)
I have variable:
char TestString[3];
How can one test if the TestString is Empty
I have tried the following, without success:
<br />
if (TestString == "")<br />
{ <br />
....<br />
}<br />
Thanx in advance
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
strlen .
Programm3r wrote: char TestString[3];
In this case, it will not be an empty string.Contains some garbage.
try,
char TestString[3] = {0};
or
char TestString[3] = "";
cout<<strlen(TestString)<<endl;
It will give you desired output. i.e. output will be 0, which indiacates empty string.
|
|
|
|
|
You need to do
if(strlen(TestString) == 0)
or
if(strcmp(TestString, "") == 0)
Remember that your string will not be initialised when you declare it though, so neither test is valid until you've put something into the string (NULL for the first character at the very least). Or you can do the following...
memset(&TestString[0], 0, sizeof(TestString));
Hope this helps,
Joel.
|
|
|
|
|
Your string
Programm3r wrote:
char TestString[3];<code></blockquote><br />
<br />
is not empty, it's random (junk) initialised (end it is not <code>NULL terminated!).
maybe the following code snipped will help you:
char TestString[3]="";
if (!strcmp(TestString, ""))
{
printf("empty\n");
}
else
{
printf("not empty: %s\n", TestString);
}
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|