|
HI,
I know how to print a html file using Exec command by which all the prining is done internally . But i want to whether we can do it ourself.Actually i want to change the caption in my language(other than english)in the print dialog box.Since mfc is doing it internally i don't how to change it.So kindly help.Providing some source code would be more helpfull. Thanx in advance
lokesh.k
|
|
|
|
|
Hi,
suppose, I am onto threading
the sample code is as follows
void download(void *dummy)
{
while(1)
{
long retval=URLDownloadToFile(0,"http://www.anyurl.com/","C:\\htmpage.htm",0,0);
if(retval!=0)
{
::MessageBox(0,"Failed to grab news","Error in downloading...",0);
}
else
{
// LoadHtmlFile(); // download from google.com
}
Sleep(1600);
}
}
and i called it as
_beginthread(download,NULL,0);
Why does this function FAILS in threading in ATL based application, is there any other alternative to solve this problem, or how can i put threading in ATL???
regards
Balkrishna Talele
|
|
|
|
|
Hello to Everybody,
My name is Thomas, I am a student in computer science.
I need to implement in visual C++, a code that requests something to a PHP database server using a url (ex.: "http://192.168.1.110/csa/csasql.php?tipo=select&sql=SELECT Cali_CardPresent,Acc_Operator,Acc_IR FROM IR_ERRORS " ), and the server returns the answer thats can be:
+ an error or a success and in case of success, in some cases can be followed by data.
I first used to do this the function URLDownloadToFile(), but when the server is down, I have downloaded the file stored in the Internet cache.
Its a big problem because I don't want cached files to be stored and retrieved because its was an past answer of not my last request. I would like that for each request the server sends a new answer, and not taking the cached file.
I tried reconfigure IExplorer or bypass the problem using other ways but It is not so efficient...
I dont know if there is any way to bypass the caching of files but I see there is another function: the URLOpenStream().
Maybe with this function, all requests are straight for the server, and therefore bypass the cached stored files?
But there is another problem for me to use the URLOpenStream(): I am trying to understand how to implement the IBindStatusCallback interface, because I am not so experienced in C++ and if you would like to contribute with an example project in VC6++ that compile, I will be very thankful.
Regards, Thomas.
|
|
|
|
|
if u get the ans do let me know too,
try using this if i am not mistakento your question
long retval;
retval=URLDownloadToFile(0,"http://www.anyurl.com/","C:\\ddd.htm",0,0);
if(retval!=0)
{
::MessageBox(0,"Failed to grab page","Error in downloading...",0);
}
else
{
// do something
}
|
|
|
|
|
I need to set window size 1024 X 768,
or made them maximized - to not permit any move,
and not alow user to change window size by mose or else.
how to do it?
thanks.
|
|
|
|
|
Process the WM_GETMINMAXINFO message and limit the Window size in there.
Search MSDN for WM_GETMINMAXINFO and your get a dozen examples of how to do it.
|
|
|
|
|
Thanks.
It is very helpfull.
|
|
|
|
|
No problem
|
|
|
|
|
Hi,
this is bothering me for sometime time now and hope someone out there would help.
I've created a dialog project, in the the dialog there's an edit box. I need to write many lines of text to this box, to inform the user of the application status
How would I do this?
Kind Regards
Caoimh
|
|
|
|
|
Hello,
Edit->Properties -> Style check multiline properties.
With Regards,
R.Selvam
|
|
|
|
|
But what Win32 API function should I use
|
|
|
|
|
Hello,
you set the style in Multi line,
// Specify the edit control window style.
DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL |
WS_BORDER | ES_LEFT | ES_MULTILINE | ES_NOHIDESEL |
ES_AUTOHSCROLL | ES_AUTOVSCROLL;
// Create the edit control window.
g_hwndEdit = CreateWindow (
TEXT("edit"), // Class name
NULL, // Window text
dwStyle, // Window style
0, // x coordinate of the upper-left corner
0, // y coordinate of the upper-left corner
CW_USEDEFAULT, // Width of the edit control window
CW_USEDEFAULT, // Height of the edit control window
hwnd, // Window handle of parent window
(HMENU) EDITID, // Control identifier
g_hInst, // Instance handle
NULL); // Specify NULL for this parameter when
// creating a control
With Regards,
R.Selvam
Microsoft Community Star.
|
|
|
|
|
:(I have a simple mfc dialog base exe which have simply ADD button and a static text. By clicking ADD button, it write "Sample text" on static text.
Now i create another dialog base project in which i have only one button called WRITE. Now my problem is, As i click on WRITE button it work for earlier project exe work as ADD button was doing . How to do this.
|
|
|
|
|
Are you referring to data sharing via memory-mapping between the two applications?
Kuphryn
|
|
|
|
|
Thanks for replaing Kuphryn.
Actually I want to make my own recycle bin cleaner. By the clicking on my exe,
i want to open the recycle bin and then clean it by another button.
One thing i would like to tell you i am very much new for vc++. But i am to do this some and how...
Snav
|
|
|
|
|
Check out CodeProject code section.
http://www.codeproject.com/shell/recyclebin.asp
Kuphryn
|
|
|
|
|
Thanks kuphryn,
I asked for way and you gave me the destiney.
now further Problem, do you have any idea about autofill information of internet explorer for password or addresses? how can i remove to them by my project.
snav
|
|
|
|
|
Check internet options.
Kuphryn
|
|
|
|
|
Thanks Kuphryn,
That was not my question I want to apply same feature in my project but still i have no clue regarding that(I want to remove autocomplete forms and passwords by my project)
Snav
|
|
|
|
|
|
I have a small dialog-based app made with MFC AppWizard.
In the dialog class I do some stuff and need to have handle for the window (dialog window).
I use ::SetTimer and ::KillTimer and they require the handle (HWND type not CWnd type!) of the app.
BTW.. Is there any example of how to use SetWaitableTimer?
TIA!
|
|
|
|
|
this->m_hWnd
Rickard Andersson
Here is my card, contact me later!
UIN: 50302279
Sonork: 37318
|
|
|
|
|
Better way (IMO),
GetSafeHwnd() which does some sanaty checking on the HWND before returning it.
|
|
|
|
|
I would like to know how to write a simple notepad application, any suggestions.
Kind Regards
Caoimh
|
|
|
|
|
Hello,
You create the SDI application in the Appwizard dialog derived from CEdit. It help to you simplify the developing environment.
you open save the files in the defaultsettings. CFontDialog help to display and select the fonts.
CFindReplaceDialog use to find the string.
With Regards,
R.Selvam
Microsoft Community Star
|
|
|
|