|
I have created a Pagesetup dialog object like this:
CPageSetupDialog psd( PSD_INTHOUSANDTHSOFINCHES | PSD_MARGINS |
PSD_ENABLEPAGEPAINTHOOK, this );
Normally In the Oriantation part in the Setup dialog,defaultly select Portrait checkbox.
But I want to select Landscape check box as a default,when Dialog box appearing.
please send me a reply ,if any one know that.....
thanks...
How to select Landscape button as a default in PageSetupDialog
|
|
|
|
|
how can i connect to usb?
|
|
|
|
|
Ehm, the USB connectors can usually be found at the backside of your computer. They're small rectangular connectors.
If your computer is not equipped with these, it's massively outdated. A remedy is a plugin PCI-USB controller.
If that's not the answer you've hoped for: be more specific when attempting to formulate a question.
What do you want to do by what means?
|
|
|
|
|
I mean how can i send data through usb using c++
|
|
|
|
|
If you are using winXP or 2000 you are going to have to use a kernal mode driver to do the middle man work. I suggest you get a Cypress EZ USB board to learn on.
/\ |_ E X E GG
|
|
|
|
|
how can we understand a process request a socket
is there any message and if there is wich messages
koosha
|
|
|
|
|
koosha qaffari wrote:
how can we understand a process request a socket
is there any message and if there is wich messages
REALLY I AM VERY SOORY I CAN'T UNDERSTAND WHAT YOU HAVE WRITTEN,IF YOU KNOW HINDI,PLS DESCRIBE ME IN HINDI MAY BE I KNOW ANSWER TO YOUR PROBLEM
-----------------------------
"I Think It will Work"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Have I got this scheme right for running a scripting batch file from my program.
The program that is associated with the batch file is CSL.EXE and the following procedure will run when the selected TreeView file is double clicked:-
void CScriptingDlg::OnNMDblclkTree1(NMHDR *pNMHDR, LRESULT *pResult)<br />
{<br />
BOOL bSuccess = FALSE;<br />
SHELLEXECUTEINFO sei;<br />
ZeroMemory(&sei,sizeof(sei));<br />
sei.cbSize = sizeof(sei);<br />
sei.hwnd = AfxGetMainWnd()->GetSafeHwnd();<br />
sei.nShow = SW_SHOW;<br />
sei.lpFile = m_strPath.GetBuffer(m_strPath.GetLength());<br />
sei.fMask = SEE_MASK_INVOKEIDLIST;<br />
bSuccess = ShellExecuteEx(&sei);<br />
m_strPath.ReleaseBuffer();<br />
}
m_strPath is the full path name of the batch file; e.g. C:\Work\ABC.CSL.
The reason for this post is, if I double click a CSL batch file (i.e. C:\Work\ABC.CSL) from Window Explorer the CSL program runs OK, but if I do the same from within my program a DOS Window appears for a second then closes. The batch files appears not to have run.
So is this the correct way to do this?
Sweep123
|
|
|
|
|
sweep123 wrote:
sei.fMask = SEE_MASK_INVOKEIDLIST;
Per MSDN:
The lpIDList member must point to an ITEMIDLIST structure.
sweep123 wrote:
bSuccess = ShellExecuteEx(&sei);
What is the value of bSuccess ? If it is FALSE , what does GetLastError() return?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
The code was lifted from the FileTreeCtrl sample on the code project site.
http://www.codeproject.com/wtl/wtlfiletreectrl.asp
When I place a breakpoint at the statement:-
m_strPath.ReleaseBuffer();
The bool is 1 and last error is zero.
Both this sample and my version are able to run up Notepad when double-click on a txt file. An image editor will run up for bitmaps.
But neither runs the CSL program associated with the ABC.CSL file.
|
|
|
|
|
While I doubt it's related to the problem at all, the calls to GetBuffer() and ReleaseBuffer() are not necessary.
What value are you assigning to lpVerb ?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
If I use
sei.lpVerb = "open";
then the files is opened with QuickView and that includes .txt and .log files.
The code does not generate any erros, just dont seem to be able to run the program CSL.EXE in the correct manner with this code.
As I said if I use Windows Explorer then the CSL.EXE runs OK with the selected file.
Any ideas?
Sweep
|
|
|
|
|
when i click on ListCtrl Itelm ,, its background colur is turned to blue ,
after that
when i click to an other control ... previusly Clicked ListCtrl Items background colour disaapear ,, and i not know at thia stage at which item i was clicked ,, i want to Highlight it ,, with any way ,, as in windows it change its colour to Grey,,,
any tip .. or way
thanx.
Actualy ,, it makes easy the user to see that he clicked on this item last time
thanx
|
|
|
|
|
Can you use the LVS_SHOWSELALWAYS style?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
My question may seem a bit lame. But I always twist my mind when trying to start a new project; i always have projects as they try to help me learn more.
But it takes me some time to come up with one, itried seaching the net for sites which offer list of project titles as a start point for fellows like me who waste their time wondering what to do ??
So pls if u know a site of this kind or have a list of possible ideas tell me.
Now i am finished with the project i was developing
"Digital Power System Simulation" and now ready to another??????/
|
|
|
|
|
Here is Suggestion
make a project on SmartCard's
-----------------------------
"I Think It will Work"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Well when I want an idea of something to develop, I hit sites like download.com and other shareware sites and that usual gives me some inspiration. Of course there are places like http://www.rentacoder.com[^] which have hundreds of project ideas.
Michael
CP Blog [^]
|
|
|
|
|
|
Hi,
How to trap file reading and writing in Shared Folder over a Network for Workgroups in Windows? Further more, may I trap browsing event in Shared Folder?
Thanks.
|
|
|
|
|
Is this to run on a Windows For Workgroups machine? If so, you'll be needing a 16-bit solution.
Otherwise, if the machine is NT-based, check out ReadDirectoryChangesW() and FindFirstChangeNotification() .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I have created a .net C# service and i am calling the service in COM.
Code below fails on CoCreateInstanceEx returns
hresult = 0x80040154,Class Not Registered.
CoInitialize(NULL);
CoInitializeSecurity(NULL, -1, NULL, NULL, RPC_C_AUTHN_LEVEL_NONE,
RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE, NULL);
COSERVERINFO serverInfo;
ZeroMemory(&serverInfo, sizeof(COSERVERINFO));
COAUTHINFO athn;
ZeroMemory(&athn, sizeof(COAUTHINFO));
// Set up the NULL security information
athn.dwAuthnLevel = RPC_C_AUTHN_LEVEL_NONE;
athn.dwAuthnSvc = RPC_C_AUTHN_WINNT;
athn.dwAuthzSvc = RPC_C_AUTHZ_NONE;
athn.dwCapabilities = EOAC_NONE;
athn.dwImpersonationLevel = RPC_C_IMP_LEVEL_IMPERSONATE;
athn.pAuthIdentityData = NULL;
athn.pwszServerPrincName = NULL;
char *HostName = GetHostName();
//char *IP = GetHostIP();
USES_CONVERSION;
serverInfo.pwszName = A2W(HostName);
//serverInfo.pwszName = A2W(IP);
serverInfo.pAuthInfo = &athn;
serverInfo.dwReserved1 = 0;
serverInfo.dwReserved2 = 0;
MULTI_QI qi = {&__uuidof(IMyInterface), NULL, S_OK};
IMyInterfacePtr* m_pIPtr;
try
{
m_pIPtr = new IAEMMainPtr;
}
catch(...)
{
::MessageBox(NULL,"Object Fails","MyClass",MB_OK);
return;
}
HRESULT hResult = CoCreateInstanceEx(__uuidof(_MyClass), NULL,
CLSCTX_LOCAL_SERVER | CLSCTX_REMOTE_SERVER, &serverInfo, 1, &qi);
if (FAILED(hResult))
{
delete m_pIPtr;
m_pIPtr = NULL;
::MessageBox(NULL,"CoCreateInstanceEx Fails","MyClass",MB_OK);
return;
}
m_pIPtr->Attach((IMyInterface*)qi.pItf);
(*m_pIPtr)->GetString(pRetVal);
CoUninitialize();
Sathish
|
|
|
|
|
Hi there,
Is there any other way of implementing asynchronous serial communication in Visual C++ than the MFC way. The MFC way is too time consuming.
I so far have seen that _inp and _outp are only for WIN95 platform.
Any suggestions will help.
Thanks.
|
|
|
|
|
You can use CreateFile and the Win32 Communications API which contains functions like BuildCommDCB(...) etc.
|
|
|
|
|
Thanks for the reply.
Yes, you're right CreateFile() and the WIN32 Comms API can be used.
My problem is that I receive data that is between 40 and 45 bytes in length far too late. The instrument on the other side sends the data at 9600 baud every 100ms. My program must receive it by 65ms.
At the moment the data is received it at approximately 80ms, which is way too late. I have used the CreateFile() and ReadFile() with the necessary time-out, threads and event operations to read the data.
I also wrote a utility in Delphi which seem to work fine (54ms). Unfortunately the code must be in C++ as it fits into a bigger Visual C++ program.
Any ideas.
Thank again.
|
|
|
|
|
My application have to offer a dialog to select a file to be deleted.
I've tought to CFileDialog but it is useful only to open or to save a file.
Is there a way to have a dialog to browse files in order to select a file to be deleted ?
Thank you very much !
|
|
|
|