|
NitinPatil wrote: Hi can you share the code ?
Here's one I used to get the current threat level:
Dim objIE
Set objIE = WScript.CreateObject("InternetExplorer.Application")
objIE.Navigate "http://www.whitehouse.gov/homeland/"
objIE.Visible = true
While objIE.Busy = true
Wend
Dim objTables
Set objTables = objIE.Document.all.tags("TABLE")
Dim objTable
Set objTable = objTables(12) ' get the 13th <TABLE> tag
Dim objRow
Set objRow = objTable.rows(0) ' get the 1st <TR> tag
Dim objCol
Set objCol = objRow.cells(0) ' get the 1st <TD> tag
Dim objImg
Set objImg = objCol.all(0) ' get the 1st <IMG> tag
MsgBox objImg.src The site has since been rearranged so the references are not accurate.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
For vs 2005 win xp
I can run one file but can't change to another file.
I tryed Msdn help but it's for Vs 6 and it doesn't work in vs 2005
Thanks
Moreno
|
|
|
|
|
|
sir_moreno wrote: I tryed Msdn help but it's for Vs 6 and it doesn't work in vs 2005
Says who?
http://msdn.microsoft.com[^]
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
Thank's a lot it worked;)
Moreno
|
|
|
|
|
Hi all.
How can I retrive the complete path of "My Documents" folder?
Thanks
Rakesh Thakur
|
|
|
|
|
Try this.
TCHAR szPath[MAX_PATH];
SHGetFolderPath(NULL, CSIDL_PERSONAL , NULL, 0, szPath);
|
|
|
|
|
Hi,
Try this:
BOOL SHGetSpecialFolderPath(
HWND hwndOwner,
LPTSTR lpszPath,
int nFolder,
BOOL fCreate
);
-----------
Mila
|
|
|
|
|
Rakesh_Thakur wrote:
How can I retrive the complete path of "My Documents" folder?
have a look at http://www.codeproject.com/shell/shellextguide6.asp
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
Hi all friends .
I develop a program that always read a data buffer from hardware very fast and display it on a dialog . It is not possible use of GDI's API for data displaying because it's very slow . I use DirectDraw but using of it is very hard and produce bugs ( example its draw in space of other windows and ...) . Now I search for an function , technology or ... that I give it a buffer of color data with it's elements position to draw it in correct position .
the buffer is similar this :
_______________________________________________________
| RGB(,,) | RGB(,,) | RGB(,,) | ... |
-------------------------------------------------------
and element's position of buffer is similar to :
_______________________________________________________
| (x1,y1) | (x2,y2) | (x3,y3) | ... |
-------------------------------------------------------
If you know please help me !
thanks a'lot
|
|
|
|
|
A_Fa wrote: It is not possible use of GDI's API for data displaying because it's very slow
Really? I find it capable of rendering screens of pixels faster than my human eye can perceive
them.
A_Fa wrote: I use DirectDraw but using of it is very hard and produce bugs
DirectDraw with a DirectX-enabled/capable video card is probably the best performance you'll
get. DirectDraw is "hard" - there is a learning curve, but it doesn't Produce bugs - It renders
YOUR bugs very quickly.
You must be working with REALLY FAST hardware
|
|
|
|
|
Or alternatively, very bad at writing efficient GDI code.
Very early on, I learned the benefits of Polyline over MoveTo/LineTo/LineTo/LineTo etc., and similar things. I do like your comment about DirectDraw!
Steve S
Developer for hire
|
|
|
|
|
Steve S wrote: Or alternatively, very bad at writing efficient GDI code.
Si!
|
|
|
|
|
Seriously, GDI is plenty fast for rendering your data. There's no need to refresh the screen
more than 30 times a second...24 is fine for perceptively smooth video.
I would suggest focusing on translating that incoming data into a renderable format as quickly
as possible. Don't draw a pixel at a time. Start with a DIB section so you have a pointer to
its RGB bits. Translate your incoming data and insert the RGB values right into the DIB section's
buffer. Blit the DIB to the dialog at regular intervals.
If the hardware is really that fast you may need to drop data to throttle the output. You are
displaying to a human user (I assume) so there's no need to have some ridiculous refresh rate.
I'm pretty sure any speed problems are going to be I/O-related, not rendering-related.
Mark
|
|
|
|
|
Hi fellows
I'm developing an app that needs to use function pointer. I'm assigning one of my methods in a function pointer variable.
this is my fuction pointer variable:
<br />
unsigned int (__stdcall * ObjectEvent)(void*);<br />
This variable needs to be like this because in the header file that I use there are a typedef with the same signature of my variable and some functions of this header that uses this typedef. See:
<br />
typedef unsigned int (__stdcall *HDSchedulerCallback)(void *pUserData); <br />
This is my method signature:
<br />
unsigned int __stadcall Object3DS::ObjectCallBack(void * vData)<br />
{<br />
MessageBox(NULL, "working", "Info", MB_OK);<br />
return 1;<br />
}<br />
This is my code when I put the method of my class into the function poiner variable:
<br />
void Object3DS::LoadObject3DS(const char * cObjectName, bool bVisible, float fX, float fY, float fZ)<br />
{<br />
...<br />
ObjectEvent = ObjectCallBack;<br />
m_ObjectHandle = hdScheduleAsynchronous(ObjectEvent, 0, HD_DEFAULT_SCHEDULER_PRIORITY);<br />
}<br />
HD_DEFAULT_SCHEDULER_PRIORITY is just a thread priority variable.
The error that I receive is this:
<br />
error C2440: '=' : cannot convert from 'unsigned int (__stdcall Object3DS::*)(void *)' to 'unsigned int (__stdcall *)(void *)'<br />
So fellows what I have to do to solve this?? I've tried somethings but nothing solved. I haven't any idea.
|
|
|
|
|
The problem comes from the fact that global functions and class functions don't have the same signature: for the class functions, the this (address of the instance of the class which call the function) is passed implicitely with the paramters.
If you want to solve the problem, specify your function as statis but then the problem will be that you won't be able to access non-static members (the function doesn't belong to any instance).
Again, you can solve this problem by using a global function as callback and pass the address of your instance (this pointer) to the hdScheduleAsynchronous function. Normally, every call back lets you do this. Then, inside your global callback function, cast the void pointer to a Object3DS* pointer and call a function from within your class.
An even nicer way to do it is not to use a global function but a static function from your class.
|
|
|
|
|
Tks for you all. I hope that works now.
|
|
|
|
|
You can do that only with a static method of the class. But if your method has to access instance members then you must find a way to pass them (perhaps the whole instance of the class) to it.
|
|
|
|
|
Tks for you all. I hope that works now.
|
|
|
|
|
Alex Cutovoi wrote: So fellows what I have to do to solve this??
See here.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Tks for you all. I hope that works now.
|
|
|
|
|
in a dialog have some buttons and a treeCtrl
i am overriding the function PreTranslateMessage to get the pressed key and do some processing depending on this key
the problem is :
whenever i press any key the default BEEP windows sound is played
why is that and how can i stop it
thnx 4 ur time and concern.
|
|
|
|
|
I think this is a feature of Windows OS -- beeping if a key cannot be processed by the focused control, like button.
Maybe you should return TRUE from your PreTranslateMessage for all of your keys, thus stopping further processing?
I hope this helps.
|
|
|
|
|
yea this help
now the problem solved
thnx alot 4 ur help
|
|
|
|