|
hello
can we have a toolbar on dialog ???
|
|
|
|
|
have you had a look here[^] ?
|
|
|
|
|
cancerion wrote: can we have a toolbar on dialog ???
Take a look at CWnd::RepositionBars . MSDN has a nice sample on this too.
For the sample you will have to search MSDN with the keyword as RepositionBars .
|
|
|
|
|
Yes and you can see examples on codeproject
|
|
|
|
|
|
please delete this post...
instead of reposting when you've done a mistake, do you know there's an "Modify" link at the bottom-right of your messages, so that you can edit them without rewrite it all ?
|
|
|
|
|
can any body tell me in solving the compilation and execution problem of the download sample from the page mentioned here --> http://www.codeproject.com/system/RemoveDriveByLetter.asp[^]
i have copied cfgmgr32.h file from web and added to the project.
please send me the clear description how this problem can be executed properly.
Madhukar Charla
|
|
|
|
|
hello,
I'm about to integrate the DDK in Visual C++. I found two batch files, which should do this:
http://www.hollistech.com/Resources/ddkbuild/ddkbuild.htm
http://www.osronline.com/article.cfm?article=43
but I was unable to make this work.
so I beg you to help me with this. or is there a solution without these files ?
thank you a lot, TSX
|
|
|
|
|
Hi all.
I have a bmp image and i have set it as a back ground of a dialog box. But the controls on dialog box are not getting matched with the colors from image. I mean the background of various controls like check box, radio button, static controls, etc is typical system color, i.e. off brown.
I can set the background color of the controls by overriding OnCtlColor() of CDialog class. But to set their backgound, I need the color from image, and as image is having number of colors I can't go with one perticular color?
My question is how I can make back ground colors of the controls exactly same as that of image color on which I have dropped them?
Thanks
Rakesh Thakur
|
|
|
|
|
Do you want to write text on an image?
|
|
|
|
|
|
I have been racking my brains to figure out how to detect a modal dialog box coming up and to response to the dialog box by lines of code which simulating "press ENTER key " or "clicking a button".
In my project, I import a dynamically linked library to use some functions. One function bring up some modal dialog boxes, suspending the main thread. I want to responsing to the dialog box as soon as it pops up by simulating the act of "Pressing the OK button on the dialog" with code. On the dialog box, there is only a OK button(having focus). Currently, I have to press the OK button manually whenever a dialog box comes up. I think the solution involves two aspects: (1) detect the occurrence of a dialog box; (2) simulate "Pressing the OK button on the dialog" with code.
Can anyone help please. Without a solution, I have to reponse manually to handreds of thousands of dialog boxes to keep my program running.
By the way, there is no way I contact the authors of the dynamically linked library to solve this problem.
|
|
|
|
|
One solution would be,
Get handle to that dialog, (using FindWindow() , you could use timer for this).
And then use SendMessage(WM_CLOSE,..) .
i.e.
void MyTimerProc(LPVOID)
{
HWND hDlg = FindWinow(NULL,_T("Dialog Title"));
SendMessage(hDlg,WM_CLOSE,0,0)
}
|
|
|
|
|
Prasad, Thank you.
You suggestion is perfect. It works fine now.
However, in my code context, i have to put scope operator :: before 'FindWinow and 'SendMessage'.
I do not know why. When searching MSDN, I found two FindWinow(). One is a member function of class CWnd; the other does not beloge to any class. I guess by using "::" , i.e., ::FindWinow, we actually refer to the latter. I am not sure about this.
|
|
|
|
|
cy163@hotmail.com wrote: CWnd
This MFC wrapper for window.
cy163@hotmail.com wrote: other does not beloge to any class
Its win32 SDK API.
cy163@hotmail.com wrote: ::FindWinow, we actually refer to the latter
Correct.
|
|
|
|
|
hi,
i have a dialog box in which i have dragged dropped a edit box control.
i have validated the editbox control by creating a class called validate and the base class of it to be CEDIT class.
i have wriiten the code for validation in onkeyup method of validate class
i have declared the variable of the editbox control to be of the type validate.it works fine
the code for validation is as follows:
<br />
void hi::OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags) <br />
{<br />
<br />
if (nChar <=57 && nChar >=48)<br />
AfxMessageBox("hi");<br />
else<br />
AfxMessageBox("hello");<br />
return;<br />
}<br />
when i nter alphabets i get a message box and then i need to clear the character entered how to do this???
thnx in advance,
zari
|
|
|
|
|
Hi,
you can use CEDIT Member function..
CEdit* pmyEdit;
// Delete all of the text.
pmyEdit->SetSel(0, -1);
pmyEdit->Clear();
Kind Regards,
Priya.
|
|
|
|
|
please edit your post and set your code sample between <pre></pre> tags.
thank you
ps: refer the Forum Guidelines[^]
|
|
|
|
|
zareee wrote: when i nter alphabets i get a message box
You get message box in all cases.
If you want to perform validations, use PreTranslateMessage of you CEdit derived class instead.
BOOL CMyEdit::PreTranslateMessage(MSG* pMsg)
{
if ( pMsg->message == WM_CHAR)
{
UINT nChar = (UINT) pMsg->wParam;
if ( nChar <=57 && nChar >=48 )
{
return TRUE;
}
}
return CEdit::PreTranslateMessage(pMsg);
}
|
|
|
|
|
HI ,
Can any one help out me ,i have one lot of files related each other and,i do not know how to search for a particular file related to the particular thing.
i have one project and i have to do modifications for certain changes.
can any please tell how it will be easy for me
Raj kumar
|
|
|
|
|
PraveenaRAJ wrote: HI ,
Can any one help out me ,i have one lot of files related each other and,i do not know how to search for a particular file related to the particular thing.
i have one project and i have to do modifications for certain changes.
can any please tell how it will be easy for me
I tell ya. Use Visual studio.
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
Hi,
My problem is ,i have code for an application ,i donot how to change the previous code ,i have to modify it.by removing the conditions.
i do no for the code where it is declaring and where it is getting pop up.how to find out how the code flow is going ,i am some 100 files so i do not know
Raj kumar
|
|
|
|
|
Is that a dialog based app or MDI or SDI app? Or is that not using MFC? There is a feature called debug. You must try that.
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
its a dialog based app
Raj kumar
|
|
|
|
|
Start debugging from InitDialog and edit what you want.
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|