|
You can't. If you want that type of customization, you'll need to roll your own.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
How can i do that when my dialog active text-cursor already active in the editbox?
Can anyone get the answer my question? My question seems to be quite open, i think.
-- modified at 6:47 Wednesday 31st October, 2007
What is this¿ "This is a FIRTBOY"
|
|
|
|
|
As far as i get from ur description
you want to set the focus on the editbox whenever ur dialog is initialised.
in this case you have to code in the OnInitDialog() function
where u can use the control variable of the editbox lets suppose m_ctrlBox
u have to write
m_ctrlBox.SetFocus()
Regards,
Pankaj Sachdeva
There is no future lies in any job but future lies in the person who holds the job
|
|
|
|
|
|
Dont forget to return FALSE if you do this.
Wouldnt it be better to let the dialog manager do this for you by ensuring that the desired edit control is first in the tab order. To change the tab order when editting the dialog resource use menu option Layout->TabOrder(Ctrl+D) the taborder will be shown by numberred blue sqaures in the top-left of each control.
|
|
|
|
|
For edit controls, you may want to try this instead of SetFocus()...
GotoDlgCtrl(&m_EditCtl);
Why you may want to use this instead? Here's what the docs say...
"This message performs additional dialog box management operations
beyond those performed by the SetFocus function WM_NEXTDLGCTL
updates the default pushbutton border, sets the default control identifier,
and automatically selects the text of an edit control (if the target window
is an edit control)."
Whatever gives you the result you want
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thank you Mark...
Actually, I need sometime to work on Visual C++/MFC or other languages... and need a computer also. "to be busy with a good job to kill time!".. It is upsetting.
Yours sincerely.
What is this¿
|
|
|
|
|
Hi,
I've written a simple ISAPI filter which would require the user to authenticate before accessing a particular resource. The user will be sent a 401 Unauthorized error and will have to authenticate himself. The username and password have been hardcoded and will be checked against what the user enters in the authentication dialog box. The problem here is , I'm not able to retrieve the username and password that has been entered by the user. I don't know if they are encoded or encrypted. ie I get a " ‹ÿU‹ìì([ " for the values of both pszUser and pszPassword.
How do i retrieve the values ?
Code:
#include <stdio.h>
#include <httpext.h>
#include <httpfilt.h>
#include <string.h>
#define USERNAME "user"
#define PASSWORD "pass"
#define DOMAIN "domainname"
BOOL WINAPI
GetFilterVersion( HTTP_FILTER_VERSION *pVer )
{
pVer->dwFilterVersion = HTTP_FILTER_REVISION;
strncpy(pVer->lpszFilterDesc, "Basic Authentication Filter", SF_MAX_FILTER_DESC_LEN);
pVer->dwFlags = SF_NOTIFY_PREPROC_HEADERS;
return TRUE;
}
DWORD WINAPI
HttpFilterProc( PHTTP_FILTER_CONTEXT pfc,
DWORD notificationType,
VOID *pvNotification )
{
HTTP_FILTER_AUTHENT *auth = (HTTP_FILTER_AUTHENT *) pvNotification;
char domain[256];
char user[256];
if( auth->pszUser[0] == '\0') {
char domain[256];
OutputDebugString("No user/password given");
sprintf(domain, "WWW-Authenticate: Basic realm=\"%s\"\r\n", DOMAIN);
pfc->ServerSupportFunction( pfc, SF_REQ_SEND_RESPONSE_HEADER,
(PVOID) "401 Unauthorized",
(DWORD) domain,
(DWORD) NULL );
return SF_STATUS_REQ_FINISHED;
}
OutputDebugString(USERNAME);
OutputDebugString(auth->pszUser);
OutputDebugString(auth->pszPassword);
if( strcmp( auth->pszUser, USERNAME ) && strcmp( auth->pszPassword, PASSWORD ) ) {
char domain[256];
OutputDebugString("Username or password wrong");
sprintf(domain, "WWW-Authenticate: Basic realm=\"%s\"\r\n", DOMAIN);
pfc->ServerSupportFunction( pfc, SF_REQ_SEND_RESPONSE_HEADER,
(PVOID) "401 Unauthorized",
(DWORD) domain,
(DWORD) NULL );
return SF_STATUS_REQ_FINISHED;
}
if( !strcmp( auth->pszUser, USERNAME ) && !strcmp( auth->pszPassword, PASSWORD ) ) {
OutputDebugString("All conditions satisfied");
sprintf(domain, "WWW-Authenticate: Basic realm=\"%s\"\r\n", DOMAIN);
pfc->ServerSupportFunction( pfc, SF_REQ_SEND_RESPONSE_HEADER,
(PVOID) "200 OK",
(DWORD) domain,
(DWORD) NULL );
return SF_STATUS_REQ_HANDLED_NOTIFICATION;
}
return SF_STATUS_REQ_HANDLED_NOTIFICATION;
}
imazing
|
|
|
|
|
Hi All,
I am using a combo box in dialog
I want to use tool tip for data in combo.
When user drag the combo tool tiphas to show for item focused in combo
Can any one help me.
|
|
|
|
|
Please refer here[^].
Regards,
Paresh.
|
|
|
|
|
Hi Paresh,
Thx a lot for your reply,
I already refered to that article, there a new class is written for ComboBoxx,but I do not want to write any extra classes.
|
|
|
|
|
sheshidar wrote: ...I do not want to write any extra classes.
Then don't. Use the one already written (by someone else).
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I didn't mean that i do not write my own.
I do not want to include any new file in my project
|
|
|
|
|
Hi,
How to register a dll through code.
|
|
|
|
|
Load the library (for instance, via LoadLibrary ) and then call DllRegisterServer .
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Use this
WinExec("regsvr32 /s path of the dll including the name of dll",SW_SHOW);
Regards,
Pankaj Sachdeva
There is no future lies in any job but future lies in the person who holds the job
|
|
|
|
|
Is your DLL a COM DLL or normal DLL ?
Regards,
Paresh.
|
|
|
|
|
hi...
i need to save the messages form my mobile nokia 7610 to my pc automatically.
how it can be done?
|
|
|
|
|
Kindly help me or give me a clue , how can i convert series of ppt slides in abc.ppt to n-number of jpg files. one slide=one jpg file??
programatically using vc++
thanks in advance
fdsfdsf
|
|
|
|
|
For this you have to use the office automation i.e using the some of the tlb files of office u can use the functions that the software provides.
here if u see the power point provides a tool called as "Save As" which gives u the facility to convert the .ppt into the jpg file
just u hav to u that tool and then u r on the way
Regards,
Pankaj Sachdeva
There is no future lies in any job but future lies in the person who holds the job
|
|
|
|
|
Saving a PPT file as a JPG file will go something like:
CString strFileName = "abc.ppt";
_Application app;
_Presentation pres;
COleVariant vtFalse((short) FALSE),
vtOptional((long) DISP_E_PARAMNOTFOUND, VT_ERROR),
vtJpg((short) 17);
if (app.CreateDispatch("PowerPoint.Application") == TRUE)
{
pres = presentations.Open(COleVariant(strFileName), vtOptional, vtOptional, vtOptional);
strFileName.Replace(".ppt", ".jpg");
pres.SaveAs(COleVariant(strFileName), vtJpg, vtOptional);
docs.Close(vtFalse, vtOptional, vtOptional);
app.Quit(vtOptional, vtOptional, vtOptional);
}
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hello DavidCrow!
can you give a correct codes
Thanks
fdsfdsf
|
|
|
|
|
anchorwang wrote: can you give a correct codes
I gave you 95% of what it would take to solve your problem. Surely you can come up with the balance.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
A class with Virtual function is always having size is 4 byte more than the the class without virtual fun because the first four byte is assigned for VPTR so my question is thr any way to use the VPTR for calling virtual function???
or pleas suggest me any good document to read.
TahankXXXXXXXXXXxx.
|
|
|
|