|
Please use the message board at the bottom of that article.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
He did.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Look at the DeleteExecutableBF() function here.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
That must be a usefull function for girls who are unsatisfied with their "executable" BoyFriends...
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
Hi,
How to get Geo location on my PC. How to get it?
|
|
|
|
|
john5632 wrote: How to get Geo location on my PC. How to get it?
Your PC is nearby you (from "relative Geo location for dummies...").
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Using IP address how to get the Geo location of any PC
|
|
|
|
|
Install GeoLite[^] or one of the many commercial geolocation packages.
|
|
|
|
|
How to get through code only?
|
|
|
|
|
You can't translate IP address to geographic location with "code only", you must have a database that maps address blocks to locations.
|
|
|
|
|
Well, he can always create a database on his own . As he really wants to reinvent the wheel, he should also reinvent the car that goes with it
|
|
|
|
|
Have you looked at this?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
It's wrong: it gets the firewall address (of course) and place it in a wrong place... for either me and the firewall
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
How can i set the size and position of contols in my win32 application
thanks in advance
|
|
|
|
|
Like this?
HANDLE hQuit = CreateWindow(<br />
"BUTTON",<br />
"Quit",<br />
WS_CHILD | WS_VISIBLE | BS_BITMAP ,<br />
350,
200,
100,
30,
hMainWindow, <br />
(HMENU)ID_BUTTON5,<br />
hMainInstance,<br />
(LPVOID)NULL);<br />
if(hQuit == NULL){<br />
MessageBoxW(0, L"Error creating button!", L"ERROR", MB_ICONERROR);<br />
return -1;<br />
} else {<br />
ShowWindow(hQuit, SW_SHOW);<br />
UpdateWindow(hQuit);<br />
}
011011010110000101100011011010000110100101101110
0110010101110011
|
|
|
|
|
Thanks
But i would like to get the size and position of my existing controls in the window
when i get the message WM_SIZING ie when i resize my window
|
|
|
|
|
What about calling GetWindowRect for each control?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Here's a mickey mouse example.
It assumes a child control (a button in my instance) exists and has the ID of IDC_BUTTON1 (#define IDC_BUTTON1 1000)
LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
int wWidth, wHeight;
int bWidth, bHeight;
RECT btnRect;
HWND btnHwnd;
switch (message)
{
case WM_DESTROY:
PostQuitMessage (0);
break;
case WM_SIZE:
wWidth = LOWORD(lParam);
wHeight = HIWORD(lParam);
btnHwnd = GetDlgItem(hwnd, IDC_BUTTON1);
GetWindowRect(btnHwnd, &btnRect);
bWidth = btnRect.right - btnRect.left;
bHeight = btnRect.bottom - btnRect.top;
SetWindowPos(btnHwnd, HWND_TOP, (wWidth-bWidth)/2, (wHeight-bHeight)/2, bWidth, bHeight, SWP_SHOWWINDOW);
break;
default:
return DefWindowProc (hwnd, message, wParam, lParam);
}
return 0;
}
|
|
|
|
|
thanks a looooooooooooooooooooooot
|
|
|
|
|
Pleasure mate.
|
|
|
|
|
Didn't you just ask this around 90 minutes ago?
Since a control is a window, there is no distinction in setting the position of one or the other.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Ok, this is pretty specific question. What i am trying to do is to implement vista glass effect in my gtk+ windows app. But, i just can't gtk+ code can be easily mixed with win32 APIs, so for example here is the code which draws a black rectangle on the specified area (the area where app border extends to client window):
PAINTSTRUCT ps;
RECT lpRect;
.....
case WM_PAINT:
{
HDC hdc = BeginPaint(hwnd, &ps);
GetClientRect(hwnd, &lpRect);
HBRUSH Brush=CreateSolidBrush(RGB(0,0,0));
lpRect.bottom = 30;
FillRect(hdc, &lpRect, Brush);
EndPaint(hwnd, &ps);
}
This works fine, but only in case of pure win32 api based app, while in gtk+ for some reason it doesn't.
As code can be mixed i have tried it this way:
HWND hwnd = (HWND)gdk_win32_drawable_get_handle (window->window);
HDC hdc = GetDC(hwnd);
if(!hdc)MessageBox(0,"err getting hdc","err",0); // hdc is not null...
the rest of the code is the same actually. Result is negative.
Another way of getting HDC was:
hdc = gdk_win32_hdc_get (window->window, window->style->black_gc, mask);
But i simply got no idea how to use this function, because as 2nd parameter - there are tons of options and i dont know gtk that good.
So maybe you can help me or maybe you know some resource where i can get help on win32 gtk programming.
I know there are standard methods for doing this in wx(?), Qt, win32, mfc, .Net, etc, but gtk+ is the only options in this case.
Thanks in advance
011011010110000101100011011010000110100101101110
0110010101110011
|
|
|
|
|
how can i get the window position
|
|
|
|
|
GetWindowRect, please read carefully the documentation page.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
thanks....
|
|
|
|