|
|
Well, you are probably right, which is why I wrote ...etc as I meant to give the user an idea. I would be surprised to see code like this used as-is.
this is this.
|
|
|
|
|
khan++ wrote: I would be surprised to see code like this used as-is.
don't ! there are so many beginners asking here that they probably think one could give them a full working code...
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VCalc 3.0 soon...]
|
|
|
|
|
I am trying to obtain the SID of the user currently logged in. I obtain the user name using GetUserName, and then the SID using LookupAccountName. This works, however the documentation of LookupAccountName says I must pass the "domain_name\user_name" for the lpAccountName parameter. Does anyone know how to obtain the domain_name of the domain the user is currently logged in?
thanks!
|
|
|
|
|
You can try reading the USERDOMAIN environment variable...
People that start writing code immediately are programmers (or hackers), people that ask questions first are Software Engineers - Graham Shanks
|
|
|
|
|
Hi!
Could anybody suggest me some good books, or free tutorials about MACROS IN vc++.
tHANX
"If you change then change for the good."
|
|
|
|
|
Try here[^]. Boost is full of goodies, simply reading the Boost documentation makes you a better programmer and gives you ideas.
Steve
|
|
|
|
|
I am tryin out a control array with edit boxs, but i encounter the following when i click on class wizard : "Parsing Error: "Expected";" ,Input line CEDIT m_id[17]; "
Can someone tell me what went wrong here ?
|
|
|
|
|
I think you are not allowed to use an array etc inside the ClassWizard's area. I would suggest putting it outside of the ClassWizard's block like:
...<br />
CEdit m_id[17];
this is this.
|
|
|
|
|
|
Hello... can you please tell me how to make a program that will draw graphs.. by given data? This is just a simple graph...
|
|
|
|
|
Hi,
If u r looking for 2D graph, check this link NTGraph[^]
Bye,
Cool Ju
Dream Ur Destiny
|
|
|
|
|
Try this
http://www.codeproject.com/docview/graphfx.asp
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."
XMinds
|
|
|
|
|
Hello... can you please tell me how to make a program that will draw graphs.. by given data? This is just a simple graph...
|
|
|
|
|
|
Hi all,
I developed a Dialog based application that has several timers. My app priodically post some message to another modelless dialog (monitor dialog).
But I found that every time user press and hold mouse buttons on control box of the dialog (System menu, minimize, maximize button) of hold right mouse button on title bar, all timer blocked and no message is posted to the monitor dialog.
I also tried to move timers to another separated thread in a SDI application but problem remains the same.
Did anyone face this problem before? Any solution to this??
Thank you for your precious time on my post.
Have a good time!
Kemi
|
|
|
|
|
I made a test app and didn't experience any such problems. Can you give more details?
Steve
|
|
|
|
|
Hi Steve,
Thank you for your reply. OKey. I will discrible my situation in more details:
My App consists of 2 dialogs: main dialog and the Monitor dialog.
- Main dialog has a timer (started in OnInitDialog with enlapse time = 100ms). When the time enlapsed, PostMessage to Monitor dialog.
- Monitor dialog: modelless dialog created and shown in OnInitDialog of the main dialog, contains a ListControl. Every time when receives a message from Main dialog, insert a new string to the list control (such as "New message from main dialog" )
When I run app, the list control on Monitor dialog continuously filled with new rows. But when I PRESS and HOLD left mouse button on control boxes or PRESS and HOLD right mouse button on Title bar of the main dialog, The list control stops adding new rows until the mouse released. => My app somehow blocked!!
That's my problem. Is this clear? Any suggestion?
Thanks,
Have a good time!
KEMI
-- modified at 0:51 Tuesday 7th February, 2006
|
|
|
|
|
What kind of timer are you using. I use the SetTimer API which posts a WM_TIMER message to my window. Are you calling PostMessage explictly?
Steve
|
|
|
|
|
I used SetTimer() API too.
Well, wouldit be easier if I post some code here?
Main dialog:
BOOL CTestDlg::OnInitDialog()<br />
{<br />
CDialog::OnInitDialog();<br />
SetIcon(m_hIcon, TRUE);
SetIcon(m_hIcon, FALSE);
<br />
m_TimerId = SetTimer(1, 300, NULL);<br />
<br />
if (!::IsWindow(m_monitorDlg.GetSafeHwnd()))<br />
m_monitorDlg.Create(IDD_DIALOG_MONITOR, this); <br />
m_monitorDlg.ShowWindow(SW_SHOW);<br />
<br />
return TRUE;
}<br />
void CTestDlg::OnTimer(UINT nIDEvent) <br />
{<br />
if (nIDEvent == 1)<br />
::PostMessage(m_monitorDlg.GetSafeHwnd(), WM_USER+1, 0, 0);<br />
CDialog::OnTimer(nIDEvent);<br />
}
Monitor Dialog:
LRESULT CMonitorDlg::WindowProc(UINT message, WPARAM wParam, LPARAM lParam) <br />
{<br />
if (message == WM_USER+1)<br />
{<br />
m_list.InsertItem(0, "New message from Main dialog!");<br />
} <br />
return CDialog::WindowProc(message, wParam, lParam);<br />
}
In my opinion, it's all clear and simple. Any idea pls?!
Have a good time!
KEMI
|
|
|
|
|
I think it is because of the timer messages stop coming when you press and hold the left or right mouse buttons on the title bar etc. Then when you release the button, all the messages arrive that were stuck in the queue.
The solution could be to use multi-media timers.
this is this.
|
|
|
|
|
I have an app I wipped up and the timer messages arrive just find when I'm dragging the dialog.
Steve
|
|
|
|
|
Yes, the timer messages come just fine when dragging the window, but when you have the left button down on the Control-box the X button etc, that they stop. Also when you keep your Right-button down on the title-bar, that they stop coming as well.
this is this.
|
|
|
|
|
You're right. I didn't know that. You live and learn.
Steve
|
|
|
|
|
I've tried with multi-media timer already in SDI test application. It SEEMED work.
But when pressing and hold mouse buttons on title bar, application still blocked. And when mouse released, I found that some messages was added to list control in a batch. It seems like the message was queued and the interface still looks blocked. That not what I expected to see.
Thanks for your suggestion. Any other ideas?
Have a good time!
KEMI
|
|
|
|