|
Well it is not your fault: first of all the are carved into the CodeProject's soul, then, sooner or later, they magically will appear again (at least I hope).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
learning is lifetime..do keep learning and reading!!
have a great day!!
thanks to all!!
|
|
|
|
|
Hi All,
I know the process name. I want to getting notified on the starting/Exiting of that particular process in my program.
Is there any method for this other than repeatedly enumerating all the running processes and checking for that particular process.
Thanx in advance.
|
|
|
|
|
You need to read Detecting Windows NT/2K process execution[^](An article on how to get notification from the OS when a process starts ).
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Thanks for the reply Hamid.
This articles describes about the development of a Processor Monitoring Application by Implementing a Kernel-mode driver, using the kernel mode driver API PsSetCreateProcessNotifyRoutine().
But I can't use this since I have to implement the Process monitoring in my MFC dialog baesd application.
|
|
|
|
|
Hi All,
I need the sample code for splitter window in dialog based application without using SDI.
Thanks and Regards,
Anitha
|
|
|
|
|
|
I'm trying to extract an icon from an exe file. I've managed to find Its raw data within the EXE file; but this raw data differs from a *.ICO file! I mean It's not possible to use an HEX editor to copy the raw data and save It as a *.ICO file. any help?
Thank you masters!
|
|
|
|
|
Do you need to extract an icon of a file?
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
No, I don't. I just wanna LEARN.
Thank you masters!
|
|
|
|
|
|
Hi All,
I am writing one function that should return me a difference between given dates in months. I know it can easily be done by getting difference in years, months and days. Then calculate months like
trmMonths = 0;
trmMonths += years * 12;
trmMonths += months;
But i am not sure about what to do with days, because sometimes it may happen that difference between dates would be years = 1 months = 11 days = 28. in this case the difference between dates should be 24months.
Can anyone give me idea on how days can be handled here to get accurate difference?
Thanks,
AksharRoop
|
|
|
|
|
AksharRoop wrote: But i am not sure about what to do with days, because sometimes it may happen that difference between dates would be years = 1 months = 11 days = 28. in this case the difference between dates should be 24months.
Err I'm totally confused by your sentence here. Could you explain a bit better what is the problem exactly ?
Are you using COleDateTime and/or COleDateTimeSpan classes ? This could help you manipulating times.
|
|
|
|
|
I have a strange issue. There are 3 radio buttons that are grouped horizontally are showing wrong behavior.
By default two radio buttons are checked and one is unchecked.
When you click on any Radio button it becomes unchecked and the remaining two becomed checked.
The code is working totally fine when there is no RTL support.
However after applying the RTL support the above problem starts to occur.
I have a custom library that draws the radio buttons.
|
|
|
|
|
Using createprocess I am invoking a dialog based application and from the processid I am getting the HWND of the dailog and then setting the window position, till now it's fine.
The problem comes when we try to invoke a dialog based application(using create process) which has an error in initializing(displays warning or error message)after pressing ok on error message the dialog is invoked for which we are unable to setwindow position because of error message. How can we by-pass the error message and set the position of dialog???
Note: We do not have code for invoked process.
|
|
|
|
|
Hi everyone,
Could anyone please help me to play a wav file. Acually I have some wav data in my hand(which I converted from .vox formate). Now in order to make it play, I guess i need to add some header and all which I don't have much idea. Could anyone please tell me how to add these header using c++,..may be a standard header.
Regards,
Himangshu S
|
|
|
|
|
Member 4250705 wrote: Could anyone please help me to play a wav file
PlaySound[^] ?
|
|
|
|
|
In order to play a wav raw data, you should know more details about its sampling, bit rate, number of channels, etc.
This[^] might help you.
- ns ami -
|
|
|
|
|
Hi,
I have started using VC 2008 and MFC feature pack. Could anyone tell me as whether there is any way to make the visual style and colors of the application even applicable to the dialog boxes and the controls placed on the dialog boxes ?
Thanks in advance.
Taruni
|
|
|
|
|
I have removed caption bar of the dialog box, i want a context menu on right click event anywhere on the dialog?
and also i want to change background color of the dialog box?
|
|
|
|
|
To show context menu on right click, map WM_RBUTTONUP and write...
void CMyDlg::OnRButtonUp( UINT nFlags, CPoint point )
{
CMenu menu;
menu.LoadMenu( IDR_MENU1 );
ClientToScreen(&point);
menu.GetSubMenu( 0 )->TrackPopupMenu( 0, point.x, point.y, this );
CDialog::OnRButtonUp( nFlags, point );
}
To change the background map WM_ERASEBKGND and write...
BOOL CMyDlg::OnEraseBkgnd( CDC* pDC )
{
CRect rect;
GetClientRect( &rect );
pDC->FillSolidRect( &rect, RGB( 255, 192, 0 ));
return TRUE;
}
- ns ami -
|
|
|
|
|
thanx for reply...but problem is that whenevr i am adding menus from resource view ID can not be edited so what shoud i write in menu.LoadMenu( IDR_MENU1 )?
|
|
|
|
|
crazy_sam wrote: ID can not be edited
Why? You can set the ID in properties.
crazy_sam wrote: what shoud i write in menu.LoadMenu( IDR_MENU1 )?
Here IDR_MENU1 is only a sample. You can give your own menu's ID.
- ns ami -
|
|
|
|
|
Ok...I got it.
|
|
|
|
|
hi.i have question.this is the subject of my project:
He has a table with three face-up cards in a row: two jokers and one ace, with the ace in the middle. After you make a small wager, he turns the cards face-down and begins to manipulate the cards, swapping cards two at a time. After he completes the swaps, you are then to guess which card is the ace.
The series of card swaps will be given to you in order as a String swaps, containing only the characters 'L', 'R', 'E', and 'F'. swaps[0] indicates the first swap. The 4 characters indicate the following moves:
L: swap the left and middle cards
R: swap the right and middle cards
E: swap the cards on the ends (the left and right cards)
F: fake swap (no cards actually change position)
Write a method that returns the final position of the ace, after all the swaps have been performed. Your method should return "L" if the left card is the ace, "R" if the right card is the ace, and "M" if the ace is in the middle.
and this is the source of project:
#include <iostream>
#include <string>
#include <cctype>
using namespace std;
class cart{
public:
cart(char a[2]="paq"){
cout << a[0]<<a[1]<<a[2];};
char left()
{
char a[2];
swap(a[0],a[1]);
for (int b=1;b>=2;b++)
cout << a[b];
return 'L';
};
char right()
{
char a[2];
swap(a[2],a[1]);
for (int b=1;b>=2;b++)
cout << a[b];
return 'R';
};
char en()
{
char a[2];
swap (a[0],a[2]);
for (int b=1;b>=2;b++)
cout << a[b];
return 'E';
};
char fo()
{
char a[2];
for (int b=1;b>=2;b++)
cout << a[b];
return 'F';
};
};
int main ()
{cout << "swap the cart juker1,ace,juker2" <<endl;
char b[50];char a[2];a[0]='p';a[1]='a';a[2]='q';
for (int i=1;i>=50;i++){
cin >>b[i];
if (b[i]='.') break;
};
cart x;
for (int i=1;i>=50;i++){
if ((b[i]='l')|(b[i]='L')) x.left();
else if ((b[i]='r')|(b[i]='R')) x.right();
else if ((b[i]='e')|(b[i]='E')) x.en();
else if ((b[i]='f')|(b[i]='F')) x.fo();
};}</cctype></string></iostream>
but my question :
i cannot understand what is the reason of error.
really i don't know what can i do.
thanks for attention.
|
|
|
|