|
kiranin wrote: differentiate which is folder and which is files at run time?
See WIN32_FIND_DATA
The first parameter to this has the information about the file/folder attributes.
FILE_ATTRIBUTE_DIRECTORY-The handle identifies a directory.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
hi all,
I need to display the 'Browse For Folder' Dialog window, but I need to place it in a combo box instead of being a popup dialog, so can anybody help with this???
Thanks
Mohammad
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
You can insert your controls to it but for insert it to combobox I dont know why you want to insert it to combobox do you need to folders?
|
|
|
|
|
I dont want to display in a combo box so that it doesnt take much of the dialog area...
do u know how???
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
You can use from CTreeCtrl and see examples for file/folder with CTreeCtrl on codeproject did you see them?
|
|
|
|
|
Hi,
I am trying to develop a socket server which will communicat with Microsoft Office in LAN.
But I don't know even a small bit about socket server. Can anyone help me out? Please Reply as soon as possible.
Thank you.
|
|
|
|
|
You should go to the networking section of codeproject and pickup a begginers tutorial on sockets, its a long way to be discussed in a single post...
Regards,
Mohammad
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
Thank u 4 ur reply but cause i m very new in this site i could not reach at the place show by u, can u plz tell me the proper link of it such that i can view the tutorial. Plz.
|
|
|
|
|
|
Thank you for ur kind help and ofcourse fast reply.
|
|
|
|
|
Anyone knows where I can get the errata of <<c++ primer,="" 4th="">>?
If there is no, anyone wants to create it? If so, plz contact me!
P.S.
I have done:
1. There is no on Stanley B. Lippman's website(http://staff.develop.com/slip/) and blog(http://blogs.msdn.com/slippman/).
2. I can't google it.
3. Email to him(slippman@objectwrite.com).
Thanks!
=== Inside Wintel! ===
Who: DollfaceYY (杨洋)
QQ: 55780839
MSN: DollfaceYY@hotmail.com
EMail: DollfaceYY@163.com
URL: DollfaceYY.china-pub.com
|
|
|
|
|
WM_PRINT does not print controls of a dialog box properly
I create dialog boxes in VC++ version 7 using WINDOWS API function calls
I tried to print dialog boxes by sending message WM_PRINT to
dialog window proc. but controls are printed to the top-left corner of paper,
as if all controls have x = 0 and y = 0; nothing seems wrong according
to MSDN. I create dialog boxes by calling functions CreateDialogParamW or
CreateDialogIndirectParamW. I get hDC to printer device by calling PrintDlg or
PrintDlgEx functions width PD_RETURNDC flag set.
Can any one help me?
|
|
|
|
|
Just a suggestion:
Why dont u get the bitmap of your window object and send it to the printer?? it might be easier, although I dont remember how, but I can remember that it is done using DCs.
Mohammad
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
Hi,
We made a project of server and client which are connected through sockets in LAN.
Now we have a idea that to implemnt the same project in internet that the client can get access to server through Internet not through Sockets.
I dont know a small bit about internet connectivity.
Can u anyone pls give idea for this?
Whether i have to write the whole project in to a new thing or shall i make a small changes in old project for internet connectivity...
Pl help me out?
Anu
|
|
|
|
|
That depends on your needs. If you want security, you should use Web Services. DCOM and RPC are also possible, but they are only recommeded for trusted boundaries. Also, there are performance issues with these over the internet, since they are more OOP oriented. XML-Webservices can be implemented using the ATL-Server templates, check here :. In any case, there are certain design issues to be considered when stepping from LAN to Internet. Latency is usually much higher, so try to minimize the number of function calls (no chatty interfaces). Try to put as much information as possible into a single transmission. Bandwith is cheap, latency is expensive.
I hope that helps you a little.
|
|
|
|
|
Hi,
I am doing an application which display's the windows explorer in tree view format.Now when i double click a particular item ,folders and files will be listed below as subitems.They will open when we right click on that particular file and select open from the context menu. How can i open the file or folder straightly by double clking on that.
Thanks in advance,
Radhika.
|
|
|
|
|
use ShellExecute as follows
ShellExecute( 0, _T("open"), csFileName ,0,0,SW_SHOW);
give the full path of the file in the place of csFileName
nave
|
|
|
|
|
Thanks naveen ,it is working fine.
|
|
|
|
|
|
Dear members, i have a query, In my dialog box i have an Edit Control that takes numeric value,
Now after typing the value in the edit box, i press RETURN key for some validation to take
place, for this task i am handling the PreTranslateMessage() for the VK_RETURN message, Now the
problem is when i highlight the CANCEL button (with tab button)in the dialog box and try to close the Dialog Box by
pressing ENTER button it is not responding (the dialog box is not closing), the reason is obvious that
since i am handling the PreTranslateMessage() it is not responding, but i also want the dialog to
be closed when i hit the Enter button after highlighting the Cancel button, how can i accomplish
this??
OR is there any other way to handle the RETURN key validation stuff than using PreTranslateMessage(), so that the Cancel button's
original behaviour is not lost.
Please Help!!!
thanx in advance
kumar
|
|
|
|
|
The usual approach in MFC when overriding such functions for certain events is to call the base-class implementation of that function afterwards. You just do all Preprocessing you need, and then you call the base-class implementation and propagate its return value.
|
|
|
|
|
Along with the checking of VK_RETURN, check whether the handle is that of edit control.
if( WM_KEYDOWN == pMsg->message )
{
if( VK_RETURN == pMsg->wParam && m_edit.m_hWnd == pMsg->hwnd )// m_edit is the control variable of the edit control
{
// do ur computation
return TRUE;
}
}
nave
|
|
|
|
|
thanks a lot Naveen, its working
thanx in advance
kumar_windows
|
|
|
|
|
Hello,
ich have a question to threads and the function sleep.
We have a main programm and load from this a dll as a thread with AfxThreadStart and it is stopped with AfxThreadStop.
The dll has a method run in which is a loop which proofs a condition and runs as long as this condition is true. to stop this thread i set the condition to false. after the loop has stopped another boolean ist set to false so i know that the thread is stopped and i can delete everey references an stop the whole programm.
the pseudo code of the dll
start() {
afxThreadStart(this, true);
}
stop (){
running = false;
}
run() {
stopped = false;
while(running) {
do something
}
stopped = true;
AfxStopThread();
}
isStopped() {
return stopped;
}
I have a gui and a button, if i hit the button, the thread should be stopped and i wait until it has stopped, so i can delete all refereces to some other objects.
pseudocode for the main prog
hitButton() {
dllThread->stop();
while(!dllThread->isStopped()) {
sleep(1000);
}
delete references;
...
}
The main Problem is, that if i use the slepp method in the main Programm (see code for main prog.), it seems that the dll-thread sleeps too.
thanks for your help
Timo
|
|
|
|
|
hi,
How u knew that dll thread sleeps too ?
Regards
Velayudhan
|
|
|
|