|
hi pal thanx 4 ur reply,
but i've been using that i nead to create different popup menus at differnt locations
like iam creating a Explorer kind of thing i should get different menus dynamically when i select each item from a tree control of the explorer
for example the windows explorer like...
The menu generated should be changed dynamically when i change my selection in the tree
|
|
|
|
|
You'll need to dynamically create and populate the menu before displaying it. See CMenu::CreatePopupMenu() and related APIs.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
hi,
u can look into InsertMenu/ModifyMenu...(MF_POPUP)
hope this is of some help to u!
regards
uday
|
|
|
|
|
hi all,
iam a beginner and iam indulged in a project being developed in VC++
QUESTION:
How to access or manipulate the functions present inside the DLL without knowing the fn()name and the parameter values.plz do help me...
|
|
|
|
|
If you don't know the function name and parameter set, how do you know, what the function does and what it should return?
|
|
|
|
|
ok i accept,
then is there any way to get the fun name and parameter set in a generic way before i access the function from my program , and this all should happen dynamically
|
|
|
|
|
Yes and no. There's a way, how to get the name of the functions, but problem is with parameter set. The best you can get without disassembling is a number of bytes that should be transferred to the function.
If you look at the SDK tool called depends.exe, you'll see what can you get.
If this is enough for you, you can look at the ImageHlp library as described in MSDN. This will help you to parse the info stored inside the dll (which is PE executable)
|
|
|
|
|
In addition to the above response, you can also use the DumpBin.exe utility to see all publicly exported functions available to you.
The parameters needed and usage will still be needed in advanced though.
I Dream of Absolute Zero
|
|
|
|
|
Hey,
A sort question really. How do I get text from one of the lines in a listbox?
I thought I could do something like this:
SendMessage(listbox1, LB_GETTEXT, 1, 0);
But how should I then use a buffer to save the text?
humpa humpa
|
|
|
|
|
From the MSDN doc:
LB_GETTEXT
wParam = (WPARAM) index;
lParam = (LPARAM) (LPCTSTR) lpszBuffer; Parameters:
index
Value of wParam. Specifies the zero-based index of the string to retrieve.
lpszBuffer
Value of lParam. Pointer to the buffer that will receive the string. The buffer must have sufficient space for the string and a terminating null character. An LB_GETTEXTLEN message can be sent before the LB_GETTEXT message to retrieve the length, in characters, of the string.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
As Ravi said. Here is a small example:
int
GetListboxSel( HWND hCtrl_Source, char* szItem, const int nItemLen )
{
const int nIndex = (int)::SendMessage( hCtrl_Source, LB_GETCURSEL, 0, 0L );
if ( nIndex != -1 )
{
const int nLen = (int)::SendMessage( hCtrl_Source, LB_GETTEXTLEN, nIndex, 0L );
if ( nLen < nItemlen )
::SendMessage( hCtrl_Source, LB_GETTEXT, nIndex, (LPARAM)szItem );
else
*szItem = '\0';
}
else
*szItem = '\0';
return nIndex;
}
Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"
|
|
|
|
|
CString strAnswer;
CListBox* pListBox = (CListBox*)GetDlgItem(IDC_MY_LISTBOX_CTRL);
pListBox->GetText(m_plAnswers->GetCurSel(), strAnswer);
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I'm trying to wrap a pure MFC control into an ActiveX, and use it on an WTL App dialog.
Problem: TAB works spuriosly (it has some functionality within the MFC control's child controls), Return works not at all (the control doesn't see it).
Any ideas?
Here's the deal:
ActiveX Server: ATL DLL with MFC Support
ActiveX control:
ATL Full Control,
the MFC child window is created in OnCreate
Client:
WTL modal dialog based app, Control added to the resource.
Any stuff I need to add/call?
(I tried to add the OnPreTranslateAccelerator and SetFocus that ATL Wizard adds to a full control containing a windows control, but this didn't change anything)
HEEEEEEEEEEEEEEEELP!
[edit]Tabstop does work[/edit]
I never really know a killer from a savior boost your code || Fold With Us! || sighist | doxygen
|
|
|
|
|
hello everyone
can anyone tell me how to capture the dialog based control button key press events.i am usin g a vc++.net environement. my requirment is if i have a a button by id IDC_LEFT i want to perform an action as long the button is pressed down and should stop doin the action when released. how do i read that particular action and perform the required action.
anykind of information or help is appriciated.
thanx shashi
|
|
|
|
|
Hi all,
I have a word Add-in from which i will open a word new
document. For this document I want to remove maximize,
resize option. I'm able to remove the resize option using
style &= (~(WS_THICKFRAME));
and applying this style property to the document window using user32.dll
library imported function.
Similarly I tried to remove maximize but its not working.
Any help in this regard is highly appreciated either through C# or
VC++(native).
Thx & Regards
Satish Jupalli
|
|
|
|
|
What about removing WS_SYSMENU option
"I Think this Will Help"
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
I am displaying a windows form from within a TAPI event handler to display some information about an incoming call. However the forms window is not selectable. When the cursor is moved into that window it just comes up with the busy shape. My guess would be that it does not have any event handler associated with it. Can anybody help with this problem and how to fix it?
|
|
|
|
|
Create a modeless dialog or other window elsewhere in program.
Have your TAPI handler post messages to this window concerning the TAPI status.
Some window messages are not processed from within a handler, they are only processed the next time through the window's message loop and your TAPI handler is probably not in a regular message loop, as you suspect.
|
|
|
|
|
Hi all,
I'm trynig to show the main window of another process and it's driving me crazy!!!!
I get the process handle using
Process* MyProcess[] = Process::GetProcessesByName("EXCEL");
I found the MainWindowHandle property of a process
MyWnd = MyProcess[0]->MainWindowHandle;
But... how to use it. I wasn't able to find any way to make .NET 2003 accept the __int32 (IntPrt) the propery return in any window managing function.
PLEASE HELP ME!!!!
Maurizio
|
|
|
|
|
MGrosso wrote:
MyWnd = MyProcess[0]->MainWindowHandle;
How about:
ShowWindow(MyWnd, SW_RESTORE); I don't use .Net so this is just a guess.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi all guru!
I tried to get the file associated icon location by using following code. but shinfo.szDisplayName is empty. Could you please point out the error?
<br />
SHFILEINFO shinfo;<br />
memset(&shinfo,0,sizeof(shinfo));<br />
CString loc; SHGetFileInfo("c:\\po.txt",FILE_ATTRIBUTE_NORMAL, &shinfo, sizeof(shinfo), SHGFI_ICON|SHGFI_SMALLICON|SHGFI_ICONLOCATION);<br />
loc.Format("%s",shinfo.szDisplayName);<br />
DeleteObject(shinfo.hIcon);<br />
Thanks
|
|
|
|
|
The icon index is in iIcon not szDisplayName . If you want to retrieve the display name, you need to add SHGFI_DISPLAYNAME to the flags mask.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Looks like you got everything handled.
Does the file actually exist?
Maybe you did not include this part...
You must initialize Component Object Model (COM) with CoInitialize or OleInitialize prior to calling SHGetFileInfo.
|
|
|
|
|
Hi All,
To create a new desktop we use CreateDesktop which returns the handle of the newly created desktop. Now when the work is done how do I destroy this desktop. CloseDesktop function just closes the handle but does not destory it. Any other API?
--------------
Vaibhav...
|
|
|
|
|
Why are you differentiating between "close" and "destroy?" When CloseDesktop() is called, the handle is closed. What's to destroy?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|