|
Hi
You can import the x.ico into the resources. Then delete existing IDR_MAINFRAME icon, and rename your new icon to IDR_MAINFRAME.
-Houari
|
|
|
|
|
kiran.pinjarla wrote:
I have an x.ico file and I want to set it as my default application icon,
that is .exe icon and application icon.
SetIcon will only work!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
hi all i want to use windows services API in project.i had written generic class for this purpose.i had included winsvc.h and lib Advapi32.lib throgh pragma statement like
#pragma comment(lib,"Advapi32.lib")
but when i build the project errors,where that is the function of that class that i m calling for windows service.
error LNK2019: unresolved external symbol __imp__CloseServiceHandle@4 referenced in function "public: __thiscall CWindowsService::~CWindowsService(void)" (??1CWindowsService@@QAE@XZ)
the class to which this function belongs is the generic class.and code used to make the object of this class is
CWindowsService o_obj;
o_obj.Test();
-- modified at 8:23 Tuesday 25th July, 2006
|
|
|
|
|
|
thanks for reply i m using vc++ 2003 not visual c++ 6 and my link error number does not match to that post.it is link2019.but it gone to porperties of project and link and then input i give the name of lib file and pasted that file in hte debug folder but still same problem.
Service error LNK2019: unresolved external symbol __imp__OpenThreadToken@16 referenced in function "public: bool __thiscall CAtlAllocator::Init(char const *,unsigned long)" (?Init@CAtlAllocator@@QAE_NPBDK@Z)
Service error LNK2019: unresolved external symbol __imp__RevertToSelf@0 referenced in function "public: bool __thiscall CAtlAllocator::Init(char const *,unsigned long)" (?Init@CAtlAllocator@@QAE_NPBDK@Z)
Service error LNK2019: unresolved external symbol __imp__SetThreadToken@8 referenced in function "public: bool __thiscall CAtlAllocator::Init(char const *,unsigned long)" (?Init@CAtlAllocator@@QAE_NPBDK@Z)
Service fatal error LNK1120: 3 unresolved externals
Tasleem Arif
|
|
|
|
|
Did you see MSDN and did you includes Requirements
whitesky
|
|
|
|
|
what are requirement of including lib file.i had found on MSDN to include lib file use #pragman comment(lib,"name") there was written that name will be searched in the current path and then other so i copied that lib in the debug directory.
and i had googled also but cannot found working answer related to that error number.
-- modified at 9:39 Tuesday 25th July, 2006
|
|
|
|
|
|
how to automate spreadsheet from visual c++ 2005 , i tried to do it as the msdn directions but i got louds of errors in a file called excel.tlh
|
|
|
|
|
identity_85 wrote: i got louds of errors
which errors did you get ??
|
|
|
|
|
errors like these about 200 errors:
debug\excel.tlh(1150) : error C2371: 'FontPtr' : redefinition; different basic types
debug\excel.tlh(1228) : error C2786: 'BOOL (__stdcall *)(HDC,int,int,int,int)' : invalid operand for __uuidof
debug\excel.tlh(1228) : error C2923: '_com_IIID' : 'Rectangle' is not a valid template type argument for parameter '_Interface'
|
|
|
|
|
CXan i get the VC++ Tutorial
|
|
|
|
|
|
|
Karthikeyan U wrote: CXan i get the VC++ Tutorial
on what topic???
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Karthikeyan U wrote: CXan i get the VC++ Tutorial
Yep, see here[^]
|
|
|
|
|
here[^]
and don't forget : SPEAK ENGLISH !!!!
|
|
|
|
|
|
Hello all,
i want to be able to read any file in binary mode and put the files content into a char array, but it just won't work except of text files. How can this be done?
Thanks in advance
<br />
char* Files::ReadFile(const char* file) {<br />
ifstream::pos_type size;<br />
char* file_array;<br />
ifstream file (file, ios::in|ios::binary|ios::ate);<br />
if (file.is_open())<br />
{<br />
size = file.tellg();<br />
file_array = new char[size];<br />
file.seekg (0, ios::beg);<br />
file.read (file_array, size);<br />
file.close();<br />
<br />
return file_array;<br />
}<br />
return "Unable to open file";<br />
}<br />
|
|
|
|
|
nmx_de wrote: but it just won't work
Please, when you have a problem, explain it clearly. " It does't work" is very unclear, it can be anything. We cannot guess what the problem is just by looking at the screen.
|
|
|
|
|
Sorry for that. Thought it would be clear as i might not be the only one ever who tried to read a file into an array.
When I read a text file, I get the content of the file properly.
When I read another file (for example pdf), i only get an output like this:
<br />
%PDF-1.5<br />
$??<br />
Maybe it's an encoding problem, because the string is follow by some special characters. (Took a look at it in UltraEdit)
<br />
%PDF-1.5<br />
%âãÏÓ<br />
149 0 obj <</Linearized 1/L 1097<br />
...<br />
Is it possible only to read the binary value of the file?
Regards, n.
|
|
|
|
|
thats right... if you write the file_array as that type of file say 1.pdf then if u open the file then you can get the excat data...
Do your Duty and Don't expect the Result
|
|
|
|
|
Wow, seems to be one of my bad hair days.
I still missed to provide some information. I don't want to have a pdf file (or any other binary file) as a result. I only want to get the binary representation of the file. And this has to be some kind of string or char array.
|
|
|
|
|
nmx_de wrote: I only want to get the binary representation of the file. And this has to be some kind of string or char array.
No, a binary file contains junk characters and if you try to display it, you will have junk characters on the screen. Try to open the file with notepad and you will see what's inside.
And what do you mean by 'binary representation' ?
|
|
|
|
|
What are you trying to do exactly ? And what is the purpose ?
It's normal that if you try to display the contents of a binary file, you will have junk characters. That's simply because the purpose of a binary file is not to be readable (by a human I mean). So, what did you expect ?
|
|
|
|