|
While in Word, right-click the picture and select Copy from the context menu.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Yes, I know this, but I cannot copy the image in my rtf editor which is a dialog box based app.
|
|
|
|
|
|
I have a program which load the child dialog first as in LOGIN screen. then, transfer user info to the main program. the problem is if user decide not to login and press the cancel button, the child dialog will exit but still load the main program. what function do i put in the cancel button to terminate the program? i tried to use DestroyWindow(), it will exit program but also give application error. any help?
|
|
|
|
|
Use PostQuitMessage .
Robert-Antonio
"A flower walked around a meadow. She saw a beatiful human and plucked off his head."
|
|
|
|
|
Thank you much! btw, the main program shadow still flash before exit. any idea to fix this?
|
|
|
|
|
What type of application are you using ? SDI/Dialog based ... ?
In the case of the SDI application, you can show the child dialog in the OnNewDocument function and if the user selected cancel, return FALSE in this function. This will not load the document and will exit automatically the program.
|
|
|
|
|
i'm using MFC dialog base
|
|
|
|
|
Hi
Is there any way by which i call adobe plugin *.api files in my vc application and call its functions.
|
|
|
|
|
I don't think so. Because Adobe provides SDK mainly for creating plugins for adobe acrobat itself. Only Acrobat is able to know/process the exported functions in the *.api files. I think acrobat SDK doesnot provide any API to process the exported functions in *.api which we can use from our own applications.
...always be cool
|
|
|
|
|
Actually I have loaded the *.api file by changing its name to *.dll. I got a pointer to first function ( called in the plugin by acrobat) PlugInMain().
The difficulty is that I dont know wat the parameters ?
Any help will be greatly appreciated..
Thanks in advance..
bye
|
|
|
|
|
Whether how to know belongs HWND to CScrollView or to a derivative class?
Best regards,
Eugene Pustovoyt
|
|
|
|
|
HWND is a handle you cant determine to which class it belongs too. You can somehow determine to which thread it belongs too.
Still Alive!!!
Thank you God.
|
|
|
|
|
Strictly saying, HWND cannot be "derived" from CScrollView , because HWND points to a Win32 entity, while CScrollView is a MFC class.
If you want to resolve, whether the window has scrollbars, use
if (GetScrollInfo(hWnd, ...) == TRUE)
Or, if you have the CWnd -class of the window, use simpler
if (wnd->IsKindOf(RUNTIME_CLASS(CScrollView)))
Robert-Antonio
"I launched Norton Commander and saw, drive C: on the left, drive C: on the
right...Damn, why I need two drives C:??? So I formatted one..."
|
|
|
|
|
if (wnd->IsKindOf(RUNTIME_CLASS(CScrollView)))
Tnat's all I need. Thank you very much.
Eugene Pustovoyt
|
|
|
|
|
wnd is not a handle to the window it is an object of CScrollView your question was wrongly framed.
Still Alive!!!
Thank you God.
|
|
|
|
|
I wrote follow ...
CScrollView * pScroll = (CScrollView*)CScrollView::FromHandle(hWnd);
if (pScroll->IsKindOf(RUNTIME_CLASS(CScrollView)))
Thank you again.
Best regards,
Eugene Pustovoyt
|
|
|
|
|
This method should work, but only in the UI thread of your app:
CWnd *pWnd = CWnd::FromHandle(hwnd);
if (pWnd->IsKindOf(RUNTIME_CLASS(CScrollView)))
{
}
Roger Allen - Sonork 100.10016
Roger Wright: Remember to buckle up, please, and encourage your friends to do the same. It's not just about saving your life, but saving the quality of life for those you may leave behind...
|
|
|
|
|
Thanks Roger for addition.
Eugene Pustovoyt
|
|
|
|
|
Please help me I lost my night sleep. Tell in simple code.
From my VB client I am passing simple string "Siddharth", to a win32 dll function GetUserName(DATATYPE)(if DAtatype is BSTR or wstring tell me how to convert it into string in dll function declaration). My program should run in 98 as well as NT. I am trying lot of examples but they all are for long. When I convert it to string nothing works out.
VB client
Dim x as string
x = "String"
GetStringFromVb(wstring *)
end
Win32
GetStringFromVb(wstring*)
{
vector MyString;
MyString.push_back(wstring);
{
//..Lot of string manipulation
}
}
One more issue. in the win32 DLL.h if I declare stl parameter, it is not accepted by the compiler.
|
|
|
|
|
Widebytetomultibyte will help you convert wstring to string.
But since the input is from VB i guess it must be BSTR
so to convert BSTR to string
put USES_CONVERSION as the first line in the function
and when you want to convert BSTR to string
use this macro OLE2A to finish the job.
Still Alive!!!
Thank you God.
|
|
|
|
|
Bulls eye boss, in identifying the problem. Really U are great. I am trying it. Will get back to you.
One point I want to clarify USES_CONVERSION is not included in Index part of MSDN. Nor OLE2A
|
|
|
|
|
SiddharthAtw wrote:
Really U are great
humm, ab chane ke jhad pe mat chada.
Still Alive!!!
Thank you God.
|
|
|
|
|
Meri kya aukaat ki guru logo ke chana ka Jhad par chadao. It gave me breather, believe me.Right now experimenting with the issue.
|
|
|
|
|
Mr.Prakash wrote:
humm, ab chane ke jhad pe mat chada
jhad chana chane ka jhad chakkar ke hai
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|