|
You used of nID whats problem?
|
|
|
|
|
how to call on_notify for OnFieldchangedIpaddress1 using this id
|
|
|
|
|
Did you try with Arman Z. Sahakyan's answer anyway see this[^] thread.
|
|
|
|
|
hi, what files should be included?
thanks!
Nathan
|
|
|
|
|
in Visual Studio using unmanaged C++
|
|
|
|
|
What is XMLReader? Are you in search of an XMLReader or is that a specific class you've got picked out and want to use?
MSXML is reasonable if your still looking for a parser to use.
|
|
|
|
|
|
I'm guessing your after the unmanaged C++ version of the .Net XmlReader Class
you might find these of interest,
Microsoft's new XMLLite for C++[^] I havent used this or even taken a proper look but you might find it of interest.
This is an interesting looking project here on CP
FlexibleParser by Michael Chourdakis[^] from the looks of it its his own parser for XML and is platform independent.
Otherwise
MSXML6 Download[^]
cant really say what to include as there are a number of options open for you.
MSXML is nice and easy supports XPath so is very quick, its the one i go for.
documentation has samples in etc.
hope that helps
|
|
|
|
|
Does anyone know how to determine how many units are scrolled in a window derived from CWnd with scrollbars uses for OnVScroll and SB_LINEDOWN/SB_LINEUP.
Specifically, I'm struggling to find how many "units" it moves when the user presses the up/down buttons.
I'm looking for a way to get the value without actually moving the bar.
|
|
|
|
|
bob16972 wrote: how many "units" it moves when the user presses the up/down buttons.
How far it scrolls is up to you. The window will receive the WM_HSCROLL/WM_VSCROLL messages
with the SB_LINEUP/SB_LINEDOWN codes. In response, you can scroll however you need to.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
I guess I mucked my question up. I meant to say derived from CScrollView. Right after being created with the wizard the scrolling is handled by something and it scrolls when the up/down buttons are pushed (assuming I set the scroll sizes in OnInitialUpdate to something reasonable)
I apologize for saying CWnd. I posted right before I was leaving work and had my mind in the clouds.
CScrollView is determining how many units to use when scrolling one line and I am in search of how to calculate this or how to obtain what it is using programmatically.
I'm trying to allow the user to continue scrolling like VC++ 6.0 does when at the bottom and the user presses the scroll down button to add more logical space to the view. The transition from CScrollView's automatic handling and my extending it in the OnVScroll method is a bit clunky because I'm not matching the units CScrollView was using on the way down.
I wasn't sure if that value is available and it's right under my nose and I'm failing to see it.
|
|
|
|
|
Found m_lineDev in CScrollView which led me to CScrollView::GetDeviceScrollSizes().
I swear I've looked at this stuff about a half dozen times and it was right under my nose.
Sorry about the post and thanks for the guidance.
|
|
|
|
|
bob16972 wrote: Found m_lineDev in CScrollView which led me to CScrollView::GetDeviceScrollSizes().
Cool!
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
More info I didn't link to
About Scroll Bars[^]
Particularly, the "Scroll Box Position and Scrolling Range" and "Scroll Bar Requests"
sections.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hi,
I am writing a C++ program and am trying to send an array of integers to a text file, however, when I open the text file, it looks like this: ⰸⰶⰰⰹⰲⰰⰰⰰⰰⰰⰰⰲⰴⰶ
At an earlier part in the program, I sent an array of integers, but the file came out like I intended it to. I don't know why it doesn't come out correctly for the other piece of code.
This is the code that doesn't work correctly:
ofstream game(name.c_str());<br />
if(game.is_open())<br />
{<br />
for(int i = 0; i < 81; i++)<br />
{<br />
game << g_ivalues[i] << ",";<br />
}<br />
game.close();<br />
} Please note that all the variable listed are declared.
This piece of code does work correctly for me though:
ofstream profiles(name.c_str(), ios::out);<br />
if(profiles.is_open())<br />
{<br />
for(int i = 0; i < 100; i++)<br />
{<br />
profiles << g_ipuzplayed[i] << ",";<br />
}<br />
}<br />
profiles.close(); Any thoughts on why they don't work the same?
Thanks in advance!
Chris
|
|
|
|
|
CS925 wrote: game << g_ivalues[i] << ",";
What is g_ivalues ?
Does the following work?
for(int i = 0; i < 81; i++)
{
cout << g_ivalues[i] << ",";
}
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi all. What would be a way to program a code that created txt files in any dir after %systemroot% ?
For example. If you were to type cd %systemroot% in an XP command line, then you would get sent to C:\WINDOWS - Im trying to find out a way to create files in that directory, no matter the drive. Ive tried the following code:
<br />
#include <fstream><br />
using namespace std;<br />
<br />
void main(){<br />
ofstream file;<br />
file.open("%systemroot%\\test.txt");<br />
file << "This is only a test." << endl;<br />
file.close();<br />
}<br />
And nothing happens. So i switched %systemroot% to %windir% from another persons example, and it didnt work either. So i was hoping maybe im using a wrong character. (ie: %) Maybe if im using another character then i'll succeed. Any suggestions will be greatly appreciated. Thanx in advance!
|
|
|
|
|
Call ExpandEnvironmentStrings() to expand those variables.
|
|
|
|
|
|
Try this:
ofstream file;
char Pathname[MAX_PATH];
::ExpandEnvironmentStrings("%systemroot%\\test.txt", Pathname, MAX_PATH);
file.open(Pathname);
file << "This is only a test." << endl;
file.close();
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Thanx Mark, that worked just fine however i had to change a few things, but the general idea did help me grasp the meaning of the situation. Now i dont have to guess what the drive is ever again
Thanx again!
|
|
|
|
|
Hello,
I am writing an application that communicates with an external device using a USB port. I have the USB driver for the device, but I want to automate the installation of the driver inside the application so the user does not have to install the driver manually. I have embedded the INF and SYS files in the application, so that when the application starts, these files are written to the hard drive. Once the files are on the hard drive, I want the app call whatever windows functions there are to install the driver.
The easy method would be to copy the driver to the system32 directory and let the wizard install it when the device plugs in, but I hate wizards and don't want the user bothered by it.
I have not yet been able to get the driver installation to work. I have tried doing a ShellExecute of RunDll32.exe with the command line info pointing to the INF file, but I never see the driver get installed into the system32 directory. When I plug the device into the PC, Windows does not recognize it.
Any ideas? Is there another way of doing this besides Shelling RunDll32.exe?
|
|
|
|
|
The Setup functions are used to install stuff. Going this route is a bit complicated, though, since the documentation on SetupXxx is not the best. It would be much easier just to let the install hardware wizard do its thing, but if you insist, research the Setup functions.
Judy
|
|
|
|
|
Hi all,
I am sorry but its really urgent and I hope u will help me.
I use SendInput API function to emulate keystrokes like this:
void CKeyboardInput::KeyDown(WORD wVK)<br />
{<br />
INPUT inKB;<br />
<br />
::ZeroMemory(&inKB,sizeof(INPUT));<br />
<br />
inKB.type=INPUT_KEYBOARD;<br />
inKB.ki.wVk=wVK;<br />
<br />
SendInput(1,&inKB,sizeof(INPUT));<br />
<br />
}
The code runs perfectly with all normal windows applications, however, this code doesnt work for some types of programs like Games, for example I want to send a key to move a car in Need for Speed II or in Driver but I failed to get it to work.
Anybody can point out any useful comments? why dont these apps respond to SendInput calls? and is there any workaround?
Waiting for good news
Thanks
Mohammad
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
Games probably use DirectInput hence SendKeys cannot work.
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.
|
|
|
|