|
Did you see this link I think it sovles your problem when you it finds words you can insert them to a array(like CStringArray) and then make a new file with CFile class and use of CFile::write.
|
|
|
|
|
I tested CCJButton, but find nothing special,
even worse when CButton is replaced with CCJButton, I move the mouse onto the button, the text is disappeard.
I think CJ60Lib in my project is not working properly.
Is there any document or examples?
|
|
|
|
|
|
make the windows and controls looks better
|
|
|
|
|
|
Because with a free skin library, I can save a lot of time. I don't have much free time by now.
|
|
|
|
|
If you dont have a free time so librarys are good.;)
|
|
|
|
|
Hi All,
After inserting a item is Explorer's shell, one must call DrawMenuItem( hWnd ) to to update the menu. However, the code which inserts the menu item does not receive an hwnd. Any ideas how to obtain the hWnd from an hMenu? Below is the context which DrawMenuBar() would have.
Jeff
HRESULT CTest::QueryContextMenu( HMENU hmenu, UINT uMenuIndex,
UINT uidFirstCmd, UINT uidLastCmd, UINT uFlags )
{
uidLastCmd;
if( uFlags & CMF_DEFAULTONLY )
{ return MAKE_HRESULT ( SEVERITY_SUCCESS, FACILITY_NULL, 0 ); }
if( m_count > 1 )
{
InsertMenu( hmenu, uMenuIndex, MF_BYPOSITION,
uidFirstCmd, _T("String 1") );
}
else
{
InsertMenu( hmenu, uMenuIndex, MF_BYPOSITION,
uidFirstCmd, _T("String 2") );
}
HWND hwnd = null;
DrawMenuBar( hwnd );
return MAKE_HRESULT( SEVERITY_SUCCESS, FACILITY_NULL, 1 );
}
|
|
|
|
|
An old VC++ thread yielded this:
Christian Astor wrote: You can use FindWindow("#32768", NULL) ;
(eg on WM_INITMENUPOPUP )
IMHO, the belief here is that you will be able to find the active Menu's window by that special ID.
Good luck!
Peace!
-=- James Please rate this message - let me know if I helped or not!<hr></hr> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Is anyone aware of some software ideas to keep a small number of computers (e.g. 12) synchronised Real Time Clock Wise.
N.B. Terminals range from Win95 to WinXP. We do NOT support Vista.
Bram.
Bram van Kampen
|
|
|
|
|
Depending on the resolution and/or error range required, you could modify an NTP service to provide higher resolution time values, and have the client's hit it every so often to keep in sync.
If you need something really closer to Real-Time, there is a special kind of shared memory system that runs on a network using a special kind of NIC (I do not remember the name of the hardware/system). When this memory area is changed by one system, all other systems get an event. This is a pretty fast system, but might be overkill for you.
Peace!
-=- James Please rate this message - let me know if I helped or not!<hr></hr> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Dont Quite understand Modifying NTP Services.
I have 6 Machines which over a week drift some 6 minutes apart. Nothing to cause a Problem as such, just a bit of a nuisance. I just wondered, has anyone a ready made piece of code you run in the scheduler, and which synchronises the clock in each machine with the Designated Timekeeper. It does not do an awfull lot for Absolute Time, but at least there's only one to adjust.
Regards
Bram van Kampen
|
|
|
|
|
Windows XP (and 2000 I believe, perhaps even NT 4.0) support syncronizing time from a central server. You can even have them sync-up using a NIST (ITS) time source. See Here[^] for a PDF with information on how to configure Windows to use NIST ITS servers as a time source.
If you double-click on the clock on your taskbar or select "adjust date/time", you can specify an Internet time source on the Internet Time tab. The server time.windows.com is one server you can use.
Peace!
-=- James Please rate this message - let me know if I helped or not!<hr></hr> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Hi Developers,
I have to write an application where i could link keys with information so that i could use key to get the linked information. Like student name could act as a key and their grades could be information. So if i enter student name i should get his grades. Its like a map class basically. I dont have to use map class, i have to write my own class. So could anyone shed some light like what all would be required to get myself started. I mean what all classes would i be needing and etc I need to get on with this asap.
Any help would be greatly appreciated.
cheers
James
|
|
|
|
|
Hi,
I haven't been able to find anything like this, so I hope I'm not repeating a previous posting.
I'd like to create a CPropertySheet-based application. To start with, I just created a standard dialog-based application and I am trying to hack it around so that it can use CPropertySheet instead of CDialog. It compiles OK, but I'm having run-time problems.
Can anyone give some pointers and details on how to do this? Or point to a posting that had some pointers and details? Or maybe this isn't the best way to do it?
Eventually, I'd like to write my own custom Application Wizard that could be used to auto-generate this.
I'm using Windows XP Pro and Visual Studio 2003 SP1.
Thanks in advance.
|
|
|
|
|
What kind of runtime problems are you having?
Are you constructing and adding pages to the sheet properly before
calling Create() or DoModal()?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I'm getting
"Unhandled exception at 0x0051d2dc in PropSheetEg.exe: 0xC0000005: Access violation reading location 0xcccccd34."
>> Are you constructing and adding pages to the sheet properly before
>> calling Create() or DoModal()?
Oh, it probably is something silly like that. I need to investigate more.
Thanks for the pointers.
|
|
|
|
|
|
You will find a WTL sample here [^].
cheers,
AR
|
|
|
|
|
I'm building a MFC document based application and, after the Precreate window I receive the message:
Failed to create empty document
Why?
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
RomTibi wrote: Why?
Have you messed with (i.e., deleted, renamed) any of your project's menus?
Have you looked in any of MFC's DOC*.CPP files to see what condition causes the AFX_IDP_FAILED_TO_CREATE_DOC message to be displayed?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I don't know
No
I'll see and replay if necessary?
Thanks
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
Hi all,
I wanna know what should i type as code to run my prog with a specific dimensions for ma FormView let's say dimensions as X= 120 and Y= 100. ??
Thank ya.
"The Ultimate Limit Is Only Your Imagination."
|
|
|
|
|
CClientDC dc;
dc.SetMapMode(MM_ANISOTROPIC);
CRect rt;
GetClientRect(&rt);
SetWindowExt(120,100);
SetViewportExt(rt.width,rt.height);
|
|
|
|
|
hi,
Sorry it doesn't work here teh errors
<br />
void CForthForm::OnInitialUpdate() <br />
{<br />
CFormView::OnInitialUpdate();<br />
CClientDC dc;<br />
dc.SetMapMode(MM_ANISOTROPIC);<br />
CRect rt;<br />
GetClientRect(&rt);<br />
SetWindowExt(1200,134);<br />
SetViewportExt(rt.width,rt.heigh);<br />
<br />
:\Works\C 6\AutoParall\ForthForm.cpp(69) : error C2512: 'CClientDC' : no appropriate default constructor available<br />
D:\Works\C 6\AutoParall\ForthForm.cpp(73) : error C2065: 'SetWindowExt' : undeclared identifier<br />
D:\Works\C 6\AutoParall\ForthForm.cpp(74) : error C2065: 'SetViewportExt' : undeclared identifier<br />
D:\Works\C 6\AutoParall\ForthForm.cpp(74) : error C2039: 'width' : is not a member of 'CRect'<br />
c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(225) : see declaration of 'CRect'<br />
D:\Works\C 6\AutoParall\ForthForm.cpp(74) : error C2039: 'heigh' : is not a member of 'CRect'<br />
c:\program files\microsoft visual studio\vc98\mfc\include\afxwin.h(225) : see declaration of 'CRect'<br />
Error executing cl.exe.<br />
Creating browse info file...<br />
PS: I m using the CFormView Class.
othe thing, on which function membe should i modify the code. OnInitialUpdate() or no ??
-- modified at 4:47 Saturday 1st December, 2007
"The Ultimate Limit Is Only Your Imagination."
|
|
|
|