|
SeeHere[^]I think its good
whitesky
|
|
|
|
|
Thanks, Mr. Whitesky, that is a very useful article!
|
|
|
|
|
can any one tell me the ftp link library in VC++
|
|
|
|
|
creation of XML in vc++.
plz send me as early as possible
|
|
|
|
|
printf() will do the job.
0 bottles of beer on the wall, 0 bottles of beer, you take 1 down, pass it around, 4294967295 bottles of beer on the wall.
Awasu 2.2.2 [^]: A free RSS/Atom feed reader with support for Code Project.
|
|
|
|
|
I didn't get that answer so plz send me clearly. In my program iam created XML file I want to add the files to that.plz any one give me the solution
|
|
|
|
|
This is Brute force method in which you can use the Format of CString to put the value in the text using the xml format and save it in .xml format .
fstream m_fXmlWrite;
sAddHeader.Format(""<"?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>"); m_fXmlWrite<<sAddHeader<<endl;
Regards,
FarPointer
Blog:FARPOINTER
|
|
|
|
|
Hey, I'm in a good mood tonight
void
main()
{
printf( "<foo>\n") ;
printf( " <bar> Eazy if ur l33t!!! </bar>\n") ;
printf( "</foo>\n") ;
}
0 bottles of beer on the wall, 0 bottles of beer, you take 1 down, pass it around, 4294967295 bottles of beer on the wall.
Awasu 2.2.2 [^]: A free RSS/Atom feed reader with support for Code Project.
|
|
|
|
|
hello every1!
I am creating a simple static library file. I hava a string table in a library. These is a function getString which retrieves string from a string-table.
Now i have to use LoadString function in getString.
int LoadString( HINSTANCE hInstance,<br />
UINT uID,<br />
LPTSTR lpBuffer,<br />
int nBufferMax<br />
);
Then in this case what should be the first argument for the LoadString(). n how should i get this hInstance??
Thanks in advance!
|
|
|
|
|
hi,
use AfxGetInstanceHandle() to get the first value of LoadString()
chawda
|
|
|
|
|
In addition, note that instead of ::LoadString you can use the similar member of CString class. In this case is easier to load strings of any length.
-- modified at 5:57 Tuesday 27th June, 2006
|
|
|
|
|
hi!
Thanks for the replies!
there is another problem! I am bulding this project without MFC support. So I selected New->Win Static Library. Also i unchecked MFC support.
Now while calling this getString method, i need handle for the application which is using the library. When i tried defining getString prototype, it gives me error as HINSTANCE is undefined identifier.
I am defining getString as
class CCommonStrings <br />
{<br />
public:<br />
void GetString(HINSTANCE hinst);<br />
CCommonStrings();<br />
virtual ~CCommonStrings();<br />
<br />
};
what should be done here?? Is HINSTACE only avlble in MFC?
|
|
|
|
|
So you actually are building a static library, and not an MFC static DLL. In this case, I think you can use
HINSTANCE hInst = (HINSTANCE)GetModuleHandle(NULL);
The HINSTANCE type is defined in a Windows header file. You should include it after stdafx.h :
#include "stdafx.h"
#include <windows.h>
Or better put #include <windows.h> into stdafx.h and rebuild the project.
|
|
|
|
|
hi viorel!
thx a lot buddy! that solved my problem!
|
|
|
|
|
|
hello guys!
i am facing new problem now!
I checked everything but i am getting error 1814
i.e "The specified resource name cannot be found in the image file. "
Someone told me that we can not use string tables in a static library. And if we use it, then we have to include that string table in the apllication along with a library.
is it true!
|
|
|
|
|
if i keep menu name as file in that we have items like open, exit,name1.if i want to change the name1 to some other name what should i do
|
|
|
|
|
I think ModifyMenu can help. Something like this:
::ModifyMenu( hMenu, ID_MY_MENU_ITEM, MF_BYCOMMAND, ID_MY_MENU_ITEM, "New string");
|
|
|
|
|
BTW. Why do you want to keep menu item strings in files?
Ovidiu Cucu
Microsoft MVP - Visual C++
|
|
|
|
|
I think he wants to put the file name in the menu, like a MRU list.
|
|
|
|
|
iam doing just like in windows media player.in meid player once we open any application then the path of that application i sstroed in the menu.when we click again we
should run that program.
|
|
|
|
|
on equestion you want to save paths in a file
whitesky
|
|
|
|
|
|
I think registry is good instead file
whitesky
|
|
|
|
|
If you want MRU files list, just create an SDI/MDI application using MFC AppWizard.
This functionality will be implemented by default in framework, and nomore sweat for you.
Ovidiu Cucu
Microsoft MVP - Visual C++
|
|
|
|