|
Are you sure you want to use MAKEINTRESOURCE , since it's intended for resource ID's and not DLL ordinals? Given the description of GetProcAddress , you can just pass the ordinal value in the lpProcName parameter, suitably cast to LPCSTR . I've never used ordinals with GetProcAddress , since they're so sensitive to changes.
Software Zen: delete this;
|
|
|
|
|
I never use ordinals either. I just read the description from MSDN on how to use ordinals, and it is identical to how to use numbers to load resources. So I realized the MAKEINTRESOURCE would do the trick.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
Hi all,
I've tried to find out the size of the client area of a MDI application. To me, the client area means the (application window size) - (tool bar size) - (status bar size) - (menu bar size). Usually, the size of this area can be retrieved by calling the function GetClientRect() of the ParentFrame of a View. However, I want to know the size of the area prior to the creation of a Document/View instance. I cannot call the GetClientRect() function because the ParentFrame object doesn't exist yet.
Does somebody know how to solve this?
Regards,
Willem
|
|
|
|
|
Any one know how to detect if a fullscreen application is running (for example: game, video, pp presentation, etc...)
thanks in advance...
|
|
|
|
|
You can get the active window handle (see GetActiveWindow function) and check the size (GetWindowRect function)
good luck!
Regards from Romania,
Razvan Serban
|
|
|
|
|
thx
|
|
|
|
|
hello
How to use round funcion in vc++.net ...??
I need to round off a float value, say 103.94568 to 103.95
Please help....
Salai
|
|
|
|
|
this is only a display issue...
printf("%.2f", 103.94568);
> 103.95
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
salaikumar wrote: I need to round off a float value, say 103.94568 to 103.95
What is wrong with the old-fashioned way: adding .5 and casting to int (that is throwing the decimals away)?
In your case you would additionally need to multiply by 100 before and divide by 100 afterwards to get the 2 decimal places.
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
Hello
i am working on VC++.Net
Could any one please tell me how to change the back color of a particular column(not all columns) in Datagrid control.
Thanks in advance
Salai
|
|
|
|
|
Hi All,
Is there anyway to make the "Send" call of CSocket in sycrhronous way?
-Sarath
Currently I am working as software engineer at Network System Technologies Pvt. Ltd (NeST). Most of my project are in C++. Most interesting are is GUI programming.
|
|
|
|
|
need a expert to help,how to set images onto outlookbar's folder?
how to use setfolderimagelist(...)?
|
|
|
|
|
Hallo
Assume I have some classes...
One class for communication and their derived for the exteranl machine that is used. There for class DEVICE provides some virtual functions and some normal member function...
Now i want to write some libraries ( *.dll ) and they should also use the class DEVICE... but only the nonchangeable methods write and read. So i'd like to pass two function pointers the dll -- no problems so far...
But how about creating the function pointer...
I retrieve: cannot convert from 'void (__cdecl CDEVICE::*)(int,char *)' to 'void (__thiscall CDEVICE::*)(int,char *)' or other proplems i cant fix ...
this is what i have:
<br />
class CDEVICE<br />
{<br />
public:<br />
typedef void (CDEVICE::*sendfunc)(int,char*);<br />
sendfunc sendout;<br />
<br />
void _cdecl dev_out (int p_adr,char* devcmd);<br />
};<br />
...
<br />
CDEVICE::CDEVICE()<br />
{<br />
sendfunc = dev_out;<br />
}<br />
Please Help
THX T
|
|
|
|
|
short answer: you can't use pointers to non-static member functions without an instance of the object.
long answer: search CP for "member function pointer". there are a lot of articles with tricks to make doing that easier.
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
Is there any way to define a shortcut to a class memeber?
For instance, a reference to System::Windows::Forms named WinForms or something.
I tried #define but I get a compiler crash in VC2005 Express Edition.
|
|
|
|
|
did you tried with typedef keyword ?
typedef System::Windows::Forms WinForms;
otherwise, you could use the using directive, but it's not recommended to.
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Hi to all. My name is Zoli and i'm in trouble in reading from a file at a given offset.
More exactly what can i do if - let's say - i calculate from the RVA of an exe's section
the fileoffset and i want to read the entire (or some bytes)
section to display in text format.
Or how can i read some bytes from an exe at given fileoffset
(fileoffset that was calculated from an RVA).
I hope i made my problem to be clear for you!
Any suggestion is apreciated! (Sorry for my horrible english). Thanx!
|
|
|
|
|
Hello. You can try this (read 12 bytes starting with offset 895) :
<br />
HANDLE fp;<br />
DWORD count;<br />
unsigned char buffer[12];<br />
fp = CreateFile ("File.name",GENERIC_READ,FILE_SHARE_READ,NULL,OPEN_ALWAYS,0,NULL);<br />
SetFilePointer(fp,895,NULL,FILE_BEGIN);<br />
ReadFile(fp, buffer, 12, &count, NULL);
CloseFile(fp);<br />
If you decide to use fopen, make sure you open the file in binary mode ("rb").
Kakan
|
|
|
|
|
I use CreateFile().
Yhank you very much!!
|
|
|
|
|
Your welcome.
But I missed a couple of (minor) details:
1.
The argument OPEN_ALWAYS should of course be OPEN_EXISTING.
2.
The comment "// Read the sector, 512 bytes", should have been
"// Read 12 bytes "
The eternal "cut and paste" syndrom.
Kakan.
BTW, you know you can give points to a response that helped you with your problem?
|
|
|
|
|
I'm curious what was wrong with the CreateFile() suggested here.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
it was good. I was curious what answer would give other peoples.
|
|
|
|
|
who knows the most simple way to append a menu with a icon?
for my application I only have 3 menu items need a icon attached as extra data.
a string attached would be much better, but not a must.
thank you
|
|
|
|
|
Please help me...
Is there anyone know how to take this kind of program into practice in general:it is been started just after booting,for the user who is not the administrator.And when the program is running,the user can only do things that the program permit and can't do anything that the program doesn't permit,including exiting and returning to the operating system.If wants to do so , a password is needed.Whithout the pass word,exiting is the same thing as shutting the computer down.
Thank you!
|
|
|
|
|
luyongxing wrote: Is there anyone know how to take this kind of program into practice in general
Yes, most of the people in this forum can help you but what is exactly what you want?
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|