|
Hi.
I am using WH_CBT hook to trap WM_CREATE message. I want to get the handle,className …………. form CRETESTRUCT pointer which is in the lParam
I cant retrieve this information I tried every thing I know. Can some body please
Help me
Regards
Gau.
;);P
Gaurika Wijeratne. // www.gaurika.com
|
|
|
|
|
What have you tried, and what are you experiencing that is preventing from letting you get this information?
I just want to be clear on one other thing, are you using the CREATESTRUCT structure?
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Yes I am using CREATESTRUCT structure.
it doesn't give any errors. I casted the lParam to CREATESTRCT and trying to
get the class name from it. but nothing is coming.
but when I put a catch with "..." ,it is catching a error.
I just want to check the class name with a string and destroy the window if it is a match....
Gaurika Wijeratne. // www.gaurika.com
|
|
|
|
|
It looks to me that the CREATESTRUCT structure is not used directly.
I beleive that it sends a CBT_CREATEWND structure instead, and embedded in that structure is the CREATESTRUCT structure.
[msdn]
CBT_CREATEWND
The CBT_CREATEWND structure contains information passed to a WH_CBT hook procedure, CBTProc, before a window is created.
typedef struct tagCBT_CREATEWND {
LPCREATESTRUCT lpcs;
HWND hwndInsertAfter;
} CBT_CREATEWND, *LPCBT_CREATEWND;
[/msdn]
Try that and see if it helps
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
The name may also be stored in an ATOM. Then you can use GetAtomName or GlobalGetAtomName to get the string involved. I don't remember the exact sequence, but FindAtom or GlobalFindAtom might be involved.
Joel Lucsy (jjlucsy@concentric.net)
|
|
|
|
|
Hey, can anyone give me any ideas on where I can look for some info/examples of how to do FTP. I am looking for a way to get an FTP address, password, and username, establish an FTP session, send file(s), close the session, then periodically open the FTP session and see if any files are being FTP'd to me. This functionality is new to me. I am not sure where to look for articles, I am using MFC/C++, no C# or anything like that.
|
|
|
|
|
Yes, search CodeProject!
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
I hate answers like these because I usually do look through the articles first and post questions when I cannot find an answer. So, just to let everyone know, I DID SEARCH CODEPROJECT? I found 2 articles, basically. And neither were that good. I would like information on how to create this not how to download source code someone else has put together. Any other ideas?
|
|
|
|
|
I'm sorry, but you didn't tell!
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
This should get you going. CFtpConnection. Not sure how many people use the wininet stuff, but this seems to do the job.
-Matt
------------------------------------------
The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall
|
|
|
|
|
Please HELP!
I have a CPropertyPage class...
I have changed the constructor from
CMeasureItemsPage();
to
CMeasureItemsPage(CRoom* pRoom);
I need this, because the page of the property sheet must working with this member!
After this change Visual C++ says:
error C2512: 'CMeasureItemsPage' : no appropriate default construc
The error is at the following line:
IMPLEMENT_DYNCREATE(CMeasureItemsPage, CPropertyPage)
What's wrong? Why does the IMPLEMENT_DYNCREATE macro needs a default constructor?
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
Try changing your constructor to:
CMeasureItemsPage(CRoom* pRoom = NULL);
IMPLEMENT_DYNCREATE is used for MFC objects that are "dynamically created" by the framework (for example, when they are serialized to/from a file). Adding the = NULL default argument satisfies the requirement for a default constructor. It sounds like you're not going to doing anything that requires it, but you could add a check in your constructor:
if (pRoom == NULL) {
}
in order to handle that case.
Gary R. Wheeler
|
|
|
|
|
Thanks!
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
I have recently taken over development of an application that uses modal dialogs for everything and they are designed to overlap each other (full screen windows ce device). This scenario worked fine until a request came in to 'skin' the app for use on the local machine while demoing the program.
I can get the first dialog converted over to be a child view and run in my 'skin' container dialog but soon as I try showing the other screens, they go modal which takes a way any control of the skin. Plus the dialogs begin competing with each other and begin overdrawing each other (raw painting to the screen, and now child controls).
Finally it seems that the message pump for key presses stays with the first child even if set focus is sent to the new child dialog that is sitting on top.
My question is this: How would I make modal modelesss dialogs - ie I want to behave as if they were modal but not be modal to the skin dialog so it can still receive mouse clicks and key presses. I feel this would also help with the competition of the drawing code so the screen doesn't swap between dialogs.
Please Help.
Sincerly,
Clint Singer
|
|
|
|
|
You can look at how MFC implements DoModal, and do something similar to that.
Basically a modal dialog is just a modeless dialog, where a second message pump has been placed on the stack in order to process the messages, and the parent window of the modal dialog has been disabled to prevent focus from going back to the parent window.
When you create your own message loop, one other thing to be aware of is that you will need to be sure to call IsDialogMessage to dispatch your dialog messages. THis is how the tab control and other special dialog functionality is performed.
Good Luck
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Hi, all
I created a Dropdown ComboBox. now I want to handle the CBN_EDITCHANGE message. At that time, how can I get the text in the editbox of the combobox box? I know one way is to use UpdateData, but it will update all the data include other controls, how can I just get the text of the combobox?
Thanks in advance
|
|
|
|
|
if MFC:
int CComboBox::GetLBText( int nIndex, LPTSTR lpszText ) const;
void CComboBox::GetLBText( int nIndex, CString& rString ) const;
if Win32:
CBN_EDITCHANGE
idComboBox = (int) LOWORD(wParam); // identifier of combo box
hwndComboBox = (HWND)lParam; // handle to combo box
So: use ::GetWindowText with the window handle as the Handle of the combobox, hope this help
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
I have been trying for days to figure out how to force tapi to connect at 2400 baud no matter what modem is connected to the com port, i have tried every concievable method in the documentation for setting the baud rate, with TAPI promptly ignoring ever one of them, i know this because i have a line analyzer telling me what is coming out the back end. What is the magic trick to force modems to only dial 2400 baud without user intervention, and stop auto - negotiating baud rates. AT commands will not help as they very considerably between vendors. Maybe this is just impossible!
|
|
|
|
|
What code are you trying to use to set the baud rate? What TSPI is the modem using for its TAPI functionality?
I've found this article useful for serial comms,
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp[^]
it uses BuildCommDCB for setting the baud rate.
Michael
"I've died for a living in the movies and tv.
But the hardest thing I'll ever do is watch my leading ladies,
Kiss some other guy while I'm bandaging my knee."
-- The Unknown Stuntman
|
|
|
|
|
I have a simple problem with MFC and VS6 - I want to display a progress bar whilst I'm loading a lot of data. The load happens in a method of my class, which is created under the application's document class. My simple question is - how do I get hold of the parent window needed to create the CProgressCtrl? Can I use GetFocus() somehow?
cheers
Andrew
|
|
|
|
|
how do i write the programe.....
i want to pass a para in Vb to VC and show in VC
please hejp me~~~~~~~~
in VB:
public sub form_mousedown(...)
'sent a message to VC
'and display in VC file,
'the message just like "Hi,Wellcome to VB and VC"
end sub
and i don't konw how to write those code in VC
because i have never learned VC,so i really need to everyone helps...
can you write a simple code to me,let me see the file in VC
and write a dll file make the qeustion can work ...
i really need your help....thanks~~~~~~~~`Good luck
|
|
|
|
|
Post a message to the VC++ Application and there implement a callback that will be called for u
afx_msg LRESULT memberFxn(WPARAM, LPARAM);
But u should know a bit of VC++ o do that im sure
|
|
|
|
|
|
Why evil??
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
can you write a simple code for me???
i really don't know how to write code in VC....
so....
help me thanks~~~~~~~~~~~~~~
|
|
|
|