|
thank you!I think i understand the compatible bitmap and compatible Dc more than before.
|
|
|
|
|
My Setup Module creates a New Proprietary Database Folder, populated with New or Default Entries. The location is by default: "C:Program Files\ MyCompany\Data" I do not place the folder in "...MyDocuments", because the individual files do not make sense on their own, and should only be accessed and modified by the bespoke software I wrote. Has anyone any code snippet which will force this new folder to be shared by all network users, and full Security Access by All Users. (i.e. Remove ALL this unwanted Protection)
Regards,
Bram van Kampen
|
|
|
|
|
|
transoft wrote: I want the class B' funct() to be called. But it did not get called.
Aside from syntax errors (see #5 here), your code does exactly what you want. Why are you saying that B::funt() is not being called?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
|
It appears that "standard" CTreeView message TVN_SELCHANGED is send twice - on mouse button down and mouse button up. In my initial case on key down I can retrieve the root node text and then on key up I get the selected node text.
Do I have to keep track of previous and current node myself or is there another way to get just the current selected node (text) ?
I tried to use TVN_SELCHANGING but despite the MSDN description of this message the LPTSTR pszText item in NMTREEVIEW structure contains garbage and not the text info about the node.
Thanks for reading. Any constructive help as always is appreciated.
|
|
|
|
|
Try this,
NMTREEVIEW* pnmtv = (NMTREEVIEW*) pNMHDR;
CTreeCtrl& tc = GetTreeCtrl();
HTREEITEM item = pnmtv->itemNew.hItem;
CString Tree_str=tc.GetItemText(item);
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
What you have suggested is just another way to get the node string.
The message is still posted twice and I get the old (or root if it is a first change) and then the new selected one. I guess I will set flag or static counter to ignore the first one (I don't need it)
Kind of gross!
Thanks for you help.
Cheers Vaclav
This explains why the new selection gets highlited on mouse button down and the old selection gets a funky rectangle around it! I just did not see that while stepping thru the code!
modified on Saturday, August 8, 2009 6:26 PM
|
|
|
|
|
1. what is stack.
2.how we use the graphics in c.
|
|
|
|
|
kumarashoka wrote: 1. what is stack.
Do you mean "what is A stack", or "what is THE stack"?
Oh well I'll just answer both, since they have a lot to do with each other.
A stack is a data structure that lets you put something on top, and the only thing you can remove from it is the top.
THE stack, is a stack (well partly..), which grows downwards in memory on every architecture that you are likely to care about (which doesn't usually matter, unless you want to do low level things), and it stores things like the address where the current function will return to if you say "return ", it is also used to store some local variables (explaining exactly which is a little hard, but if you pretend a variable is on the stack, the compiler will make sure it is), and sometimes it is used to store function parameters (but not always, equally complicated, and they will be on the stack if you want then to be), and there can be some other things there which you usually don't have to worry about.
For return addresses, THE stack really is a stack, but the variables and parameters are accessed as if the stack is just a piece of memory - and that's exactly what it is, but we like to pretend that we can only take things off the top to make it easier to manage (and also it wouldn't make much sense to Not treat it like that in the context of functions calls)
|
|
|
|
|
|
kumarashoka wrote: 1. what is stack.
A LIFO queue.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
|
how a pointer save memory and what is the limitation of pointer.
|
|
|
|
|
(overly simplified)
A pointer does not save memory; it only points to another place in memory that contains "the stuff you want to point to" outside of the stack space.
There is no limitation of using pointers, it is powerful, but somewhat more "dangerous" to use. (lost pointers, lost memory, unchecked dereferences... )
...
This signature was proudly tested on animals.
|
|
|
|
|
Maximilien wrote: outside of the stack space
What makes you say that? It doesn't really make it any simpler.. and it's not even true
|
|
|
|
|
I have copied one of my programs into another program and made the necessary changes for the new program. But whenever I open a AfxMessageBox(,); it displayes the previous program's title in the title portion of the message box. How do I remedy this?
Sample code:
CString str = "Select the [OK] button to begin processing the data";
int nTest = 0;
nTest = AfxMessageBox(str, MB_OK);
(The title of the messagebox is that of the previous program.)
A C++ programming language novice, but striving to learn
|
|
|
|
|
Is this a CWinApp based application? If so...what is the value of the string in your project with resource ID AFX_IDS_APP_TITLE?
CWinApp::m_pszAppName[^]
Best Wishes,
-David Delaune
|
|
|
|
|
Yes, this fixed my needs. Thank you!
A C++ programming language novice, but striving to learn
|
|
|
|
|
I studied the msdn and the forum in detail but I could not figure out what is the problem with this code?
The key press event is not working?? SendInput API is a mess indeed.
INPUT input;
KEYBDINPUT kinput;
kinput.dwFlags=KEYEVENTF_KEYUP|KEYEVENTF_EXTENDEDKEY;
kinput.wVk=91; // key to activate start up window
kinput.time=0;
input.type = INPUT_KEYBOARD;
input.ki = kinput;
::SendInput( 1, &input, sizeof(input));
|
|
|
|
|
What does GetLastError() return?
[edit]
Maybe this link[^] may help.
[\edit]
|
|
|
|
|
I find the error.
Actually I am not assigning the proper values to flag. Documentation says that when key is pressed, do not assign any thing to flags.
KEYEVENTF_KEYUP
If specified, the key is being released. If not specified, the key is being pressed
|
|
|
|
|
At me a question. In the project I use CMapStringToOb, number of objects which I store in it much, the order 100000. Speed of work, including speed of work destructor, does not arrange me. A question in the following — there are any analogues CMapStringToOb which work faster? The Same question in occasion of CObList — I search for fast analogue.
Thanks in advance.
|
|
|
|
|
Hi I have a service written in Visual C++ 6 that needs to interact with an application written in vb.net. In my service I have used :
DWORD mymsg=RegisterWindowMessage("my_message")
to register a unique custom message.
I then use:
BOOL b=SendNotifyMessage(HWND_BROADCAST,mymsg,NULL,NULL)
to broadcast my message. However, I can't seem to be able to capture this message in the Windowproc function of my vb.net application.
Private Declare Function RegisterWindowMessage Lib "user32" Alias "RegisterWindowMessageA" (ByVal lpString As String) As Integer
Dim mymsg As Integer = RegisterWindowMessage("my_message")
Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
if m.Msg=mymsg then
--do something--
end if
end sub
Please help!
P.S.:I need to show a pop up in my .net application when it receives this message. The message values have all registered properly in both applications and are returned to be the same when I print them. Also the SendNotitfyMessage in my service returns a non zero value(supposed to indicate success). What do I do?? What am I doing wrong?
|
|
|
|
|
The message registered with RegisterWindowMessage are valid only for a session.
You cannot use this for your case since a service runs as a different user than the application.
You can instead use a named event for your purpose.
Use CreateEvent[^] to open/create an event both the service and the application.
Now your application can wait on the event handle that will be set from the service.
Just remember to give a name for the last parameter to the API.
And also remember to prefix the name with "Global\" .
So you could typically you a name like "Global\my_message" .
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|