|
How to display a html page of the internet (i.e. http;//www.mycompany.com) on a dialog?
I know HtmlView is very easy but it is in doc-view style.
we use VC6.0 now.
thx
includeh10
|
|
|
|
|
|
Maximilien,
I found a sample in MSDN and developped a simple app, it works fine now.
thx a lots.
includeh10
|
|
|
|
|
Hi, I'm Javier. I want add to my application a control button. But I don't want the typical rectangular button. I want add a picture resource, and change the button's appearance, for example that it looks an arrow(a bitmap picture), but the control is the same functionally, the only change is the appearance.
¿How can I do this?
Tahnk you .
|
|
|
|
|
Hi Javier.
What I did when I encountered this problem was to write my own button class - assign each button a bitmap that you display, assign the button coordinates and width/height or whatnot, and then every time there's a mouse click, just look through your buttons to see if the click was inside the coordinates and parameters.
I use this for all of my games nowadays and it works great. 100% customization. But of course then you have to write your own class for it. I don't know of a way to do what you're asking using the default windows API.
Kelly Ryan
|
|
|
|
|
have you looked here for some example of non restangular buttons ?
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
thanks for answering. I have found interesting classes in this web, made by Davide Pizzolato
. They're great.
Bye.
|
|
|
|
|
I succesfuly build my projects that use MFC in VC++ 6.
But if try to build them in .NET I get this error. When I select in project properties "Use Standart Windiws libraries" - it wass builded as well. But when I select "Use MFC ..." this on appear?
|
|
|
|
|
Hi,
I was working with date conversion, converting from system time to variant time (double) and I found that I lose the milliseconds in that conversion.
This is some sample code:
DATE Val;
SYSTEMTIME sysTime, res;
::GetLocalTime(&sysTime);
::SystemTimeToVariantTime(&sysTime, &Val);
::VariantTimeToSystemTime(Val, &res);
The milliseconds field in res is always set to 0; it doesn't matter the value of the millisecons field in sysTime.
I haven't found this issue documented in the MSDN. If someboy knows where could I find some documentation I would really apprecciate it.
Also, if someboy knows about a function that completes the same conversion without losing the milliseconds I would also appreciate it a lot.
Thanks,
Federico
|
|
|
|
|
Federico Milano wrote:
Also, if someboy knows about a function that completes the same conversion without losing the milliseconds I would also appreciate it a lot.
Before trying to fix a "conversion" problem, what is your net goal? Keep in mind that VariantTimeToSystemTime() ultimately calls VarUdateFromDate() which sets the wMilliseconds member to 0.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi All
does any one know how to get the HTTP status code of a web address
for example, if i pass in http://www.google.com it would return 200
or if i did
http://www.frefoeijrnferfnerf.com it would return 404
any ideas ??
ta
si
|
|
|
|
|
following on from that i have, the below
which if given a vaild url, such as www.google.com
it will return 200, however if its invalid it returns 0
the below example should return 404
any ideas ???
CString status="";
HINTERNET hSession = ::InternetOpen(_T(""),
INTERNET_OPEN_TYPE_PRECONFIG,
0,
0,
0);
HINTERNET hConnection = ::InternetConnect(hSession,
_T("www.msn55.com"),
INTERNET_DEFAULT_HTTP_PORT,
_T(""),
_T(""),
INTERNET_SERVICE_HTTP,
0,
0);
HINTERNET hRequest = ::HttpOpenRequest(hConnection,0, "",0, 0, 0,0, 0);
::HttpSendRequest(hRequest,0,0,0,0);
char c_status [12];
DWORD sizeStatus = sizeof (c_status);
DWORD dwinxHdr = 0L;
HttpQueryInfo (hRequest, HTTP_QUERY_STATUS_CODE,
(LPVOID) c_status,
(LPDWORD) &sizeStatus,
(LPDWORD) &dwinxHdr);
status = c_status;
// Close the request handle.
::InternetCloseHandle(hRequest);
// Close the HTTP connection handle.
::InternetCloseHandle(hConnection);
// Close the WinInet session.
::InternetCloseHandle(hSession);
|
|
|
|
|
Hi all,
Does anyone know of an MFC container that can serve as a priority queue? (log (n) time for insertion, constant time for the removal of the top member.)
Keep it simple
|
|
|
|
|
Is the Standard Library's priority_queue no good?
Kevin
|
|
|
|
|
In my app, I want to use UpdateResource() function to update a bitmap which is inside an exe file.
but UpdateResource() is unavailable for win95/98 (only for NT/2K).
I hope my app can be used on all OS including win95/98.
Do you have idea to make an user function to replece UpdateResource() for win95/98?
thx
includeh10
|
|
|
|
|
Are there any other modifier keys that I can capture from the keyboard besides: Ctrl, Alt, Shuft, and the Windows key? Just how many key combinations can I capture?
- Darroll
Darroll
Not one person lives in the present. Only the past. I can prove it.
|
|
|
|
|
what's the simples way to access CMainFrame members in a SDI doc/view app through CView class?
were rgrtgrtvrtrt rtrtb brt tyuhjghj hbhbnh hnjm 1234567?
|
|
|
|
|
Hello
Use the folowing code to access the CMainFrame members
((CMainFrame *)AfxGetMainWnd())->Use the member functions defined in CMainFrame;
;P
Vikram Kashyap
"You will never fail until you stop trying"
|
|
|
|
|
Hi,
I have created a custom appwizard. I need to know how to update the fields on the general tab of the Project Settings dialog. I have been able to set the options on the Link tab using link.exe as a parameter and cl.exe as a parameter on the C/C++ tab.
The following is used to set the MFC usage on the General tab of the Project Settings
CComPtr<iconfiguration> pConfigs;
VARIANT dummy = {0};
pConfigs->AddToolSettings(L"mfc", L"0", dummy);
Any suggestions welcome.
Thanks in advance.
|
|
|
|
|
|
Hi all,
I want to create one Add in which will for Ms- word, EXcel, and powerpoint too. I want to know if there is any book or any website which will help me out to do it. with that Add in i want to handle some picture and they shld be added to powerpoint and in powerpoint i shld be able to manipulate it. How is it possible. If some one can help me, then please do
My email id is savilani@rediffmail.com
Thanks in advance
Savita
|
|
|
|
|
Hi,
This can be achieved using automation...so try looking for some automation on net. You will good sample projects here on CP also...
Vikram Kashyap
"You will never fail until you stop trying"
|
|
|
|
|
Hi,
I have an MFC extension dll, which exports a class. The class is actually CStatic derived and uses several instances of the CImageButton from this site.
That class is exported from the dll using MFC's AFX_EXT_CLASS macro, and imported into my main exe with the same.
I want the CImageButton's in the dll-class to use bitmap resources from the DLL. But, in the code for CImageButton, it uses ::LoadBitmap to actually load the resource, the first argument of which uses AfxGetInstanceHandle() to get the HINSTANCE of the app. Of course, AfxGetInstanceHandle returns the HINSTANCE of the exe, so it all goes pete tong.
The only workaround i've found it to use a global variable of type HINSTANCE in the dll, and in DllMain to set the global var to store the HINSTANCE. Then use that HINSTANCE in place of AfxGetInstanceHandle.
Whilst it works, it doesn't seem "right"- it seems a bit of a bodge.
Is there a better way?
Thanks
Jon
using System.Beer;
|
|
|
|
|
I *think* you want to look into AFX_MANAGE_STATE(AfxGetStaticModuleState( )) - this will switch the state for you. You would put this call at the beggining of your function, BEFORE any resource calls (like LoadImage/LoadString, etc) are made.
It's possible you may want to use something other than AfxGetStaticModuleState() - look it up in MSDN - there are other variations on it if I remember right.
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
|
|
|
|
|
That looks exactly what I need. Thanks!!!
using System.Beer;
|
|
|
|