|
|
|
HWND curWin = FindWindow((LPCWSTR)winClass,(LPCWSTR)winTitle) - error !!!
FindWindowW(wchar_t const *,wchar_t const *)
- postfiks 'W' mean that the funktion use wchar_t instead char.
And you can convert char* to wchar_t* by using _TEXT("") macros.
And look here -> pHandle::setHandle(NULL) - wich of your function will be use?
|
|
|
|
|
Tks for your reply.
I converted all char * to wchar_t const as same as definetion of function, but I still got that errors.
void pHandle::setHandle(wchar_t const *winClass, wchar_t const *winTitle)
{
HWND curWin = FindWindow(winClass,winTitle);
setHandle(curWin);
}
Tks for your help
|
|
|
|
|
In Visual C++ 6.0, I want to run an application, such as Notepad.exe,... How must I do? Please help me!!! I'm in dark!
Thank you very much!
|
|
|
|
|
nps_ltv wrote: run an application, such as Notepad.exe,...
Here's the light You can use:
ShellExecute(/*parameters*/);
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
See here.
"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
|
|
|
|
|
can anybody tell me how to convert the excel format to .csv format....
|
|
|
|
|
File --> Save As...
Maxwell Chen
|
|
|
|
|
i need to convert from the excel format to csv format programatically using vc++.Cna anybody help me out
|
|
|
|
|
do u know how to use the MS excel classes and functions using COM
if you know then it is possible.
you have to use 'xlCSVMSDOS' the fileformat instead of 'xlNormal'
when you save the file.
if you do not know then do let me know
or use this link http://www.codeproject.com/database/cspreadsheet.asp[^]
Regards,
Pankaj Sachdeva
"There is no future lies in any job"
"but"
"future lies in the person who holds the job"
|
|
|
|
|
i dont know it because i am new to vc++ and its my first time i am using excel... so could you pls let me know how to do it
|
|
|
|
|
If you are new to vc++ I dont think you can use of any article easily its better first you try to learn c++.
Good luck;)
|
|
|
|
|
See here.
"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
|
|
|
|
|
You cross posted and you are not giving your questions titles with any meaning. Please read the forum guidelines.
_____________________________________________
Flea Market! It's just like...it's just like...A MINI-MALL!
|
|
|
|
|
I'm using CRectTracker alongside another class that uses SetWindowLongPtr to subclass my CScrollView class.
Problem is when I perform a CRectTracker::Track() or CRectTracker::TrackRubberBand() the CRectTracker hogs all the messages and my subclass WndProc gets none until the Track method returns.
Is there a way to make CRectTracker behave and pass messages on down the chain while tracking?
|
|
|
|
|
During tracking, CRectTracker is in its own modal message loop, as you've seen.
I'm not sure what messages you need during tracking, but if you just need to
do something when the rect changes, you can override CRectTracker::OnChangedRect().
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I basically need coordinate feedback while tracking. Nothing fancy.
I realized I could use CRectTracker::OnChangedRect() or even CRectTracker::DrawTrackerRect() but that requires a close binding to the entity instantiating my class derived from CRectTracker. I guess that's gonna be the solution though as I dug through the source and no other idea has jumped out at me.
On a side note, it always amazes me how the OOP purists claim classes should be small, do one thing well, and not require knowledge of their surroundings.
I've found that extremely hard to accomplish in practice.
Anyway, thanks for the feedback as it always helps to hear suggestions that are consistent with ones own gut reactions. I lack the confidence to realize that sometimes I might actually be on the right track.
|
|
|
|
|
bob16972 wrote: it always amazes me how the OOP purists claim classes
should be small, do one thing well, and not require knowledge
of their surroundings.
I've found that extremely hard to accomplish in practice.
I especially find that problem in UI programming with MFC. In a complex
UI, eventually windows need to communicate with each other. Most
say the window shouldn't have knowledge of other window classes so
all communication is done through messages up and down the Z-order.
That makes it more OOP pure (I guess) at the C++ level but often the
messages need to be so specific that the class is really not "generic" anyway.
Back on topic... to me, since CRectTracker isn't a window, if I have to
derive a class from it anyhow, I have no problem making a custom
tracker class specific to one window.
All it really needs to know is an owner CWnd to send messages to if it needs
to be more generic/reusable, just like it needs a CWnd to do its rubberbanding.
Have fun!
MArk
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi!
I'm looking for a way to monitor drive access using WinAPI. I want a notification when the drive is read or written.
Is this possible without getting down to NTFS/FAT etc.
You see, I am slightly confused at the moment.
Regards
Alex
|
|
|
|
|
ReadDirectoryChangesW()?
you can monitor all the writing to the drives using this function. But reading...
Other was is to implement a driver like the filemon does. The source code of that utility is also availabe in the net( I forgot the link to that site )
|
|
|
|
|
You'll need to create a driver for this level of control.
"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
|
|
|
|
|
Mh, sounds quite difficult.
Do you have any hints for me where I can start from?
|
|
|
|
|
No, I've not done any driver-related projects. Try here. Dr. Newcomer knows his stuff.
"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
|
|
|
|