|
|
Maybe it was only ever exported by ordinal.
The Settlement Program is something that came out of the anti-trust suit: this is one of the 'revealed' APIs. If you get hold of a recent Platform SDK (December 2002 or later, currently at February 2003), you'll find this function in ShlObj.h. I assume that the appropriate import library (shell32.lib?) contains the necessary import to call the function.
I stand by my earlier statement that this is the wrong way to do it anyway.
|
|
|
|
|
Hello all:
can any one please help me how can I get HGLOBAL for the data contained in CRichEditCtrl ,I've to strore the data as BLOB and the class i am using for BLOB need HGLOBAL for that data..please help me in this context...
Muhammad Ahmed
ahmed
|
|
|
|
|
Use CRichEditCtrl::StreamOut() and write your own stream callback function, in that you copy raw bits from rich edit control to HGLOBAL .
See the EDITSTREAM and CRichEditCtrl documentation for details.
Robert-Antonio
|
|
|
|
|
thanks alot brother..you solved the problem almost 95 %
Regards
Muhammad Ahmed
ahmed
|
|
|
|
|
the callback function is called, passing the data in segments, so should i allocate memory on the heap for each call and the integrate the whole data in a newly allocated memory or is there a way to keep appending data to the buffer allocated only once....(or is there a way to find in advance how much buffer we should have?)
thanks
ahmed
|
|
|
|
|
The callback function takes the cb parameter, which contains required size of CRichEditCtrl data. You can grow the HGLOBAL memory with GlobalRealloc .
Robert-Antonio
|
|
|
|
|
hello every body
I want to know how can i end an sdi application like what we do in the Dialog application by calling CDialog::OnOk()
Best Regards
|
|
|
|
|
I believe the best practice is to post a WM_CLOSE message to your CFrameWnd-derived object. Something like that: AfxGetMainWnd()->SendMessage(WM_CLOSE);
|
|
|
|
|
thank u for it is working now
Best Regards
|
|
|
|
|
Hi!
I want in my program to be able to input text into an edit control and instead of having to move the mouse and click on the button to get the text input, I want it so that when you press enter, rather than closing the dialog, it will work the same as clicking on the button.
Can someone please help?
Thankyou
Ashman
|
|
|
|
|
I have done this some time ago. I don't know exactly how I have done it anymore, but I think I have used CWnd::PreTranslateMessage. If you overload it in your dialog class you can capture the key event before it is sent to the window!
|
|
|
|
|
Hi
I think to deactivate Enter Key u have to cancel OnOk() in the virtual member function like the following:
//////////////////////////////////////////////
void CanyDlg::OnOK()
{
// TODO: Add extra validation here
//CDialog::OnOK();
}
//////////////////////////////////////////////
Best Regards
|
|
|
|
|
Capture the WM_COMMAND message for your default button (lets say here your default button has the ID IDOK) by overriding the relavant function, CYourDialog::OnOk in this case, then rather than calling the base CDialog::OnOk, move the focus to your edit control, either like this:
GetDlgItem(IDC_MY_EDIT_CTRL)->SetFocus();
Or like this:
SendMessage(WM_NEXTDLGCTL, (WPARAM)GetDlgItem(IDC_MY_EDIT_CTRL)->GetSafeHWnd(), TRUE);
The difference between them is the second is usually more suited to moving the keyboard focus around a dialog box as it updats the button borders correctly, so in full:
void CMyDialog:::OnOk()
{
if(CWnd::GetFocus() == GetDlgItem(IDC_MY_EDIT_CTRL))
{
// edit control focused, so do normal stuff
CDialog::OnOk();
}
else
{
// move focus to edit control
SendMessage(WM_NEXTDLGCTL, (WPARAM)GetDlgItem(IDC_MY_EDIT_CTRL)->GetSafeHWnd(), TRUE);
}
}
This will make enter move the focus to the edit control if something other than the edit control is foucsed, or make enter behave as normal if it is the edit control that's focused
|
|
|
|
|
That's all U need in MFC. I know very similar solution in win32sdk. If U need tell?
Cheers!
Siddharth
|
|
|
|
|
hi Ashman,
all you have to do is to set the focus on the specific control... you can use
(CEdit*)GetDlgItem(YOUR_Edit_ID))->SetFocus(); to avoid you to move explicitly your mouse upon the EditBox, and in the OnInitDialog() , you tell which button to be pressed when the user presses Enter key by giving it the property Default
TOXCCT
|
|
|
|
|
I want to initialize a executable, making OS to search for the file.
STARTUPINFO si = {sizeof(si)};<br />
PROCESS_INFORMATION pi;<br />
TCHAR szCommandLine[1024] = {0},*pszCommandLine = 0;<br />
<br />
DWORD lFileName = <br />
SearchPath(NULL,(LPCWSTR)"YPager",(LPCWSTR)".exe",(DWORD)sizeof(szCommandLine), szCommandLine, *pszCommandLine);<br />
<br />
BOOL bCreate = CreateProcessNULL,szCommandLine,NULL,NULL,FALSE,0,NULL,NULL,&si,&pi);
there is no complier error but szCommandLine cannot fill the path.
Any other suggestions to achieve the same goal is appreciated.
Cheers!
Siddharth
|
|
|
|
|
It will not help you to get a response faster!
|
|
|
|
|
There was a bit problem with my server. Hence it's like that. Any way sorry if anyone get anoyed
|
|
|
|
|
Hi,
I use VC6 (SP5) in Windows XP Pro (SP1). I wanted to add Greek/Chinese strings. I edited the .rc files in a Unicode editor, saved the file as UTF-8. But, now, VC6 has problems handling the file. But, if I save it as a normal file, the strings are garbled.
How do I add other language strings to my resource file and what shd I use to compile it?
TIA
MRK
|
|
|
|
|
I've noticed that VC6 has problems in dealing with language strings, especially unicode characters. What we do normally is create the structure of the resource file using the VC resource editor, then have the translators to use their text editor (I think they use TextPad), re-include the modified resource file in Visual Studio. DO NOT modifiy in any way the file after it has been translated - do not change dialogs, not accelerators, nothing. If you do get a saved copy of the translated version and copy and paste the text using a text editor to replace the garbled text.
VC7 seems to have addressed the problem.
Hope that helps.
|
|
|
|
|
I want to make a wizard. For example i have four dialogs. The last one is my main dialog.
Now i open the first dlg. From this dlg i want to open the next dlg with a button, but the first one doesn´t close.
How can i check if the second dlg is opened and i´m able to close the first one.
maybe there is another way to create a wizard!?
J.J.
|
|
|
|
|
|
|
I have source code for a DLL created in C++ .net, I want to debug this.
I have created a second project (console application ) in the same solution ,for calling a particular function from the first project and passing parameter to it.
But when I tried to call that function
int DNAPrintExport InstallPrinter(const char* cpstrPrinterData)
{
}
using the following code in the second project
int abc=InstallPrinter("Hello");
I am getting error C2065: 'InstallPrinter' : undeclared identifier
Can anybody help me to do this please
Thanks in advance
Jayakrishnan
|
|
|
|