|
char next[25];
CString str;
...
while(fin >> next)
{
str = some_unique_identifier + next;
m_skills.AddString(str);
}
|
|
|
|
|
I am using two network cards on a system.
I am using winpcap to send the packet that I receive from one interface and sending it to the other interface the packet does reach the intended destination but the reply(ping request is reached at the destination but reply does not generate) does not appear.
Please If you can help me in the solution of the problem.
Reply me soon
|
|
|
|
|
I am using WinExec("C:\\logfile.txt",SW_SHOW) to open my file in a notepad on pressing a certain button but the file is not opened in the notepad. Infact nothing is happening when I press the button.
I am using the same code of line WinExec("Notepad.exe,SW_SHOW") to open the notepad and it is working properly there. Plz give me its solution, by just giving the path of our file, it could open in a notepad.
thanx
Reply me soon
|
|
|
|
|
summo wrote:
I am using WinExec("C:\\logfile.txt",SW_SHOW) to open my file in a notepad
According to MSDN, the first parameter of WinExec is "Pointer to a null-terminated character string that contains the command line (file name plus optional parameters) for the application to be executed". In other words, first parameter must include name of program you want to execute. WinExec is not shell-oriented, i.e., it does not "associate" file types with applications. What you want is ShellExecute, which is shell-oriented:
ShellExecute(NULL, "open", "C:\\logfile.txt", NULL, NULL, SW_SHOW);
Best wishes,
Hans
|
|
|
|
|
Did you try WinExec("Notepad.exe C:\\logfile.txt", SW_SHOW)? WinExec("C:\\logfile.txt", SW_SHOW) tries to execute logfile.txt which is not an executable file.
// Afterall I realized that even my comment lines have bugs
|
|
|
|
|
Thanks Alot Toni78, u r really genious. yest the code is working, now tell me, after writing WinExec("Notepad.exe C:\\logfile.txt",SW_SHOW) i want that the file logfile.txt opened in notepad must be maximized.
thanx
|
|
|
|
|
Well, thank you. Instead of SW_SHOW use SW_SHOWMAXIMIZED.
// Afterall I realized that even my comment lines have bugs
|
|
|
|
|
How can I convert twips to pixels?
|
|
|
|
|
Try this:
#twips = is width
#pixels = MulDiv(#twips, GetDeviceCaps(hDC, LOGPIXELSX), 1440)
#twips = is height
#pixels = MulDiv(#twips, GetDeviceCaps(hDC, LOGPIXELSY), 1440)
ÿFor the bread of God is he who comes down from heaven and gives life to the world. - John 6:33
|
|
|
|
|
Thank you so much Ernest. This is what I was looking for. I knew that there were 1440 twips per inch or 567 twips per cm but I just couldn't figure out how to get the number of pixels per inch. Thank you.
// Afterall I realized that even my comment lines have bugs
|
|
|
|
|
GetDeviceCaps() LOGPIXELSX LOGPIXELSY
for a screen these will usually be hardcoded to 72 dpi as windows has no real knowledge of the physical size of the display
|
|
|
|
|
Hello all
Plz , I search a code of a GUI(MFC) same in this URL : http://www-ic2.univ-mans.fr/~lemeunie/these/node75.html#fig-interface-ami1
(Figure 4.3: Interface de AMI1).
Thanks very much
|
|
|
|
|
So what's your question? By the way, the URL you provided is invalid.
|
|
|
|
|
See plz this picture
http://www-ic2.univ-lemans.fr/~lemeunie/these/img186.gif
I want to creat a same of the GUI (interface grphic ) in this picture.
I Don't Know if can i find this in "The code project"
Thanks for you.
NB: I work with VC++ 6 MFC
|
|
|
|
|
Well, it's a dialog box with the following controls:
a listbox
a static label
an edit box
four push buttons
|
|
|
|
|
Do you know any code or tutorial in net?
|
|
|
|
|
Yes, the Internet is littered with code examples. What specifically do you want to do?
|
|
|
|
|
To begin,
I want make a same Gui in the picture:
When i write any text in the an edit box i'll see this in the a listbox .
http://www-ic2.univ-lemans.fr/~lemeunie/these/img186.gif
|
|
|
|
|
Well, assuming one of the four buttons is an Add button, you can have something like:
BEGIN_MESSAGE_MAP(CMyDialog, CDialog)
ON_BN_CLICKED(IDC_ADD, OnAdd)
END_MESSAGE_MAP()
void CMyDialog::OnAdd( void )
{
CString strText;
m_edit.GetWindowText(strText);
m_listbox.AddString(strText);
}
|
|
|
|
|
I am a self-learning novice learning win32asm. It is possible to create a dialog box as the main window without using window class. My question is weather it is possible to create a dialog box as a main window in VC++ using SDK? Can any body give me a code in VC++ without using registered window class?
Thanks
By
N.Sathyashrayan
|
|
|
|
|
Yes, use CreateDialogParam for modal or CreateDialog for modeless! First message to wait for is WM_INITDIALOG . Good luck!
ÿFor the bread of God is he who comes down from heaven and gives life to the world. - John 6:33
|
|
|
|
|
There are some asm tutorial links here.
Best wishes,
Hans
|
|
|
|
|
Thanks for all the replay.
By
N.Sathyashrayan
|
|
|
|
|
I've got a perplexing question.
My network admin team, have just completed about 70% migration of our machines from Win98 to WinXPPro, and they want to abandon using Kix for login scripts, in favour of group policy(and VBScripting).
BUT the VBScripting uses LDAP to query the groups that are available to the user, and this doesn't work on Win98.
I would be able to use NetUserGetGroups on Win2k/XP etc, but this isn't available to Win98 either.
Is there something that I can use.
|
|
|
|
|
1) Under Win95/98 only 16 bit version is awailable. i.e. Get a pull out old VC 1.51... or do the Thunking ...
2) Install server manager for win95 and missuse "radmin32.dll". I have done both in the past. radmin32 is much easier path.....
|
|
|
|