|
Tim Smith wrote:
The handle isn't signaled until the thread is terminated, not started.
Absolutely. I probably didn't word things properly - I had meant that, as Carlos mentioned, that if beginthread returned a valid handle (instead of 0) then the thread proc had started, not that you should block on the handle. In the second example I meant to indicate that you signalled an event in the thread proc (that you created via CreateEvent(), etc.) and blocked on this after creating the thread if you wanted more control.
It's early here, I clearly need more caffeine...
Chistopher Duncan
Author - The Career Programmer: Guerilla Tactics for an Imperfect World (Apress)
|
|
|
|
|
It's early here, I clearly need more caffeine...
LOL, been there, done that.
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
Hi,
How do i can add printer like "add printer " from "control panel", i already have my own print driver, print processor. But i don't know how to add printer automatic ???
Please help me !!
Best regards,
mits
Never say "it's to late"
|
|
|
|
|
I've never used this command before, so iI may be completely wrong but there is an AddPrinter command. Look for it on MSDN. Perhaps this is what you're looking for?
Jeremy Davis
http://www.astad.org
|
|
|
|
|
Use the function
HANDLE AddPrinter(
LPTSTR pName,
DWORD Level,
LPBYTE pPrinter
);
Best Regards
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
I can't make my object get focus after clicking it while using normal view in word/excel.
Unlike in design view ,where u can resize the object....
|
|
|
|
|
So. Like I was saying, the powers that be took away my precious, precious ClassWizard. It used to be quite easy to add an OnInitDialog to my About box, just by going to the message map in the ClassWizard and adding a functino for the predefined OnInitDialog.
What are the steps to take to add one now, with the VC7 MDE?
- Jason
Do you have a Pulse?
SonorkID: 100.611 Jason
|
|
|
|
|
In vc7, there's no class wizard !!! Vc7 manage classes, files... by properties. To handle message, override method, virtual method, simple right click in your classes then select properties. the properties dialog should appear and then you can select message tab, attribute tab, or method tab and select what you need !!!
Hope this helpful !!
Good luck !
|
|
|
|
|
mits wrote:
In vc7, there's no class wizard !!! Vc7 manage classes, files... by properties.
I haven't moved to VC7 yet, and I've heard a lot of noise about no class wizard, but from what you're saying, it sounds like we didn't lose any functionality in this regard - they just moved it to a different UI.
Would this be a correct statement?
Chistopher Duncan
Author - The Career Programmer: Guerilla Tactics for an Imperfect World (Apress)
|
|
|
|
|
Hmm. Yes and now. There are wizards for most things like creating classes and projects. Creating methods or event handlers however, is much easier without the wizard interface and a welcome change.
Cheers,
Tom Archer
Author, Inside C#
Best mini-putt score = 22
|
|
|
|
|
I've found this MSDN page* that helps us with the transition.
* opens in new win
- Jason
Do you have a Pulse?
SonorkID: 100.611 Jason
Veni, vidi, VC
- I came, I saw, Visual C
|
|
|
|
|
Great page, Jason. Thanks!
Cheers,
Tom Archer
Author, Inside C#
|
|
|
|
|
Yeah, you're right !!!
they just moved it to a diffrent UI.
I'm sorry !
|
|
|
|
|
I have been trying to debug my ISAPI extensions on Windows XP pro. But i cant get it work. When I try to use a method from a book it gives me error you dont have required previliges on Internet Explorer but if i use extension without debugging it works fine. Also I cannot get the attach to process method t odebug. Can someone help me out what is wrong. Attach to process just closes my project and opens inetinfo.opt. Can someone guide me step by step.
In my dream, I was dorwning my §orrow§
But my §orrow§, they learned to §wim
|
|
|
|
|
How do you make to use a CListCtrlEx (my CListCtrl) with GetListCtrl into CListView?
|
|
|
|
|
Something along m_yourListCtrlEx.SubclassWindow(GetListCtrl.Detach()) might work. Not 100% sure, though.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
i need to remove some buttons and to change some others from the predefined of a propertysheet mfc dialog.
it's possible by hooking somehow, but i think that it should exist an easyer way to accomplish this.
need some advice.
rechi
|
|
|
|
|
In CYourPropertySheet::OnInitDialog , GetDlgItem(IDOK) will give you a CWnd * you can use to manipulate the "Accept" button in any manner you please (similarly for IDCANCEL ).
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
this is true, but i would like to change the dialog by simply setting some flags; for example, you can remove the 'accept' button this way:
dlgPropertySheet.m_psh.dwFlags |= PSH_NOAPPLYNOW
otherwise, the remaining buttons need to be rearranged and this sucks.
anyway, thanks!
rechi
|
|
|
|
|
Hi!
I need to create a 22-bit-Hash of some PC-specific ID. I though of UuidCreateSequential, and hash the MAC part of the generated ID.
Now I absolutely don't know what makes a good hash function. It doesn't need to be very fast, and not overly sensitive. Any suggestions or links?
-------------
From Hash functions I've seen, I've come up with the following:
take the last six bytes of the ID, and
long hash = 0;
for(i=10..15) {
hash <<= 2;
hash |= id_byte[i];
}
(which creates only 20 bits, but that's ok...)
TIA
Peter
|
|
|
|
|
I'm trying to fetch the user of this program's handle from a file when my SDI application loads. I have the following at the end of my CPuppyView::OnInitialUpdate():
if (!pDoc->LoadHandle())
{
CHandleDlg dlgHandle;
if (dlgHandle.DoModal() == IDOK)
{
CString h;
dlgHandle.m_cHandle.GetWindowText(h.GetBuffer(65), 65);
h.ReleaseBuffer();
strncpy(pDoc->handle, h, 63);
}
else
return;
pDoc->SaveHandle();
}
GetDlgItem(IDC_HANDLE)->SetWindowText(pDoc->handle);
Something about this code is ASSERTing, and it's rdiving me nuts. I'm pretty sure it's something to do with the CEdit control I'm using for CHandleDlg::m_cHandle (I know, I know, it sounds a bit like m_cHammer, but I'm pretty sure it's not that). I'm using the VC7 MDE which very sadistically doesn't have the ClassWizard I'm used to. So maybe I've added the CEdit control wrong? Or maybe I'm just missing something in that code that is very obviously wrong.
- Jason
Do you have a Pulse?
SonorkID: 100.611 Jason
|
|
|
|
|
The problem is that the underlying window encapsulated by dlgHandle (and all its controls) are destroyed by the time DoModal returns. To fix this, I'd suggest adding associating your edit box with CString variable (rather than a CEdit ), that will be accessible after DoModal .
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Ah, yes! That was precisely the problem. Thanks for the help.
- Jason
Do you have a Pulse?
SonorkID: 100.611 Jason
|
|
|
|
|
I want to remove the menu attached to my mdi application. Also i want my mainfram as well as childframe maximised along with this. How to get this?
Pls help
vini
|
|
|
|
|
Hi,
I have two RGB values of same color, one is lighter and the other is darker. E.g., (107,113,181) and (74,85,132)
How could I judge they are same color by an algorithm?
Thanks.
Shawn Liu
|
|
|
|