|
Nooooo.
int y = 10:
mov dword ptr [ebp-4],10
int y(10):
mov dword ptr [ebp-4],10
Simple - move "10" onto the stack. In contast to a C'tor call which would look something like this for class CBase:
lea ecx, [ebp-4]
call @ILT + X(CBase::CBase)
Note the call )
There is no difference between y(10) and y = 10 - they are primitive types - built into the language and supported by CPU registers - this is not Java!
|
|
|
|
|
i am using OLE IPicture interface to load images but i am having troublr with the foolowing line of code
"OleLoadPicturePath(OlePathName,NULL,0,0,&IID_IPicture,(void *)(&Ipic));"
when i try to compile it the compile genertes a type casting error for parameter 5.
i think i am using the correct syntax. Can any one tell me what the problem is.
Aizaz
|
|
|
|
|
Aizaz wrote:
OleLoadPicturePath(OlePathName,NULL,0,0,&IID_IPicture,(void *)(&Ipic));
You only fed it 6 arguments for that function. No wonder~~~
Maxwell Chen
|
|
|
|
|
Its defined as :
STDAPI OleLoadPicturePath{
LPOLESTR szURLorPath,
LPUNKNOWN punkCaller,
DWORD dwReserved,
OLE_COLOR clrReserved,
REFIID riid,
LPVOID *ppvRet
}
So parm 5 is of type REFIDD - in C that expands to IID* or in C++ it expands to IID&. Your passing &IID_IPicture - IE IID*. Change it to:
OleLoadPicturePath(OlePathName,NULL,0,0,IID_IPicture,(void *)(&Ipic));
On a side note, 6 is also wrong. Its of type LPVOID* - or void**. So persuming your IPic is IUnknown* (or whatever) you pass (void**)&Ipic - so in total
OleLoadPicturePath(OlePathName, NULL, 0, 0, IID_IPicture,(void**)&Ipic);
|
|
|
|
|
It should be IID_IPicture and not &IID_IPicture
|
|
|
|
|
Hi!
I'm reading from a bitmap file using CFile.. without specifying if its binary or text mode..
Now I tried sending the bytes read from the bitmap file to a network...
Now the maching on the other side gets the bytes, and then displays the bitmap to its own screen..
the machine on the other side of the network gets the bytes completely, no data loss..
but he can't draw the bitmap from the bytes it received...
DO i have to specify the file that opened to be binary? or does it have something to do with the byte-ordering of two different machines?
|
|
|
|
|
Maverick wrote:
I'm reading from a bitmap file using CFile.. without specifying if its binary or text mode..
According to the Open() method, CFile objects are always binary.
Maverick wrote:
or does it have something to do with the byte-ordering of two different machines?
On the receiving machine, save all of the bytes received to a file. Then try and open the file with some imaging software. If the graphic is rendered correctly, you'll know that the bytes were received correctly.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Anybody have sources in Visual C++ to program a Bluetooth device? It's something to do with the Ericsson Application Tool Kit. Please help.
Thank you.
|
|
|
|
|
You have an Ericsson Tool Kit under Windows...??? arf, i've been looking for such for the 2 last months, so i decided instead for using Metrowerks CodeWarrior for the code i use inside the telephone, and the server is under linux for me.
Bluetooth is a quite deep part of the Nokia /SonyEricsson mobiles...
TOXCCT >>> GEII power
|
|
|
|
|
Hi,
Is there anyway to convert a .RTF document automatically to .PDF? When for example Acrobat Distiller is installed, there is a button to convert a Word document to PDF file. I want the same action but automatically without user doing anything.
Any thoughts about this?
Best regards,
Jens
|
|
|
|
|
Hi,
It might help if you can give more details. There
are "PDF toolkits" available to help create PDF files
programmatically but then you will need to "parse" the
RTF yourself.
Another way is "printing" to something like Adobe's
PDFWriter.
Regards
Mahendra
|
|
|
|
|
Hi
My collegue has programmed a library to export to .RTF files ... I can use this but some clients ask it to be .PDF .... I have installed Acrobat Distiller to print to PDF .. so printing to PDF itself is no problem .. Words supports that easily too ... The problem is ... This needs to be done from code itself.
If they click on button 'PDF' .. then the document is first build in .RTF and after that .. needs to be "printed" to .PDF file.
Greetings,
Jens
|
|
|
|
|
Print to Acrobat Distiller just like you would any other printer. The Acrobat Distiller driver will either prompt you for the target file, or it can be supplied programmatically.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Hi,
Yours is a "custom" application which needs to "create/ save as"
PDF documents? If that is true than you would need something similar
to what you have for RTF; there are commercial libraries available to
write PDF files as well.
Due Regards
Mahendra
|
|
|
|
|
Hi!!
Adding WS_THICKFRAME to dialog style adds the system icon to de dialog.
I just want to remove it (not to change) but the only way I found using dialog editor is removing WS_SYSMENU that aditionally removes close small icon too.
Any way to just get rid off the icon?
SetIcon(NULL,FALSE) doesn't work;
Thanks in advanced.
Carlos
|
|
|
|
|
Just commenting these 2 lines in OnInitDialog
works for me in both vc 6.0 & vc 7.x
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
|
|
|
|
|
Hello everyone,
I'm very sorry if this has been posted already, but my searches for a SOLUTION to this problem have been fruitless thus far.
If there is ANY type of error in either my embedded Visual C++ or my VC++ 6.0, the build hangs. I can still save and modifiy files, but my build menu is completely blacked out except for "stop build" which does not work.
Has anyone encountered this before?
Thanks in advance,
s.
|
|
|
|
|
Hello everyone:
I want to load a dialog from dll and display it into child view. How to realize it? Please help me.
Thank you.
-Freehawk
|
|
|
|
|
Load/Create the dialog with CDialog.
Now set the parent of your dialog to be child-view window, and resize the dialog accordingly.
this is a semi-hack, because the way to do it is to create a window that can host another window, or what I call a 'Pane Container' and a 'Pane'.
there's nothing too special about the pane, except that you set it's parent to be the container, but the container should 'remember' the pane it contains (store a ptr to it), and resize the contained pane when the container is resized, etc.
|
|
|
|
|
Thank you very much for the reply.
I will try it.
-Freehawk
|
|
|
|
|
anybody knows how could I add minimize & maximize button like those on the right top of most Dov/View application to a dialog control? I can't make it from resource editor by inserting a dialog.
|
|
|
|
|
found the solution already.
|
|
|
|
|
|
in the resource editor double click the dialog control to show it, right click the shown dialog choose properity, in style tab you can enable & disable minimize/maximize box.
|
|
|
|
|
i did see some works that shows how to read HTML from a dll file
but these functions didn't work on mine ...
it returns me something like that: " []<"
[] is a closed box , it's that what LockResource returns.
if i open the file, can i seek with FSEEK the position of this return to get my HTML code at last?
|
|
|
|