|
while executing ,i need to display the menu .for that is there any coding or any procedures to be followed.kindly help its urgent.Can u send ur personal id for my further clarifications to mithila_03@yahoo.co.in?
Thk u.
mithila
|
|
|
|
|
You can create menu using CMenu class. Create a CMenu object, and call its LoadMenu method to load from resource. Then in your main window or dialog, call SetMenu to set the menu for that window. Are you using dialog based application or SDI or what??
Arsalan Malik
|
|
|
|
|
Using Dialog based only. In main window under which function, i've to include the set menu? initdialog()?
mithila
|
|
|
|
|
using Dialog based only.In which function i've to include set menu? in initdialog()?
mithila
|
|
|
|
|
Hi sir,
pls help me
mithila
|
|
|
|
|
Now I am building a program that will be automatically executed whenever a user double clicks a file with a .xxx extension.
As you know well, it is very easy.
In short, I take advantage of "Folder Options" menu in Explorer.
However, I need to know the clicked file name by the user in "Expoler".
That is, I have to give the file name as a parameter to the prgoram.
In sum, I want to know how can my program work together with Windows Explorer.
Please help me to solve the problem.
|
|
|
|
|
Check "Shell Programmer's Guide" in MSDN.
I think you will need to write an add-in. You need to look into basics of shell programming and how you register this add-in for a particular file extension
Hope this helps
-------------------------
Have a great day ahead!
Regards,
Sohail Kadiwala
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Try reading this article[^] on creating file associations in the MSDN.
Software Zen: delete this;
|
|
|
|
|
Hi,
In Windows XP,
- User A login
- Choose Logoff\Switch user, user B login.
User A and User B on different sessions.
I want to write a program.
From process name and process id, this program must defines session of process.
Can you help me ?
Thanks.
n4_t1
|
|
|
|
|
Umm..... Yep:
ProcessIdToSessionId
The ProcessIdToSessionId function retrieves the Terminal Services session associated with a specified process.
BOOL ProcessIdToSessionId(
DWORD dwProcessId,
DWORD* pSessionId
);
Parameters
dwProcessId
[in] Specifies a process identifier. Use the GetCurrentProcessId function to retrieve the process identifier for the current process.
pSessionId
[out] Pointer to a variable that receives the identifier of the Terminal Services session under which the specified process is running. A value of zero identifies the terminal server console session.
|
|
|
|
|
oh, this is simple.
Thanks.
n4_t1
|
|
|
|
|
Alright, I want my Radio buttons to change from bitmap to regular (but push-like) when the mouse hovers over them, then switch back when the mouse leaves. I know I will have to subclass them, thats not a problem, how can I tell if the mouse has left? I've checked what messages the button gets with Spy++ but nothing is out of the ordinary. The only thing I can think of is if the mouse is on the very last pixel of the button to say it left, but thats not very good looking!
Any Ideas?
wWw.KruncherInc.cOm
|
|
|
|
|
The standard way is to capture the mouse when it goes into your button. When you receive a mouse message with coordinates outside your button, you know the mouse has left your button, which is when you release the mouse capture. It's not perfect and won't work if another window captures the mouse while you have it captured, but it will work practically all the time and is by far the simplest method.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
When you get a WM_MOUSEMOVE , call TrackMouseEvent() with the TME_HOVER|TME_LEAVE parameters, and set a flag indicating that you're tracking events. When you get future WM_MOUSEMOVE messages, check the flag and don't call TrackMouseEvent() if it's set.
TrackMouseEvent() will send WM_MOUSEHOVER when the mouse hovers, and WM_MOUSELEAVE when it leaves (at which point you reset your flag).
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
"Just because the box has 2 gigabytes of memory doesn't mean you get to use it all!"
-- Rico Mariani, CLR perf guy
|
|
|
|
|
Hi everyone!
I'm desperly trying to make application, in Borland C++ 5.0, with my TTF fonts inside it.(I think its called Font embedding)
Is there anyone who could help?
I'd be gratefull
tanx
dArK cHAriSmA
|
|
|
|
|
I did this for an MFC application recently. I guess it’ll be similar with Borland.
I created a custom resource, gave it a name, and associated it with the .TTF file. Then when I built the .exe file, I found the byte sequence for the .TTF file inside. So that’s the first step – getting the .TTF file into the .exe file.
The second step is to get the byte sequence at run time. Call ::FindResource() , then ::LoadResource() , then ::LockResource() , then ::SizeofResource() .
The third step is to tell Windows to use the byte sequence as a TrueType font. I haven’t found a good way of doing this. I don’t know if there is a good way. The method I use uses two indirections. Having found the byte sequence, write it out to a temporary file, then read in the file using ::AddFontResource() . Then call ::CreateFontIndirect(&lf) , having set lf.lfFaceName to the name of your font, and hope that Windows chooses to use your font.
Then call ::FreeResource() (I’m not sure if this is necessary, but some of the MSDN samples do it). And before your program ends, call ::RemoveFontResource() , otherwise your font will probably be in the system for ever more.
HTH,
Chris.
|
|
|
|
|
Hi
On Windows 2000/XP, when you right-click on a file in Explorer and click on properties, you can see the file's comments/author/title from the summary tab.
Anyway, my question is how do you extract this info from files. Is it contained in the registry, or is it within a special file (like desktop.ini or thumbs.db), or is it the NTFS filesystem?
|
|
|
|
|
I don't know how but they are written into the file its self.
wWw.KruncherInc.cOm
|
|
|
|
|
kusanagi2000 wrote:
Anyway, my question is how do you extract this info from files. Is it contained in the registry, or is it within a special file (like desktop.ini or thumbs.db), or is it the NTFS filesystem?
The only file type that contains this information is OLE compound files. The information is written to the properties stream in the file. Lookup MSDN on OLE compound files for information on how to read it. I haven't looked for a while, but I believe they have an example on how to do exactly this.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
My problem is that I want to read the pixel values of different bitmap formats (monochrome, 16,256 & 24 bits) accurately so that for a 16 Color bitmap the pixel values should only range from 0 to 15.
I know that I can do that by opening them as regular files and reading them pixel by pixel by taking the value of 4 bits at a time. But I was wondering if there was a built in way in API that can save me this trouble.Please help urgently
e6ad
|
|
|
|
|
do you want 16 and 32 bit as well ?
As far as I am aware there's no quicker way than reading in the file and iterating over the data.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
There is no built in way even for the 24 bits image???
|
|
|
|
|
For any non paletised image it's easy, if you really want to. Just define a struct and read those structs from your byte array. The built in way is get/set pixel, but it's plainly obvious that any built in way would suffer from the problems this method suffer from. As soon as you add a wrapper to the underlying code, which must turn the image into a byte array, read the bytes and figure out the values from there, you slow things down.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
hello,
i want to make program ras api completely,
i mean, i'll make the dial up(DUN) and the response for the dial up
for the the dial up is not my problem.
the problem is how to handle incoming connection using ras api?
i want to call incoming connection dialog in the windows programmatically with visual C++ and i don't know.
i am using window 2000
please help me, if anyone knows to handle this.....
|
|
|
|
|
I am also facing the same problem. If you could help me in creating an incoming connection to recieve the messages, it would very nice of you.
Thanks let me know if you find any solution.
|
|
|
|