|
What language are you programming in ?
~RaGE();
|
|
|
|
|
I tried to submit an article today but had a mistake:
I can not find place to upload my files, at which step? how many (zipped or image) files I should prepare?
A special image tool for Windows C++ programmers, don't miss it!
A nice hyper tool for optimizing your Microsoft html-help contents.
Includeh10
|
|
|
|
|
Go here and click the "Modify this article" link.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Well done!
I modified my first article and tested it, all are right!
One suggestion:
Aticle process should upload files first, then article text. Otherwise author can not test downloads and view images in "preview".
see this link to my first article
I will add more aticles at my spare time, it is interesting.
cheers.
A special image tool for Windows C++ programmers, don't miss it!
A nice hyper tool for optimizing your Microsoft html-help contents.
Includeh10
-- modified at 22:43 Wednesday 29th March, 2006
|
|
|
|
|
Please help me guys,I am getting crazy
Following code was working in VS2003, but is not working in VS2005.
It displays the tooltip when I move the mouse over the button , but if I click the button at least once and then try to move the mouse over it then the tooltip is never displayed
void CMYBUTTON::SetToolTip(LPCTSTR strText, BOOL bActive )
{
if (strText == NULL) return;
if (m_ToolTip.m_hWnd == NULL)
{
m_ToolTip.Create(this);
m_ToolTip.Activate(FALSE);
}
if (m_ToolTip.GetToolCount() == 0)
{
CRect rect;
GetClientRect(rect);
m_ToolTip.AddTool(this, strText, rect, 1);
}
m_ToolTip.UpdateTipText(strText, this, 1);
m_ToolTip.Activate(bActive);
}
BOOL CMYBUTTON::PreTranslateMessage(MSG* pMsg)
{
if (m_ToolTip.m_hWnd == NULL)
{
m_ToolTip.Create(this);
m_ToolTip.Activate(FALSE);
}
m_ToolTip.RelayEvent(pMsg);
return CButton::PreTranslateMessage(pMsg);
}
What can be the problem
thank you.
|
|
|
|
|
Hi big_denny_200 ,
your problem is attractive so I test this problem in vs2003 and vs2005
and you right.then I write this code and this worked in vs2003 but in vs2005
it's exactly (It displays the tooltip when I move the mouse over the button , but if I click the button at least once and then try to move the mouse over it then the tooltip is never displayed)
Now you check this code
m_tooltip.Create(this);
SetToolTip(_T("ADAD"));
void CAnswer::SetToolTip(LPCTSTR lpszText)
{
if (!lpszText)
return;
TOOLINFO ti;
ti.cbSize = sizeof(TOOLINFO);
ti.lpszText = (LPTSTR)lpszText;
ti.hinst = AfxGetInstanceHandle();
ti.hwnd = m_Button1.m_hWnd;//GetDlgItem(IDC_BUTTON1)->m_hWnd;
//this->GetParent()->GetSafeHwnd();
ti.uFlags = TTF_SUBCLASS | TTF_IDISHWND;
ti.uId = (UINT) m_Button1.m_hWnd;//GetDlgItem(IDC_BUTTON1)->m_hWnd;
//this->GetSafeHwnd();
m_tooltip.SendMessage(TTM_ADDTOOL, 0, (LPARAM) &ti);
}
this way maybe not good but this worked,well I insert function SetToolTip in the event button Again for vs2005
But in vs2003 Nothing
void CAnswer::OnBnClickedButton1()
{
SetToolTip(_T("ADAD"));
}
maybe it is some helpful to you
|
|
|
|
|
I am using wm asfwriter to write wma files, and I would like to write a segment of the song using IMediaSeeking::setpositions, but hr = E_NOTIMPL. I added wm asf writer to the graph, and used renderfile to load songs, and built the filter graph. I reached ImediaSeeking through writer filter, then used setpositions function to locate the segment I would like to write. But setpositions did not succeed. Thanks for your help.
|
|
|
|
|
Hi, I am using ADO 2.81 with C++ 6.
In my program I have a datagrid which is filled with data from adodatacontrol. Whenever i select a different row, my app needs to display information about it. The problem is, I can't find in which row the user clicked...
Is there any code that can help me?
i am trying to put it in the function:
void CMyDlg::RowColChangeDatagrid(VARIANT* LastRow, short LastCol)
here lastRow shows the last row clicked not the present.
I tried with dataGrid.get_Row();
this works fine if I dont scrool the data grid. But if I do so, it gives me the same informations (like I am not scrolling)
PLS help
|
|
|
|
|
Hello, I'm trying to create a program that will allow me to launch various applications as many times as I want, and also close them all at once. So far I have manage to code the launch part. my program runs and gives the choice to execute three programs: notepad, calculator, and paint. I can keep on crating as many isntances as I want of any of the three programs. However, I have not been able to come up with a solution to close all of the open programs at once, this will be done when the option 4 is selected from the menu!! So far my program only closes the last opened application, but not the rest..How can I come about resolving this problem thank you.. here is my code::
#include windows.h
#include stdio.h
#include stdlib.h
#include "linkedlist.h"(structure contains: PROCESS_INFORMATION si, and *next node)
void P1();
void P2();
void P3();
void main(void)
{
Node *head = NULL;
Node *newPtr = new Node;
STARTUPINFO si;
//PROCESS_INFORMATION pi;
ZeroMemory(&si, sizeof(si));
si.cb = sizeof(si);
//ZeroMemory(&pi, sizeof(pi));
int num=0;
while(num!=5){
//char ch ='0';
//char skip[31]="";
system("cls");
printf("\t\t****Select which application to execute *****\n\n"
"\t\t\t1.NotePad\n \t\t\t2.Calculator\n \t\t\t3.Paint\n\t\t\t4.Quit\n\n");
scanf("%d", &num);
if (num==1){
CreateProcess(NULL,"C:\\Windows\\System32\\Notepad.exe",NULL,NULL,NULL,NULL,NULL,NULL,&si,&newPtr->pi);
}
if(num==2){
CreateProcess(NULL,"C:\\Windows\\System32\\Calc.exe",NULL,NULL,NULL,NULL,NULL,NULL,&si,&newPtr->pi);
}
if(num==3){
CreateProcess(NULL,"C:\\Windows\\System32\\Mspaint.exe",NULL,NULL,NULL,NULL,NULL,NULL,&si,&newPtr->pi);
}
if (num==4){
TerminateProcess(newPtr->pi.hProcess,0);
TerminateProcess(newPtr->pi.hThread,0);
}
}
}
-- modified at 11:06 Wednesday 29th March, 2006
|
|
|
|
|
What does it do when 4 is selected? My guess is that it will close the most recently created process.
Each time that 1, 2, or 3 is selected, you need to create a new Node and add it to a list of some sort. Then when 4 is selected, iterate through this list, calling TerminateProcess() . Make sense?
eprt wrote: TerminateProcess(newPtr->pi.hThread,0);
You can't use a thread id with TerminateProcess() .
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Thanks for your help! Indeed when 4 is selected, it closes the most recently created process. Now you suggest that I implement a Linked list perhaps? If so does the creation of the new node will have to be declared within each if statement? thanx !!
|
|
|
|
|
eprt wrote: Now you suggest that I implement a Linked list perhaps?
Yes. Use std::list from the STL.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
|
A much better solution. Thanks.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Calling TerminateProcess is meant as a last line of defense - In general it is not safe to go around terminating processes. If you must stop another process the correct technique is to ask it nicely to exit and only fall back on TerminateProcess if this doesn't succeed. See here[^] for some more info on this. If you do call TerminateProcess here's some possible ramifications in order of severity:
- Nothing bad happens.
- The program doesn't get a chance to clean up after itself - For example temporary files are left behind undeleted.
- The process corrupts data. This can occur if, say, the program was interrupted in the middle of an operation that should be atomic.
- If the process used shared memory, such if often the case when global hooks are used, the global data could be corrupted and effect other processes.
Steve
|
|
|
|
|
I have a vc++6 MFC app, i have a main dialog that shows in the taskbar, the dialog can call a login dialog which also shows in the taskbar but i have the main callin another dialog but that doesnt show in the task bar. what is causing this
what part of the code actually makes a dialog show in the taskbar?
thx
|
|
|
|
|
i just found the line that does it in the .rc file
EXSTYLE WS_EX_APPWINDOW
i have added the above lines to the correct sections in the .rc file using notepad but how is this ment to be added when using visual studio 6
as the above way im sure isnt the right way
|
|
|
|
|
i'm quite sure you're calling that login dialog as modal from the Main dialog's OnInitDialog() function... aren't you ?!
|
|
|
|
|
yes, that is correct, while the other dialog is called once a button is click in the main dialog
is this having an effect?
|
|
|
|
|
I want to write some articles for the forum, how to do (publish) that?
A special image tool for Windows C++ programmers, don't miss it!
A nice hyper tool for optimizing your Microsoft html-help contents.
Includeh10
|
|
|
|
|
|
right, but how to navigate to these pages if not clicking links given by you?
A special image tool for Windows C++ programmers, don't miss it!
A nice hyper tool for optimizing your Microsoft html-help contents.
Includeh10
|
|
|
|
|
sorry, wasn't thinking...
Look at the top right hand menu on every page then Articles / Submit an Article
Gavin Taylor
w: http://www.gavspace.com
|
|
|
|
|
I like to do a “printscreen” on a window. Can I use the windows HWND to accomplish that in some way?
All tips are welcomed.
_____________________________
...and justice for all
APe
|
|
|
|
|
search for "screen capture" in articles of the forum, u can find some samples - also in VC CD (samples).
A nice hyper tool for optimizing your Microsoft html-help contents.
A best image tool for Windows C++ programmers, don't miss it!.
Includeh10
|
|
|
|
|