|
Interesting, I'd not come across that before.
The best way to get the full path to the executable running in the process is to use GetModuleFileName . Pass NULL for hModule to get the executable's path, or the hInstance value passed to your DLL's DllMain to get that DLL's path.
Looking at the C run-time source code (in STDARGV.C), I see that _pgmptr is actually initialised from the result of GetModuleFileName . This code is called from mainCRTStartup and the corresponding routines for Unicode and Windows GUI EXEs, but isn't called for a DLL (it wouldn't make sense).
|
|
|
|
|
tanx alot
|
|
|
|
|
Hi all,
I am in a task of printing something using my VC++ Programme.
In Print Preview I am getting my page in Portrait Orientation.
But I want to change it into LandSpace using my VC++ Programme.
How can I Achieve it .
Thanks in Advance.
Yours Faithfully
George K Jolly
|
|
|
|
|
|
Did you see DEVMODE and DMORIENT_LANDSCAPE/DMORIENT_PORTRAIT
|
|
|
|
|
I'm trying to write a C++ .NET program that will move an image very quickly across the screen. Maybe all the way across in one second. What would be the easiest way to do this? All the timer functions perform incorrectly at intervals small enough to do what I want, so i'm looking for a different solution. Will GDI+ do it, or do I have to move to DirectX? I'm looking for something simple, hopefully, but that wont be excessively choppy... only moving at about 2-3 pixels at a time hopefully, so the interval would have to be around 4-5 milliseconds. Again, timer functions dont work correctly at intervals this small.......... thanks for the help!
|
|
|
|
|
Firstly I'd suggest bypassing the whole problem by using an .AVI animation and the Animation common control. If that doesn't work for you, I'd suggest looking into the multimedia timers[^].
|
|
|
|
|
Hi,
I am new to VC++, i am trying a win32 application in which i need to know the position on the screen where the user is typing. I need to know the X and Y screen co-ordinates, where the characters being typed shows up.
We can know the key pressed with the help of Windows hooks, but don't know how we get the position where it shows up.
Can we know the keyboard cursor blinking position on the screen?
Please help me on this.
Thanks in Advance.
|
|
|
|
|
CWnd::GetCaretPos
-- modified at 10:41 Sunday 20th August, 2006
oops, you said Win32. that would be
::GetCaretPos
|
|
|
|
|
Hi,
Thank you for your help. I tried with the below sample code
to understand "getCaretPos", but i am always getting the output
always as " 0 0 "
POINT *ptemp = new POINT;
while(1)
{
if(!GetCaretPos(ptemp))
printf("ERRORRRRRRRRRR \r\n");
printf("%d %d", ptemp->x, ptemp->y);
Sleep(500);
}
Am i missing anything?
please help.
Thank you
|
|
|
|
|
|
I had this working perfectly before, but now it's all screwed up, even after doing a clean-build.
I have 2 icons in my resources
<br />
#define IDI_ICON1 301<br />
#define IDI_ICON2 302
The first problem is I want the main icon for the exe to be ICON1, at the moment it's ICON2 and refuses to change. The taskbar icon is ICON1, no problems there. The title bar is the default WIN32 icon. I use the following code to change this but still my icon is not being displayed.
dw = GetClassLong(hDlg,GCL_HICONSM);
HANDLE icon = LoadImage(hInstance,MAKEINTRESOURCE(IDI_ICON1),IMAGE_ICON,16,16,LR_DEFAULTSIZE);
dw = SetClassLong(hDlg,GCL_HICONSM,(LONG) icon);
dw = GetClassLong(hDlg,GCL_HICONSM);
dw = GetLastError();
According to the code, the icon was set, but it refuses to display.
|
|
|
|
|
|
I have a project and must to control the WM_CLOSE message in MDI sub window, and must capture it and judge If can close the frame How to do it thanks
I have a project and must to control the WM_CLOSE message in MDI sub window, and must capture it and judge If can close the frame How to do it thanks
|
|
|
|
|
assuming you have an MFC app, look at overriding the CDocument::CanCloseFrame() method
cje
|
|
|
|
|
I am working with the microsoft speech api (sapi) and I have not been able to find a function which will return any data to the program. I am looking for the function which would return a string, but any returned spoken text would be good.
Thanks
|
|
|
|
|
I will create the SDI project that similar "NotePad".
I use AppWizard and make the view class from CEditView.
My question is if I want to write some character in the line.
How I write the code in OnDraw function?
|
|
|
|
|
in OnInitialUpdate function call smth like this:
GetEditCtrl().SetWindowText("You text is going here");
|
|
|
|
|
Hi friends
I want to learn driver development.So i searched internet and found this windows 2000 ddk:
http://www.amazon.com/gp/product/07...2104760?ie=UTF8
It is expensive and i don't want to make mistake.I need your advices.
1-)Is this book enough for driver development?And if i finish it completly do i ready for driver development for all windows version?Especially for windows vista.I want to learn wheter everything will change with windows vista???If it will change what must i do?
2-)Is this books context ready at microsoft web site?I mean maybe microsoft put all documentation at its web site so idon't need to buy it.I said i don't want to make mistake.
I am very new to deriver development and i see that it is another world in programming.
Please give me some advices about starting driver development.What is the best roadmap to learn ddk(softwares, books about downloading and buying)
I am looking for your answers..
Thanks
|
|
|
|
|
|
Your second link recommends "So, you need to learn something about Windows operating sytem architecture. This means, at the very least, you need to read Inside Windows whatever-is-the-most-recent-version."
Actually the book's title was changed to Windows Internals, Fourth Edition[^] for the most recent edition. I'd like all my drivers to be written by people who have read and understood this book.
Actually I think it's quite useful for those of us who have never ventured into kernel mode.
|
|
|
|
|
search codeproject, there is a guide/tutorial for writing device driver in windows,
The first part is here
http://www.codeproject.com/system/driverdev.asp
|
|
|
|
|
|
|
Hello everyone,
Are there any samples to traverse a directory and list all the file names? Written in C.
thanks in advance,
George
|
|
|
|