|
in the WM_CHAR message handler there is a nRepCnt variable that tells the number of times the key is pressed. This is in MFC handling.
|
|
|
|
|
Thanks GLS/\/\artee
|
|
|
|
|
Hi All,
I have a problem with disconnected recordsets.I have a component.One if
it's function will get selected Records in a Database.I am passing the
Recordset pointer from the server to the Client.I am using disconnected
recordsets for this.
I can see that at the server side I am getting the Recordset
pointer.But, I could not get this pointer on the client side.
the function has the protoype
STDMETHODIMP GetSpecificElements([in]struct filterData, [out] IUnknown
**ppRecordset); //filterData is a structure containing the Filter
Conditions for getting selected Records from Database .
I could get the Recordset pointer at the server side, but could not pass
it to client.I am using Client side cursor(adUseClient) and standard
Marshaling.I am using some user defined classes inside this
function to Open Database and get the Recordset Pointer .I could
get the Recordset Pointer inside these classes , but failed to get
this pointer from this function to client .Does the Disconnected
Recordsets vary between ADO and ADOX ?
what could be the problem ?
Thanx in advance for the help.
Regards,
yamini
|
|
|
|
|
hai
my project works on WindowsNT.i was asked to code for the faxing madule.we r trying to implement this through code.i know that we can fax the documents from MicrosoftoutLook,so we can call its object from our code and we can fax the things.but the thing is we r trying to make it without using third party controls.in MSDN April201 versionHelp they have given the APIs which support only 2000 or later.i want to run it only from NT.so can anybody help me to complete my task?u guyz have played with these type of small codings, right?
|
|
|
|
|
I'm not aware of any free faxing code but maybe you might find this site useful http://www.ntfaxfaq.com/pages/faxapi.htm
Michael
|
|
|
|
|
i got this programming assignment that i cannot figure out how to design an algorithm for ... is someone could help, please do ... thanks .... here is the problem:
suppose the integers 1,2,3,...n are given in this order and offered as input to a collection of two queues, queue 'q0' and queue 'q1'. the number '1' is given first, followed by '2', etc. this input sequence can be permuted in different orders by executing the queue operations q0.enq, q1.enq, q0.deq, and q1.deq a particular order. for example, if the input sequence 1,2,3, then five different outputs can be obtained:
OUTPUT: CONTROL SEQUENCE:
1,2,3 q0.enq, q1.enq, q0.enq, q0.deq, q1.deq, q0.deq
1,3,2 q0.enq, q0.enq, q1.enq, q0.deq, q1.deq, q0.deq
2,1,3 q0.enq, q1.enq, q1.enq, q1.deq, q0.deq, q1.deq
2,3,1 q0.enq, q1.enq, q1.enq, q1.deq, d1.deq, q0.deq
3,1,2 q0.enq, q0.enq, q1.enq, q1.deq, q0,deq, q0.deq
3,2,1 not possible
Not all permutations on n integers are possible as output, as illustrated above with desired output 3,2,1, and some permutations have many possible solutions. in fact, the sequence 1,2,3 can always be recovered regardless how the numbers are distributed over the queues q0 and q1 and this project is to write an algorithm that determies if the desired output sequence is possible, and if so, which sequence leads up to it. we will do this by attaching two contol numbers to the control sequence, one control number for the 'enqueues' and one for the 'dequeues', as followeds: interpret and 'q0.enq' as '0' and an 'q1.enq' as '1', so that the sequence of enq's becomes a string of 0's and 1's, that can be interpreted as a binary number. the same can be done for the deq's. thus the above table becomes:
OUTPUT: enq-number deq-number
1,2,3 (010)=2 (010)=2
1,3,2 (001)=1 (101)=5
2,1,3 (011)=3 (101)=5
2,3,1 (011)=3 (110)=6
3,1,2 (001)=1 (100)=2
3,2,1 not possible
okay ... hopefully you understand what my project is, if someone could help me out with the algorithm for this problem i would be in great debt to you ... btw, if you are concerned about this being illegal to help me on the project, don't be ... we are allowed to get help from published sources ... ie here ... thank you
|
|
|
|
|
i'll take any ideas or suggestions ... please help
|
|
|
|
|
Hi,
Can we make dialog with ALPHA EFFECT(we can see through the current dialog) with all the version of Win32
Thank
|
|
|
|
|
The SetLayeredWindowAttributes function which makes this possible is available on W2K and XP only.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
There is a sample named sampgrabcb in directshow sdk.I used GraphEdit to learn
how many filters used in the filter graph and found the BitBucket Filter
connected between decompressor and null renderer,who knows the BitBucket filter's
functionality and usage?
|
|
|
|
|
I am supposed to create dynamic controls at runtime. I have to create a class that accepts some parameters, based on the active window. Then based on the parameter, it has to create controls at run time, in the left pane. The number of controls and their type varies based on the active window in the right pane.
Then, I need to handle the values from the controls that are created. I may have to maintain a string table or something for all the controls created and then handle it seperately.
I am new to VC++ and any help will be greatly appreciated. Any sample code or location of examples will be a lot of help. Please help.
|
|
|
|
|
One approach I've seen is to add all the controls you'll need to the form before hand, but without the 'Visible' attrib. Then you just get pointers to the controls you need and ShowWindow(SW_SHOW) - maybe positioning them as well, depending on how cluttered your form gets in the resource editor.
An array of control IDs for each pane type could be useful both for the display and later data retrieval.
|
|
|
|
|
Hello All,
In my App. I have the full Path and the Full name of a File, So I was wondering if there is a way (or an Win. API) to get or Convert this Full Qualified Path to its Dos format.
Thanks in Advance for your Help
Fady Elias
|
|
|
|
|
Check out the GetShortPathName win api function in MSDN.
|
|
|
|
|
How can I convert a CString to a char *
greetz RRemzie
|
|
|
|
|
Why would you need to when operator char * is overloaded ? You can just pass in a CSTring. However, GetBuffer will give you access to the underlying data if you need it - don't forget to call ReleaseBuffer afterwards.
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
You can do the following:
CString casa = "casa";
LPTSTR string=casa.GetBuffer(256);
char *character;
character=string;
Kisses and Regards
|
|
|
|
|
First cast it LPCTSTR then to char * the code would be like this.
(char *)((LPCTSTR)strSampleString)
Vijay
|
|
|
|
|
I have a dlgbar in mainframe, with its resident controls accessed directly by cmainframe ( as modeless dlg ). The problem is that certain user actions on the dlgbar ( closing it via the system close icon, or moving / resizing it ) need to cause additional action. I have tried deriving a class from CDialogBar to manage the bar and adding to the message map to trap these actions, but do not seem to get any effect, except during program initialization or shutdown.
( eg: I tried processing wm_destroy in CDerivedDialogBar and got an effect only when the program terminated. I tried processing wm_close and got no effect at all. )
Anyone know what messages I need to process or how I can trap these actions?
This is driving me nuts trying to find solutions.
Thanks
|
|
|
|
|
CControlBar-derived objects (including CDialogBars) are not destroyed when you click on the 'x' icon - MFC just hides them. To trap this event, you can override virtual method CControlBar::DelayShow. The function is undocumented, but worked OK for me.
What kind of problems are you having with resizing? No WM_SIZE message?
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
Thanks. That sounds like it might be what I need, but what are the parameters for DelayShow()?
As for the other, it's not a problem with resizing as such, but rather a result of any user action on the dlgbar window itself. This particular bar is set to float or dock, and it contains a listcontrol which is its main feature. Whenever the bar is moved, the input focus switches to the bar itself, and stays there. I need it to return to the listcontrol after the move is complete ( as soon as the mouse is released ).
Thanks again.
|
|
|
|
|
> what are the parameters for DelayShow()?
It's declared like this in afxext.h:
virtual void DelayShow(BOOL bShow);
Are you using 'raw' CDialogBar or some derived class?
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
I'm using a derived class with one additional member -- a boolean flag representing the bar's visibility state.
Thanks again.
|
|
|
|
|
Hi all.
I'm writing program by MSCOMM ...
I wrote sending data section in my program.
My problem is in getting data section !!!
It mean i don't know for getting data i must use which function !!!
I must use, GetInput() or SetInput() or ... ?!!!
Please help me ...
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
There are a couple of ways to take care of this problem. I'll tell you about the way I solved it in my project a couple of weeks ago...
The GetInput function gives you the content of the input buffer and it resets the input buffer to empty (that is, if you do it correctly in respect to VARIANT types... I told you this a few weeks ago). Now you can choose to work on event-basis or on time-basis. If you work on even-basis, you have to catch the 'input buffer threshold reached' event. You can program the 'GetInput' function right inside the event handler and store the received character(s) in a string member variable. If you choose to work on a time-basis you will have to start polling the size of the string already in the inputbuffer. Don't forget to program a time-out procedure in the latter case, because if you don't and the communication gets messed up, your program will hang!
Now, in either case, you have to think of some wat to package your communication. I packaged my messages inside STX and ETX commands (some low-value ASCII characters). You can then extract the messages from your member string variable by searching for ETX commands (you can use whatever you want of course, even \n if you like).
Hope this helps a little!
Structured programming vs. chaotic mind boggling
|
|
|
|
|