|
ShowWindow( SW_HIDE ) should workk.
Neville Franks, Author of ED for Windows. www.getsoft.com
|
|
|
|
|
NO,i want invisible a one Item,no a whole Windows.
|
|
|
|
|
jieg wrote:
NO,i want invisible a one Item,no a whole Windows.
You could overide the on item draw notification and draw something to indicate the item isn't available.
Other than that I don't think this is possible. You either need to remove the item from the tree control or possibly write your own tree control.
Neville Franks, Author of ED for Windows. www.getsoft.com
|
|
|
|
|
i have a application that prints all kinds of files using shellexecuteex(). the program printed a:\one\k.jpg and a:\one\m.tif yesterday... but right now when i using my application to print same two files again, the following error message pops up.
" a:\one\k.jpg is not valid to win32 application"
and
" a:\one\m.tif is not valid to win32 application"
why both of them print before and not now.. i could not find the reason..
please answer me if you know the reason.. thanks
|
|
|
|
|
Can you post the relevant code snippets, please?
Nish
The rumours that I am an AI bot are absolutely false. These rumours have been propogated by *them* to focus all the attention on to me, while *their* bots take over the planet. Thank y%%%% Divide by zero. Cannot proceed. Abort(y/y)?
|
|
|
|
|
//here how i print the file.
//calling print function and passing the file name to print.
print("c:\one\k.jpg");
void print(CString fileName)
{
SHELLEXECUTEINFO lpExecInfo;
CString print = "print";
SetShellExecuteInfoStructure(lpExecInfo,print,fileName);
int success = ShellExecuteEx(&lpExecInfo); // printing a file
if(success == 0)
MessageBox("Fail");
}
void SetShellExecuteInfoStructure(SHELLEXECUTEINFO &lpExecInfo,CString lpVerbToPrintOrOpen, CString lpFile)
{
const char* verb = lpVerbToPrintOrOpen;
lpExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
lpExecInfo.lpFile = lpFile;
lpExecInfo.fMask=SEE_MASK_DOENVSUBST|SEE_MASK_NOCLOSEPROCESS ;
lpExecInfo.hwnd = NULL;
lpExecInfo.lpVerb = verb;
lpExecInfo.lpParameters = NULL;
lpExecInfo.lpDirectory = NULL;
lpExecInfo.nShow = SW_SHOW;
lpExecInfo.hInstApp = (HINSTANCE) SE_ERR_DDEFAIL ; //WINSHELLAPI BOOL WINAPI result;
}
|
|
|
|
|
Win wrote:
print("c:\one\k.jpg");
This can be achieved in a lot simpler manner as follows :-
ShellExecute(this->m_hWnd,"print",
"c:\\one\\k.jpg","","",
SW_HIDE);
The rumours that I am an AI bot are absolutely false. These rumours have been propogated by *them* to focus all the attention on to me, while *their* bots take over the planet. Thank y%%%% Divide by zero. Cannot proceed. Abort(y/y)?
|
|
|
|
|
no.. i can't use it because my application is printing program.. i have to print tons of files (any kinds of files). it has to be sent one file after printed one file. otherwise, the file will not be in order. so i need to know whether current file is finish printing and if finished, send another file. otherwise, wait until the first file is completely printed. so i have to use shellexeuteex(). and i suprised, it was fine printing .jpg and .tif files until yesterday and only starting from yesterday, could not print .jpg and .tif files.. i can't find the reason why can't print. do you have any idea why???
|
|
|
|
|
Win wrote:
do you have any idea why???
Because you are using \ instead of using \\ in your file name strings
Nish
The rumours that I am an AI bot are absolutely false. These rumours have been propogated by *them* to focus all the attention on to me, while *their* bots take over the planet. Thank y%%%% Divide by zero. Cannot proceed. Abort(y/y)?
|
|
|
|
|
Hi all... i have an application,which include, checkboxes, radio buttons and tree controls that's act like window explore.
i want to save the user current setting so next time when the user rebrowse the folder he/she browsed last time.
how can i do that.????
thanks
Win
|
|
|
|
|
Save them in a file or the registry.
|
|
|
|
|
but how.. how can i save in the file or register???
i have no idea...
|
|
|
|
|
Have a look at the articals on CP for streaming to the registry... just make up values that mean certain thing and then check from them in your program. Or just output to a file. Have a look at MSDN under <fstream>
Now taking suggestionsfor a new sig. please email me all suggestions.
|
|
|
|
|
if you dont mind, can you gvie me add for them please... so far i could not find in the mfc lib yet..
|
|
|
|
|
|
A GUI which will do the following
1) Take input from the screen and conver lowercase to uppercase letters
2) Sort characters with user selection for ascending or descending
I will use the code to learn more
Thank you in advance
|
|
|
|
|
Read up on CDialog and CEdit for entering data in a GUI
Have a look at CString::MakeUpper for converting lower case to upper case.
Not sure about your sort question, is the data in a list control?
A good place to start is
< a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HTML/_core_dialog_box_topics.asp">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HTML/_core_dialog_box_topics.asp
Michael
Communication is the first step towards enlightenment.
|
|
|
|
|
My program shuts down at the same point always and when I debug it takes me to this statement in my program:
vectorB = sqrt(xcoord1[n][layer]*xcoord1[n][layer]
+ ycoord1[n][layer]*ycoord1[n][layer]);
in the variables window I see that vector B is 1.#INF000000000
so I'm trying to look at the values for my 2 dimensional arrays with the watch window. How can I look at the entire array...I know I can look at individual elements by typing xcoord1[34][3] or something like that? But I need to see all the elements. What do I type for this?
|
|
|
|
|
Try to type xcoord1,10 instaed of xcoord1[34][3] in the watch window, then you can see the first 10 values of xcoord.
Not exactly what you wanted, but it might help...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
I find the easiest way is to use the TRACE macro and loop through the values in the array. Its a little bit of an old fashioned debugging technique but I've always found trying to view arrays in the debugger as rather hard work.
Michael
Communication is the first step towards enlightenment.
|
|
|
|
|
hi,
I use the WinExec command to run files fine but a cant get the following to work & I have no ideas why. Please help me with my final year BSc own Project.
WinExec("copy "+m_Logo+" logo.*", SW_HIDE);
note: m_Logo is a CString that contains: c:\test\test.jpg or such
thanks again
An Expert is somone who has previously made ALL the Mistakes, I dream of this day. - Lucky
|
|
|
|
|
I will answer myself as knowone else has!!
WinExec unlike system only executes files (*.bat, *.exe, etc). copy is not a file it is part of the command.com file (win32) or cmd.exe file (winNT). The command i needed was:
command.com /c eg:
WinExec("command.com /c copy "+m_Logo+" logo.*", SW_HIDE);
note: m_Logo is a CString that contains: c:\test\test.jpg or such
Im gettin there!!
An Expert is somone who has previously made ALL the Mistakes, I dream of this day. - Lucky
|
|
|
|
|
Er. Pardon me for asking. But what's wrong with using CopyFile ?
Nish
The rumours that I am an AI bot are absolutely false. These rumours have been propogated by *them* to focus all the attention on to me, while *their* bots take over the planet. Thank y%%%% Divide by zero. Cannot proceed. Abort(y/y)?
|
|
|
|
|
Thanx, i will try that. that would be a lot more tidy. Do you know how to preview a jpg or gif in open dialog? I use GetOpenFileNamePreview for showing avi files but havent found a way for images. is there a way or do i need to create some kinda shell around the standard box? - im askin you cos u seem to always have correct & clear answers!!
Thanx again
An Expert is somone who has previously made ALL the Mistakes, I dream of this day. - Lucky
|
|
|
|
|
Hi,
I have an SDI project, the view of this project is derived from CFormView, this View contains a Bitmap control I wish to move this control from a coordinate (x1, y1) to (x2, y2), in a manner that his "railroad" resembles to a half of circle.
Which functions should i use ?
Can you help me with some tips ?
thank's.
|
|
|
|