16,017,922 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by StoyanovZ (Top 30 by date)
StoyanovZ
24-Mar-14 14:38pm
View
Anyone? :/
StoyanovZ
21-Mar-14 15:45pm
View
Thanks! I found
this thread
. It does the job almost perfectly. Still there is one issue - I have a toolstrip which also acts like a titlebar for my form. I want to drag the form only if the event is captured by this toolstrip. If it's captured by the form itself(the only visible part of it is like a thin border), I want to be able to resize it. Right now, if I click on the toolstrip, nothing happens and at the same time, wherever I click on the form, it starts dragging.
StoyanovZ
20-Mar-14 16:15pm
View
To make it more clear - I'm currently using
this
and I don't like the way it works.
StoyanovZ
20-Mar-14 15:30pm
View
Actually, the only thing that bothers me is
[DllImportAttribute("user32.dll")]
StoyanovZ
3-Dec-13 12:08pm
View
Now that I think of it again... Is resource.h the only place we give numbers to the IDs?
StoyanovZ
3-Dec-13 12:07pm
View
Thanks! I'll try this tomorow(I'm on another computer now)
StoyanovZ
3-Dec-13 12:04pm
View
Oh, right, I haven't tried it this way yet :D By the way, I'm starting to thing more and more that it has nothing to do with it, because anyway LoadString is BOOL. BUT IDS_STATUS_PANE1 is defined(I think it's sort of 40235), so it does exist... I'm not quite sure what's going on here :/
StoyanovZ
20-Nov-13 11:09am
View
Yup... and unfortunately I can' share the code, because it's commercial :( Anyway, I'm currently trying to replace the dialog with a frame. We'll see what will happen.
StoyanovZ
20-Nov-13 9:19am
View
The project is not originally mine.
StoyanovZ
20-Nov-13 8:54am
View
New info - it comes out that the project is actually dialog-based. However, it's too big to make it again from scratch, so I have to add the ribbon to the current project. I read somewhere that it's possible but that's all I maneged to find :/
StoyanovZ
19-Nov-13 5:36am
View
Understanding what and where I have to add. But I think I sorted it out :)
StoyanovZ
19-Nov-13 4:00am
View
I need to add a ribbon interface to a project which was initially created without ribbons(and without the needed headers etc.).
StoyanovZ
18-Nov-13 11:29am
View
The previous line is
m_wndRibbonBar.ShowPane(TRUE, TRUE, TRUE);
And it works o.O
StoyanovZ
18-Nov-13 6:16am
View
I followed this tutorial today:
http://blogs.msdn.com/b/dsvc/archive/2013/07/10/switching-between-cmfcribbonbar-based-ribbon-interface-and-cmfcmenubar-cmfctoolbar-based-interface-on-the-fly.aspx
In function OnStyleRibboninterface() I get a runtime error ( "Debug Assertion Failed!" ) on this line:
m_wndMenuBar.ShowPane(FALSE, FALSE, FALSE);
For some reason it seems like m_hWnd is NULL :?
StoyanovZ
18-Nov-13 4:48am
View
Deleted
I followed this tutorial today:
http://blogs.msdn.com/b/dsvc/archive/2013/07/10/switching-between-cmfcribbonbar-based-ribbon-interface-and-cmfcmenubar-cmfctoolbar-based-interface-on-the-fly.aspx
On the bottom you can see my comment about the assert I get.
StoyanovZ
15-Nov-13 14:42pm
View
All stuff must be done in VS 2010. That's the IDE used till now and mustn't be changed. May be I'm not looking at the right place but I only found 2012 and 2013 express :/
StoyanovZ
15-Nov-13 12:03pm
View
Yup, yesterday I found a tutorial on blending both styles. It seems to be quite easy but now I don't have access to a computer with VS to test :( I'll have to wait untill Monday.
StoyanovZ
1-Nov-13 16:34pm
View
Finally, here's a perfectly working code, thanks to you for giving me this idea:
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js">
</script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.js">
</script>
<script type="text/javascript">
function press(event){
var target = event.target != null ? event.target : event.srcElement;
if(target.id == 'tBar'){
document.getElementById('tBar').style.backgroundColor = 'red';
document.getElementById('tBar').style.color = 'yellow';
document.getElementById('tBar').style.cursor = 'move';
}
}
function release(event){
document.getElementById('tBar').style.backgroundColor = 'yellow';
document.getElementById('tBar').style.color = 'red';
document.getElementById('tBar').style.cursor = 'default';
}
function over(event){
var target = event.target != null ? event.target : event.srcElement;
if(target.id == 'tBar'){
$("#wnd").draggable({disabled: false});
}
else{
$("#wnd").draggable({disabled: true});
}
}
</script>
</head>
<body onmouseover="over(event);" onmousedown="press(event);" onmouseup="release(event);">
<div id="wnd" style="position:relative;left:10px;top:10px;wdth:220px;height:195px">
<div id="tBar" style="position:absolute;left:10px;top:10px;width:200px;height:25px;background-color:yellow;padding-left:3px;color:red">
Title
</div>
<div id="ctxt" style="position:absolute;left:10px;top:35px;width:196px;height:148px;background-color:white;border-width:2px;border-style:none solid solid;border-color:red;padding-left:3px">
Drag me?
</div>
</div>
<!--<script type="text/javascript">
$(document).ready(function(){
$("#tBar").draggable();
});
</script>-->
</body>
</html>
I tried to add resizable() but the one I managed to find didn't work the way I'd like to :/
StoyanovZ
30-Oct-13 15:45pm
View
OK, I upgraded to a newer version of jQuery and jQueryUI. Now it works in the three browsers, BUT still I have this issue - the div should be draggable only if I press the green area on the top(sort of titlebar) but it's actually always draggable :(
<HTML>
<HEAD>
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.js"></script>
<script type="text/javascript">
function press(event){
var target = event.target;
if(target.id == 'wnd'){
document.getElementById('wnd').style.backgroundColor = 'grey';
document.getElementById('wnd').style.cursor='move';
$("#wnd").draggable({enabled: true});
}
else{
$("#wnd").draggable({enabled: false});
}
}
function release(event){
var target = event.target;
if(target.id == 'wnd'){
document.getElementById('wnd').style.backgroundColor = 'green';
document.getElementById('wnd').style.cursor='default';
}
}
</script>
</HEAD>
<BODY onmousedown="press(event);" onmouseup="release(event);">
<DIV id="wnd" style="position:relative;left:20px;top:20px;width:200px;height:25px;background-color:green;">
<DIV style="position:absolute;left:0px;top:25px;width:196px;height:148px;background-color:white;border-width:2px;border-style:none solid solid;border-color:red"></DIV>
</DIV>
<SCRIPT type="text/javascript">
$(document).ready(function(){
$("#wnd").draggable();
});
</SCRIPT>
</BODY>
</HTML>
StoyanovZ
30-Oct-13 15:18pm
View
Done. Now it works in Firefox and Chrome and doesn't work in IE :D AND it drags the element no matter if I've pressed the wnd's top or it's inside(the white area)
StoyanovZ
29-Oct-13 16:35pm
View
Yup, I changed "client" to "screen" and added a condition checking the way of getting the event's targed. Now it still works great in IE, but in Firefox and Chrome the so-called-window div gets temporarily dropped if I move the mouse too fast and leave the div's contours :/
Oh, I also simplified the way of repositioning the div.
StoyanovZ
29-Oct-13 14:24pm
View
OK, oldy was really mistyped(and, strangely, it still worked in IE :D)
StoyanovZ
29-Oct-13 12:21pm
View
It's done it again :@ "removed" are actually CSS properties(sizes, top and left coordinates...) And oldy should be with CAPITAL Y - I'm sure I made it like that :X
StoyanovZ
26-Oct-13 7:56am
View
I didn't see that someone has already answered :D
StoyanovZ
26-Oct-13 5:22am
View
Actually, today I tested the code you offered in IE and it worked with no bugs! In chrome I can move it down and right with no problems, but when I try to move it up or left, I must be careful not to leave the contours. In Firefox it doesn't work at all. I'll have to think whether to forse people to use IE or to find the differences between the browsers. Thank you!
StoyanovZ
25-Oct-13 12:53pm
View
Oh, and the reason I don't use a plugin is that I need this for a course project and I prefer to do it myself. I know it's possible, because I've seen it(but I haven't seen the script itself)
StoyanovZ
25-Oct-13 6:07am
View
Yup :D
StoyanovZ
25-Oct-13 5:36am
View
Nope, still not working.
StoyanovZ
25-Oct-13 5:34am
View
Oh... I didn't see that there's a Question option under every comment :D I was actually talking to Dhaval
StoyanovZ
25-Oct-13 5:10am
View
Deleted
@Dhaval Patel
Nope, still not working.
Show More