|
How to call and execute parameter query with ADO from access database?
were rgrtgrtvrtrt rtrtb brt tyuhjghj hbhbnh hnjm 1234567?
|
|
|
|
|
Hey all.
I have a static text control on my dialog application. I set the text at startup with SetDlgItemText(IDC_STATIC,"Blah Blah"); It works great, however if I lose focus (ie, minimize the window, or even switch to another window and back) it disappears. Does anyone know of a way to get around this?
TIA
|
|
|
|
|
Is the static text control covered by another? (You can check this in the resource editor).
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hi Ravi:
Nope, there's only one static control on the whole page, and it's off to the side not near anything else
|
|
|
|
|
You need to give the control an id other than IDC_STATIC , and assign it a member variable via ClassWizard. Then you can set its text using SetWindowText() .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
|
Hi,
this week I digged a bit deeper into understanding Windows message handling and some things are unclear for me. Let's assume a simple program where you have thread A running the message pump (GetMessage, Translate, Dispatch), and another threads B sending/posting events to this window's message queue. My questions are....
- SendMessage() will not put the message into the queue but directly processes the window's WndProc and block until message was processed. A context switch is triggered immediate to thread A?
- Postmessage() will put the message into the queue and return. When is the context switch happening, before or after PostMessage returns? If after, I wonder how windows wakes up the message queue to process the waiting messages and how big the (average/worst) delay is until the corresponding WndProc will be called.
- Is there a possible dead lock with Sendmessage() and two threads (A and B) both having an own message queue? Example, when you send a message to thread A's message queue and A's Wndproc sends back a message to B's message queue. Since B is waiting blocking for the first message to complete, thread A will then have to wait forever?
- When you use SetTimer() to create repeated timer events, are those WM_TIMER messages generated from the message queue and synchronous for all threads in the same process?
Thanks for information. I am very interested in background information how Windows makes message handling fast and comfortable.
Cheers, Moak
|
|
|
|
|
Moak wrote:
Is there a possible dead lock with Sendmessage() and two threads (A and B) both having an own message queue?
Possibly. It depends on which thread is sending to which queue.
Moak wrote:
Since B is waiting blocking for the first message to complete, thread A will then have to wait forever?
Yes, that's an example of deadlock.
You might want to read these two articles for a bit more on threads:
http://flounder.com/workerthreads.htm
http://flounder.com/uithreads.htm
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I would answer me
1) yes, immediate context switch with SendMessage
2) waits until event being signaled, scheduler switches when he feels so
3) dead lock possible with Sendmail, often discussed on INternet
4) no idea still
|
|
|
|
|
Sorry for the post name !
A week ago I posted a topic on clearing the screen in dos! Got four replies, none of which worked!
Here is the problem. I have the folowing code inside main().
cout << " Hi! I am dumb.";<br />
cout << endl;
// Here I need the screen to clear the way BASIC used to clear it when you put cls() or something like that, cant remember now.
// So that this next statment is printed on a clean dos screen!
cout << " Hi! I am dumb.";<br />
cout << endl;
Some one suggested to cls() but didn't mention the header, then someone else said to use clrscr() and #include conio but conio does not have any members with such name.
Even the docs supplied with VS 7 Ent. do not have any refference to cls() or anything even closely resembling it!
If some one actualy does know how to do this PLEASE HELP!
If somebody was offended by this post I aplgs! But some times you should take the time to read your own posts to see if they make sence or compile proper!
Thanks in advance.
|
|
|
|
|
CreepingFeature wrote:
Got four replies, none of which worked!
Were any of them FillConsoleOutputAttribute() and FillConsoleOutputCharacter() ?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I think I replied to your question or was it someone else's?? dunno well you should use
system("cls");
it's fast, easy and painless.
|
|
|
|
|
namethatnooneelsetook2 wrote:
it's fast, easy and painless.
It's also antiquated, inefficient, and reminiscent of Unix days. The system() function starts a complete command interpreter, which then executes the <insert command="" here=""> command. I cringe when I see solutions that have employed the system() function. There is virtually nothing it can do that can't be done better by a direct API call. I consider it to have died with Win16 and is kept on for backward compatibility with old 16-bit programs that are being converted.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Those are what is used in Q99261.
__________________________________________
a two cent stamp short of going postal.
|
|
|
|
|
I see that. What's your point?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Try this
void ClearScreen()
{
HANDLE hSTDOut = GetStdHandle(STD_OUTPUT_HANDLE);
COORD dwCoord;
DWORD nLength;
DWORD lpResult;
CONSOLE_SCREEN_BUFFER_INFO Info;
dwCoord.X = 0;
dwCoord.Y = 0;
// Get the console buffer info
GetConsoleScreenBufferInfo( hSTDOut, &Info );
nLength = Info.dwSize.X * Info.dwSize.Y;
// Fill the console with ' ' making it look like it has been cleared
FillConsoleOutputCharacter( hSTDOut, ' ', nLength, dwCoord, &lpResult );
// Set the console cursor position to 0,0
SetConsoleCursorPosition( hSTDOut, dwCoord );
}
|
|
|
|
|
Whilst using VC6 just now and somehow acceidentally press the certain key combination which means all tabs are now marked ">>" and all spaces ".". anyone know how I can turn this off please? Ta.
I feel like I'm diagonally parked in a parallel universe
Jerry Davis
http://www.astad.org http://www.jvf.co.uk
|
|
|
|
|
Jeremy Davis wrote:
anyone know how I can turn this off please?
Yes, just use Ctrl+Shift+8.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
|
I know this is another silly question, but what's the best way to return IDOK from my dialog without the user pressing a button? This is not meant to be a security loging I have, but just a login for record purposes. I store the last login in the registry, and when the login pops up, I populate it with the last login in the edit box. If that login is valid I just want to return IDOK without the user ever seeing the login dialog. How should I go about doing this?
[insert witty comment here]
bdiamond
|
|
|
|
|
bdiamond wrote:
what's the best way to return IDOK from my dialog without the user pressing a button?
How about just calling the base class OnOK() ?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Sorry for being so idiotic again. But I thank you once again. I also do VB and in the past few weeks I've been forced to learn Visual Foxpro and am now one of a two-man team that neither one of us really knows anything about vfp but were tossed into a large-scale project, so I think that has helped muddle my thinking some, also. I hope that sounds like a plausible excuse. Thanks
[insert witty comment here]
bdiamond
|
|
|
|
|
bdiamond wrote:
I store the last login in the registry, and when the login pops up,
Probably best to not popup the login dialog if the access information in the registry is valid. Of course, this will prevent the user from ever logging in as someone else (if this functionality is desired).
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I want it to still check just in case the user has been taken out of the system, login changed, etc. But if it has a valid login, which the string is sent to the dialog's constructor that was found in the registry, it calls the validate function and if it's valid, it will call the base class's OnOk() member. (Well, that's the way I'm hoping it works)
[insert witty comment here]
bdiamond
|
|
|
|
|