|
Have a look at SearchPath and SearchTreeForFile.
Paolo
------
"airplane is cool, but space shuttle is even better" (J. Kaczorowski)
|
|
|
|
|
i'm in the midst of a mini project and i would like to know the library for graphics for Visual C.
library as like example: #include is for the standard input and output.
I would like to those who know to help me as i'm desperate!
Thank you!
Jan
|
|
|
|
|
What do you want this library to do ? What form does your project take (MFC/Win32/ATL/etc ) ?
GDI is there as standard, GDI+ requires you to install the platform SDK and distribute a DLL, it also does not work with Windows 95. You need GDI+ or an external library like CXImage to load and save images, but other than that I can't help unless you provide more info on what it is you need.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
thanks for replying!
i want to draw boxes with my own dimensions and maybe something like give the boxes a depression feel when the options entered from the key board.
|
|
|
|
|
the function is something like that:
void draw_menu(char na[])
{
settextjustify(0,0);
setcolor(LIGHTGREEN); //{
settextstyle(TRIPLEX_FONT, HORIZ_DIR, 5);
outtextxy(180,70,"Airlines"); //top inrroduction text
settextstyle(TRIPLEX_FONT, HORIZ_DIR, 5);
outtextxy(280,440,"Information"); //}
setcolor(15);//border
rectangle(0,0,639,479);
BOX(55,167,291,223,0,na[0],14,1,7,12); //display schedule function box
BOX(55,247,291,303,0,na[1],2,1,7,15); //display reserve function box
BOX(55,327,291,383,0,na[2],15,1,7,13); //display available function box
BOX(353,167,589,223,0,na[3],4,1,7,10); //display cancel function box
BOX(353,247,589,303,0,na[4],1,1,7,14); //display list function box
BOX(353,327,589,383,0,na[5],15,1,7,7); //display quit and save function box
return;
}
|
|
|
|
|
the function is something like that:
void draw_menu(char na[])
{
settextjustify(0,0);
setcolor(LIGHTGREEN); //{
settextstyle(TRIPLEX_FONT, HORIZ_DIR, 5);
outtextxy(180,70,"Airlines"); //top inrroduction text
settextstyle(TRIPLEX_FONT, HORIZ_DIR, 5);
outtextxy(280,440,"Information"); //}
setcolor(15);//border
rectangle(0,0,639,479);
BOX(55,167,291,223,0,na[0],14,1,7,12); //display schedule function box
BOX(55,247,291,303,0,na[1],2,1,7,15); //display reserve function box
BOX(55,327,291,383,0,na[2],15,1,7,13); //display available function box
BOX(353,167,589,223,0,na[3],4,1,7,10); //display cancel function box
BOX(353,247,589,303,0,na[4],1,1,7,14); //display list function box
BOX(353,327,589,383,0,na[5],15,1,7,7); //display quit and save function box
return;
}
and i am executing the program in dos mode.
|
|
|
|
|
A quick search of MSDN confirmed what I was pretty sure of - you're using functionality provided by your prior compiler. VC is not going to compile this code, and to be honest I have no idea how to draw boxes and so on in DOS mode. Why does your program have to be a DOS program ? How old is it ?
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
honestly, using this VC, it was implemented by my institue and the C language is in Windows u know like a browser kind and the program is executed in dos.......it's always in dos mode i suppose, but i know we can execute the program in windows mode but i neednt go to that yet for my project.
Jan.
|
|
|
|
|
Is this a dos program or a console application. What version of VC are you using? If it is Version 2 or greater I'd say you had a console application. Or is it using some kind of EasyWin library?
Michael
|
|
|
|
|
it's in Win32 console application
|
|
|
|
|
|
Just to add another lib: PDCurses is a free curses library (console "graphics", and windows...) that also works for Win32.
|
|
|
|
|
OK, lets say there is an IE (or maybe Netscape too, although, that will be later) window open. The page it has loaded contains a form with several edit boxes.
1) Is there a way for me to get the source of that page straight from IE (NOT by downloading it again)?
2) Is there a way for me to either:
a) Retrieve what information might be in those edit boxes?
and
b) Write info to those edit boxes?
Adam
cabadam@houston.rr.com
|
|
|
|
|
Hello,
I have had the same types of ideas in the past and here is what I did to resolve them.
I wrote some code that pulls the source html code from a provided url and dumps it to a text file.. I then parsed through the text file for the values I was looking for. (Getting the information in the edit boxes)
To post items to the edit boxes... When you enter items to a text box/form and press submit they are run as (what I call) a url string. To simulate filling out the boxes and pressing submit you would need to first figure out what the string would be then execute it, for example..
Lets say you have a web site with a user name and password field plus a login button.. The url string could look something like this http://www.something.com/login.dll?username=Bonehead&password=mypass, this could be in a round about way, simulating the filling out of the edit boxes and pressing the login button. I can provide you with some source code if this sounds like a valid solution for you.
Rob
|
|
|
|
|
This won't work for me- I need to manipulate a page that the user will already have open. I will not actually be submitting the information, and I can't retrieve the HTML from the server again. I need to see what IE itself has retrieved. The code will have come from a CGI script that output would differ if I simply gave it the URL.
Adam
cabadam@houston.rr.com
|
|
|
|
|
Hi group,
I am developing some time critical application. Now my question is
" When my application starts, user can't run any application in back ground. Even it can't pres ALT+TAB. Because if windows takes some time to switch my application fails because i am reading some data at miliseconds. Now what is the programming steps which i should take for this."
|
--------------------------------------------------
Say Whatever You Know
Manish
--------------------------------------------------
|
|
|
|
|
Don't use windows. If you have such a critical task, then a desktop OS like Windows is not suitable. Even when the user is not interfering there is no guaranty that the OS assignes enough CPU time to your application.
Regards Daniel
|
|
|
|
|
Thanx Daniel
But i have no choice of using different OS. I have completed my hardware interface. It works fine when my application runs. But when user starts any other application, delays in timer interrupts occur and my application behave differently. So i want to do that no one can run any application except mine. Anyway or by doing anything he/she can't run any application...
||
--------------------------------------------------
Say Whatever You Know
Manish
--------------------------------------------------
|
|
|
|
|
the trick is making your computer believe that your application is a screen saver, that way, no other application can run.
I did this in VB some time ago. I suppose it won't be very difficult to port it to VC++
Go to the MSDN and look for this article
HOWTO: Block CTRL+ALT+DEL and ALT+TAB in Windows 95 or Windows 98
|
|
|
|
|
Francisco, I am happy with your answer. I will do as you suggest but if i will get ne problem i will mail you in this post. Okay.
--------------------------------------------------
Say Whatever You Know
Manish
--------------------------------------------------
|
|
|
|
|
Dear I want to write application which work in 98/2000. so your article is for 98 and it works fine in 98 but what about 2000.
--------------------------------------------------
Say Whatever You Know.
Helping other people is good for health.
=========
Manish
=========
---------------------------------------------------
|
|
|
|
|
In Windows 2000 you have mucho more control on the priorities of the different processes (look at the post by Paolo Messina).
I tried once (in Windows 2000) to place the seti process at realtime priority, and I can tell you it did exactly that. I could do nothing more that use that application. No switching, no mouse (keyboard still works), no paging, the closest thing you'll ever see to a real time OS in Windows.
|
|
|
|
|
> But i have no choice of using different OS.
Then you have but one choice AFAICT, write it as a kernel-mode (ring 0) driver and turn off interrupts. Don't expect to make any friends or ship such a horrible hack though.
You are _either_ Real-Time or Windows, it's *impossible* to have real-time demands in windows (even for device-drivers not turning off interrupts).
Perhaps your hardware is either designed to be driven by a real-time "something" or it's mis-designed to be used in a preemptive OS?
|
|
|
|
|
Have you tried to use SetThreadPriority() and SetPriorityClass() with THREAD_PRIORITY_TIME_CRITICAL and REALTIME_PRIORITY_CLASS respectively?
(If you do, don't forget to restore default priority when you don't need that anymore).
Maybe that could help, but as others said Windows is not a real-time OS.
I think that's the best you can do in a user-mode application.
Paolo
------
"airplane is cool, but space shuttle is even better" (J. Kaczorowski)
|
|
|
|
|
I'm currently testing my project on Windows ME and have found the following problem: I'm using a SDI project using the Doc/View architecture. Using the code at the bottom of this post i'm drawing rectangles on to the screen. When redrawing the screen (Most often when I've got an Invalidate() command in the MouseMove Handler), after a certain number of redraws (A different number each time), suddenly lose the color from my blocks and just get a black outline. I have absolutely no idea why this happens, could somebody help me?
Thanks in advance,
- X
The Code (This is placed in a function and called for each block I need to draw):
CBrush br;
CRect rect;
rect.left = point.x - BLOCKWIDTH/2;
rect.top = point.y - BLOCKHEIGHT/2;
rect.right = point.x + BLOCKWIDTH/2;
rect.bottom = point.y + BLOCKHEIGHT/2 - NODELENGTH;
// I'm writing a Flow Chart application, so the following line draw
// little 'nodes' at the top and bottom of each block
pDC->MoveTo(point.x, point.y + BLOCKHEIGHT/2 - NODELENGTH);
pDC->LineTo(point.x, point.y + BLOCKHEIGHT/2);
br.CreateSolidBrush(RGB(0,200,0));
pDC->SelectObject(&br);
pDC->Rectangle(rect);
br.DeleteObject();
|
|
|
|
|