|
Yaa i want button with text and icon
|
|
|
|
|
|
Hallo,
trying to rebuild or clean a project results in error PRJ0008:
Could not delete file 'e:\Projekte7\common\bin\debug\english'
with the "file" being my output folder. I'd like to know how I can stop Visual Studio from trying to remove the folder itself - of course it can't be removed because it's the output folder for several projects and is usually not empty after cleaning a single project.
In the project settings I found an entry "Extensions to delete on clean" where "$(TargetPath)" had been entered magically by the Visual Studio god. Unluckily simply removing this was far too obvious and didn't change anything, still rebuilding will fail when trying to delete my output folder.
Does anybody know what makes Studio trying to remove the output folder itself? It seems to be a minor problem which can be worked around with an extra mouse click, but I can't rebuild larger solutions due to this behaviour and have to do it all step-by-step.
Thanks for any hint.
Rita
|
|
|
|
|
Hi all,
I am creating a Edit Box Dynamically in CDialog Box. And when i Right Click on the Edit Box what i have created i want to show a Menu.
//===========================================================================
//Source for Creating the Edit Box when mouse is clicked.
CEdit *ptr = new CEdit;
ptr->Create(WS_VISIBLE|WS_CHILD|WS_BORDER|WS_TABSTOP|ES_AUTOHSCROLL,CRect(point.x,point.y,point.x +100, point.y +20),this,NULL);
//===========================================================================
Now i am not able to handle an event to this dynamically created Edit Box. I want to Handle the RButtonDown Event for every Dyanmically Created Edit Box. i Mean when ever i Right Click on the EditBox what i have Created i want to Populate a Menu using TrackPopUpMenu(...) Api.
please help me out.
Uday kiran
|
|
|
|
|
uday kiran janaswamy wrote: want to Handle the RButtonDown Event for every Dyanmically Created Edit Box
Refer ON_COMMAND_RANGE[^] macro..
Do your Duty and Don't expect the Result
|
|
|
|
|
hi appu,
The Function ON_COMMAND_RANGE(id1, id2, memberFxn )
Which is only the Command Range.
this used to specify the idientifier1 to indentifiern a Member Function.
But my doubt when ever i click the mouse lbutton then i will create a EditBox.
When I click the RButton of the Created EditBox then a Menu must be Populated.
please give me correct solution.
Uday kiran
|
|
|
|
|
Since you are dynamically creating Buttons you cant have specific handlers for each button...
uday kiran janaswamy wrote: ON_COMMAND_RANGE(id1, id2, memberFxn )
Have one variable which hold the next ID of the button, keep incrementing the variable after creating each button ..
say 100 is the ID of the first button then ..
ON_COMMAND_RANGE(100, 200, Fnc)
This will notify the wm_command to the Fnc with the button ID ranges from 100 to 200..
But the RClick in button i didn't try yet.. i hope to catch the RClick you have to write your own custom button..
or handle the RClick on the parent Dialog or View and try to get the button from the current cursor position (but i don't know exactly if the RClick will be passed to its parent)
Do your Duty and Don't expect the Result
|
|
|
|
|
uday kiran janaswamy wrote: CEdit *ptr = new CEdit;
ptr->Create(WS_VISIBLE|WS_CHILD|WS_BORDER|WS_TABSTOP|ES_AUTOHSCROLL,CRect(point.x,point.y,point.x +100, point.y +20),this,NULL);
Last parameter here, you can assign unique control Id, lets say 100.
you can use it to handle notifications using that like
ON_EN_SETFOCUS(100, OnSetfocusEdit1)
I'm not sure about other notification messages. But this would give you a hint.
|
|
|
|
|
Hi I am developing a dialog based application.
I require an HTML Control in which i can show the content by passing the html code in string form.
I searched and found one, but it doesnt compile on Visual Studio 8.
Can anyone point me to any such existing application here.
Thanks in advance.
*** Who said nothing is impossible? I have been doing it for a long time ***
|
|
|
|
|
Search for the excellent "SimpleBrowser" here on CP.
|
|
|
|
|
Thanks Maximilien,
I had tried that.. but it doesnt compile on VS 8.
Any idea, if there is any modified version of the same.
Thanks.
*** Who said nothing is impossible? I have been doing it for a long time ***
|
|
|
|
|
you can try fixing the error and submit a patch to the author, I'm certain he will be happy that you contributed to his project.
If it's the same for VS8 as it is for VS.net 2003, I think you need to comment out the CStreamOnCString class definition and declaration.
|
|
|
|
|
CoolASL wrote: I require an HTML Control in which i can show the content by passing the html code in string form.
Would it be permissible to save the string to a (temporary) file first?
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
David,
Thanks for the reply.
Saving the string to a temp HTML file and then displaying it would be quite cumbersome.
Any other way to directly get the string code to work??
Thanks.
*** Who said nothing is impossible? I have been doing it for a long time ***
|
|
|
|
|
CoolASL wrote: Saving the string to a temp HTML file and then displaying it would be quite cumbersome.
How so? Saving to a file is 2-3 lines of code. Then you could just use the WebBrowser control. It doesn't get much easier.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Not sure if this fits your requirements: XHTMLStatic[^]
ed
~"Watch your thoughts; they become your words. Watch your words they become your actions.
Watch your actions; they become your habits. Watch your habits; they become your character.
Watch your character; it becomes your destiny."
-Frank Outlaw.
|
|
|
|
|
Hmm.. seems to be cool.
I hope it compiles on VS8 !
Thanks a lot.
*** Who said nothing is impossible? I have been doing it for a long time ***
|
|
|
|
|
|
Hello.
I have created one dialog box on which I have added one button through wizard. I want to set the text from that button to style BOLD.
How can I do that?
Thanks and Regards
Rakesh
|
|
|
|
|
By changing the font on the button. I believe it's a SetFont method, but I could be wrong there.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
There is an example of how to do this to a static control here. Just use a button instead.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hello,
I am creating a short-cut to an installed application in the "C:\Program Files (x86)" folder, but the target always seems to point to the "C:\Program Files" folder, the only problem with this is the short-cut icon shown is the default one. But if i double-click the short-cut, the app is invoked fine. Is this a problem with the 64-bit Vista shell or am i doing something wrong in the below mentioned program. My appname is test.exe and is installed in the "C:\\Program Files (x86)\\Sample" folder.
All the folders usedin the below program were valid one's on my system.
This same program works fine on XP-64 bit.
Regards,
HRESULT CreateLink(LPCSTR lpszPathObj, LPCSTR lpszPathLink, LPCSTR lpszDesc, LPCSTR lpszWorkDir) ;
int _tmain(int argc, _TCHAR* argv[])
{
CoInitialize(NULL);
HRESULT ret = CreateLink("C:\\Program Files (x86)\\Sample\\test.exe","c:\\users\\public\\desktop\\test.lnk","Test","C:\\Program Files (x86)\\Sample");
if(SUCCEEDED(ret))
printf("\nCreate link succeeded");
else
printf("\nCreate link failed");
CoUninitialize();
return 0;
}
HRESULT CreateLink(LPCSTR lpszPathObj, LPCSTR lpszPathLink, LPCSTR lpszDesc, LPCSTR lpszWorkDir)
{
HRESULT hres;
IShellLink* psl;
// Get a pointer to the IShellLink interface.
hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER,
IID_IShellLink, (LPVOID*)&psl);
if (SUCCEEDED(hres))
{
printf("\nSucceded in creating an instance");
IPersistFile* ppf;
// Set the path to the shortcut target and add the description.
psl->SetPath(lpszPathObj);
psl->SetDescription(lpszDesc);
psl->SetWorkingDirectory(lpszWorkDir);
//psl->SetIconLocation(lpszWorkDir, 0);
// Query IShellLink for the IPersistFile interface for saving the
// shortcut in persistent storage.
hres = psl->QueryInterface(IID_IPersistFile, (LPVOID*)&ppf);
if (SUCCEEDED(hres))
{
WCHAR wsz[MAX_PATH];
printf("\nSucceded in querying interface");
// Ensure that the string is Unicode.
if(MultiByteToWideChar(CP_ACP, 0, lpszPathLink, -1, wsz, MAX_PATH))
{
// TODO: Check return value from MultiByteWideChar to ensure success.
printf("\nSucceded in conversion");
char pszGetPath[MAX_PATH];
if(SUCCEEDED(psl->GetPath(pszGetPath,MAX_PATH,NULL,SLGP_RAWPATH)))
printf("\nGet Path: %s",pszGetPath);
else
printf("\nGet Path failed");
// Save the link by calling IPersistFile::Save.
hres = ppf->Save(wsz, TRUE);
}
ppf->Release();
}
psl->Release();
}
return hres;
}
Regards,
Pavan
|
|
|
|
|
kpkrind wrote: HRESULT ret = CreateLink("C:\\Program Files (x86)\\Sample\\test.exe","c:\\users\\public\\desktop\\test.lnk","Test","C:\\Program Files (x86)\\Sample");
I might be wrong, but isn't this the old problem with path names containing spaces in a command line?
Try to surround (at least) the paths containing spaces with quotes.
Like this:
CreateLink("\"C:\\Program Files (x86)\\Sample\\test.exe\"","c:\\users\\public\\desktop\\test.lnk","Test","\"C:\\Program Files (x86)\\Sample\"");
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
No, its not a problem with the spaces, CreateLink expects a string pointer and is passed correctly
|
|
|
|
|
OK, It was worth a try anyway.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|