|
Then how do i create a dialog box that does the same as CreateDialog except it's modal?
|
|
|
|
|
What you're getting is precisely a modal dialog:CreateDialog creates modeless dialogs (returns control immediately, it's up to you to destroy the dialog on due time.)
DialogBox creates modal dialogs, which capture the flow of execution till the user closes them.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
OK. Maby i have misunderstood some of the terms. How do i create a modeless dialog box, where the parent window can't be used till the dialog box is closed? A dialog box that performs all the actions after the showing of the dialogbox, but where the parent window can't be used untill the dialog box is closed.
|
|
|
|
|
Disable the parent window before showing the dialog. When the dialog is destroyed renable the parent. Use EnableWindow function.
|
|
|
|
|
|
What are the reasons that some people cannot run a database that conncts through ADO? I was told by someone "Well, some can and some can't" I really need more than this.
I'm trying to make a database using ADO and no matter how perfect the code is I cannot run it on my machine. The error I get is " RunTime Error 2157467259(80004005)[Microsoft][ODBC Driver Manager] Dtasource name not found and no default driver specified."
I have C++6 Pro. and WinXP Home. Do I need Visual Studio? Maybe WinXP Pro?
I'd really appreciate any guidence.
Thanks,
Garry
|
|
|
|
|
Maybe you didn't install correct version of MDAC.You have to install it whereever you want to use your databse application
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
Hi all,
I hope someone can help me as I've been trying to figure this one out for hours.
I am new to using wmi in my c++ and it's the forst time I have had to call a method within wmi.
What I am trying to do is stutdown a remote machine. If anyone has some sample code for this or some suggestions as to what parameters I need to be using when calling the GetMethod and ExecMethod functions then that would be greatly appreciated
Thanks in advance
Anthea
|
|
|
|
|
Why force yourself to that pain when InitiateSystemShutdown already does this?
Isn't WMI more for VB(A) and such for WSH? OK, MS themselves use WMI in some GUI apps, but then it's hard to beat those apps slowness and unresponsiveness also. :-<
|
|
|
|
|
hi,
I wrote a server in c using plain api functions.
How do i set the socket timeout?
please give example.
tnx
|
|
|
|
|
Have a look at options SO_SNDTIMEO and SO_RCVTIMEO options settable with setsockopt . These adjust the timeout for send and recv . For other operation (vg. connect ) the only solution to have an adjustable timeout is that you switch from blocking sockets to another model (for instance to non-blocking sockets governed with select .)
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I've created an ATL exe server named atlx with an interface named Interf.
I made a VB program with code like this:
Private Sub Command1_Click()
Dim ui As ATLXLib.Interf
Set ui = CreateObject("Altx.Interf") 'fails here
End Sub
and the result is failure on reason "Activex component can't create object.", while the server is running.
Do you know why?
rechi
|
|
|
|
|
Bogdan Rechi wrote:
Set ui = CreateObject("Altx.Interf") 'fails here
You are passing a wrong prog id. What is the prog id you see in the .rgs file? You need to pass that.
|
|
|
|
|
That is the ProgID from the rgs file. It must be something else, maybe registering stuff. I see nothing on Settings/Post Build Step.
rechi
|
|
|
|
|
Is not the registration, i just saw Settings/Custom Build.
rechi
|
|
|
|
|
Hi all,
Sorry in advance if my question sounds out of topic. But I hope someone can answer my question.
I have a pentium 2, 233 MHz, SDRAM 64 with win 95.
Now I wonder if it is possible to install win 2000 on this machine, if yes what is the procedure to achive this goal or what I have to think before I start the work.
Any help or pointer to site which describe this process.
regards
/rsasalm
|
|
|
|
|
Anonymous wrote:
I have a pentium 2, 233 MHz, SDRAM 64 with win 95.
Your machine is very very weak for win2000.I suggest you don't do that.
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
Check the response in SysAdmin/OS section
Venet.
--------
Black holes are where God divided by zero.(Steven Wright)
|
|
|
|
|
Hi,
I have Win32-application project in VC6, it contains no resource.
Hmm, can I use a resource and those functions: GetModuleHandle(), FindResource(), LoadResource() as I used them in a MFC application? What do I need to do to add a resource to a Win32 project?
Thx for help, Moak
PS: What kind of resource management do you use on multiplatform environments (e.g. Windows & Linux)? I know the above mentioned resource thingie is not portable (but very handy to use). On other platforms I ususally have a small tool that creates static BYTE s_arrays[] from the data and compile/link the resulting c-files/objects to the executable.
|
|
|
|
|
Hi again, I mentioned my win32 based executable also has no icon and version information (when showed in the explorer). Can I add this too?
|
|
|
|
|
BIG SORRY... I didn't found it via Google, but with Google Usenet archive:
Here is a pretty good explanation I found - and works great:
Newsgroups:comp.os.ms-windows.programmer.win32
Date:2001-10-24 10:07:07 PST
Insert->Resource->Icon->Import... (browse for your icon)
Use Alt+Enter to invoke "Icon Properties" dialog.
Assign an ID to your icon (e.g. IDI_APPICON).
Save(Ctrl+S) as MyApp.rc
Project->Add to project->Files...->MyApp.rc
Build
From that point on, the icon will appear in Explorer.
To assign the icon to the window also, add into your
WinMain:
#include "Resource.h"
...
WC.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_APPICON))
That's it, more or less.
HTH
Jugoslav
|
|
|
|
|
Hi,
I know it is a VC++ forum, but i really need help!!! Let's see my code first:
*****************************************************************************
void operation(int[], char[]);
void waitprocess(int);
void main(void)
{
int i, j;
static char buffer[BUFSIZE+10], X_value[5], message[BUFSIZE];
int f_des[2];
if (pipe(f_des) == -1)
{
perror("Pipe");
exit(2);
}
if (fork()==0)
{
}
else
{
for (j=1; j<=5; j++)
{
if (fork()==0)
{
static char temp[BUFSIZE];
sprintf(temp, "Thread %d", getpid());
operation(f_des, temp);
}
}
while (X>0)
{
close(f_des[1]);
if (read(f_des[0], message, BUFSIZE) != -1)
{
sprintf(buffer, " - X = %d \n", X);
strcat(message, buffer);
write(1, message, sizeof(message));
waitprocess(getpid());
X--;
}
else
{
printf("error");
}
}
}
}
****************************************************************************
I have to create 5 "threads" but using fork() because i have to use pipe() to communicate with "server". This program is doing that 5 "threads" are trying to decrement the global X until X=0. I use pipe as a mechanisam to protect this "critical section". I don't know whether i did it right or wrong. Please help me to check!!!
Also, I found that the output looks strange. The output is always in a pattern. For example, the output looks liked:
Thread 1001 - X = 20
Thread 1003 - X = 19
Thread 1002 - X = 18
Thread 1005 - X = 17
Thread 1004 - X = 16
Thread 1001 - X = 15
Thread 1003 - X = 14
Thread 1002 - X = 13
Thread 1005 - X = 12
Thread 1004 - X = 11
*
*
*
You can see the sequence is 1,3,2,5,4,1,3,2,5,4...etc. I think the output should be in random sequence. Why it's happened???
Thanks!!!!!
|
|
|
|
|
Yes, this IS a VC++ forum. The odds of you finding an answer here are probably slim, but I'll tell you right away, they won't increase from you asking over & over. You'll just annoy people, and possibly miss out on a reply.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
Half the reason people switch away from VB is to find out what actually goes on.. and then like me they find out that they weren't quite as good as they thought - they've been nannied. - Alex, 13 June 2002
|
|
|
|
|
ChiYung wrote:
but i really need help!!!
If you post your question on the comp.lang.c.moderated newsgroup, you will get an answer to your question. It is the one I frequent when answering Unix questions. If you don't have a news reader you can go to groups.google.com
Hope that helps.
After a poor performance in London in 1899, Steinitz went insane and died a year later on August 12, 1900 at Wards Island, N.Y.
|
|
|
|
|
I thought comp.lang.c.moderated was dead ? I use comp.lang.c++ a bit, but I thought the moderated one was closing down...
comp.lang.c++ are pretty tough on off topic questions if they relate to Windows, but pretty easy on Unix off topic questions in my experience.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
Half the reason people switch away from VB is to find out what actually goes on.. and then like me they find out that they weren't quite as good as they thought - they've been nannied. - Alex, 13 June 2002
|
|
|
|